Skip to content

Commit 1cddc54

Browse files
committed
style(format): reformat all files
1 parent cbfab7d commit 1cddc54

File tree

8 files changed

+67
-46
lines changed

8 files changed

+67
-46
lines changed

Aurum.Configuration/ShareLinks.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ let createV2FlyObjectFromUri (uriObject: System.Uri) =
5454
match transportType with
5555
| "ws" ->
5656
createWebSocketObject (tryRetrieveFromShareLink "path") None None None (tryRetrieveFromShareLink "host") None
57-
5857
|> Success
5958
| "grpc" ->
6059
retrieveFromShareLink "serviceName"

Aurum.Configuration/Shared/Shadowsocks.fs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module ShadowsocksEncryption =
4545
ShadowsocksEncryption.ChaCha20
4646
(fun x ->
4747
match x with
48-
| ShadowsocksEncryption.ChaCha20 x -> Some (ShadowsocksEncryption.ChaCha20 x)
48+
| ShadowsocksEncryption.ChaCha20 x -> Some(ShadowsocksEncryption.ChaCha20 x)
4949
| _ -> None)
5050
f
5151
p
@@ -55,7 +55,7 @@ module ShadowsocksEncryption =
5555
ShadowsocksEncryption.ChaCha20Ietf
5656
(fun x ->
5757
match x with
58-
| ShadowsocksEncryption.ChaCha20Ietf x -> Some (ShadowsocksEncryption.ChaCha20Ietf x)
58+
| ShadowsocksEncryption.ChaCha20Ietf x -> Some(ShadowsocksEncryption.ChaCha20Ietf x)
5959
| _ -> None)
6060
f
6161
p
@@ -65,7 +65,7 @@ module ShadowsocksEncryption =
6565
ShadowsocksEncryption.AES128
6666
(fun x ->
6767
match x with
68-
| ShadowsocksEncryption.AES128 x -> Some (ShadowsocksEncryption.AES128 x)
68+
| ShadowsocksEncryption.AES128 x -> Some(ShadowsocksEncryption.AES128 x)
6969
| _ -> None)
7070
f
7171
p
@@ -75,7 +75,7 @@ module ShadowsocksEncryption =
7575
ShadowsocksEncryption.AES256
7676
(fun x ->
7777
match x with
78-
| ShadowsocksEncryption.AES256 x -> Some (ShadowsocksEncryption.AES256 x)
78+
| ShadowsocksEncryption.AES256 x -> Some(ShadowsocksEncryption.AES256 x)
7979
| _ -> None)
8080
f
8181
p
@@ -85,7 +85,7 @@ module ShadowsocksEncryption =
8585
ShadowsocksEncryption.AES128_2022
8686
(fun x ->
8787
match x with
88-
| ShadowsocksEncryption.AES128_2022 x -> Some (ShadowsocksEncryption.AES128_2022 x)
88+
| ShadowsocksEncryption.AES128_2022 x -> Some(ShadowsocksEncryption.AES128_2022 x)
8989
| _ -> None)
9090
f
9191
p
@@ -95,7 +95,7 @@ module ShadowsocksEncryption =
9595
ShadowsocksEncryption.AES256_2022
9696
(fun x ->
9797
match x with
98-
| ShadowsocksEncryption.AES256_2022 x -> Some (ShadowsocksEncryption.AES256_2022 x)
98+
| ShadowsocksEncryption.AES256_2022 x -> Some(ShadowsocksEncryption.AES256_2022 x)
9999
| _ -> None)
100100
f
101101
p
@@ -105,7 +105,7 @@ module ShadowsocksEncryption =
105105
ShadowsocksEncryption.ChaCha20_2022
106106
(fun x ->
107107
match x with
108-
| ShadowsocksEncryption.ChaCha20_2022 x -> Some (ShadowsocksEncryption.ChaCha20_2022 x)
108+
| ShadowsocksEncryption.ChaCha20_2022 x -> Some(ShadowsocksEncryption.ChaCha20_2022 x)
109109
| _ -> None)
110110
f
111111
p
@@ -115,7 +115,7 @@ module ShadowsocksEncryption =
115115
ShadowsocksEncryption.ChaCha8_2022
116116
(fun x ->
117117
match x with
118-
| ShadowsocksEncryption.ChaCha8_2022 x -> Some (ShadowsocksEncryption.ChaCha8_2022 x)
118+
| ShadowsocksEncryption.ChaCha8_2022 x -> Some(ShadowsocksEncryption.ChaCha8_2022 x)
119119
| _ -> None)
120120
f
121121
p
@@ -130,7 +130,7 @@ module ShadowsocksPlugin =
130130
ShadowsocksPlugin.SimpleObfs
131131
(fun x ->
132132
match x with
133-
| ShadowsocksPlugin.SimpleObfs x -> Some (ShadowsocksPlugin.SimpleObfs x)
133+
| ShadowsocksPlugin.SimpleObfs x -> Some(ShadowsocksPlugin.SimpleObfs x)
134134
| _ -> None)
135135
f
136136
p
@@ -140,7 +140,7 @@ module ShadowsocksPlugin =
140140
ShadowsocksPlugin.V2ray
141141
(fun x ->
142142
match x with
143-
| ShadowsocksPlugin.V2ray x -> Some (ShadowsocksPlugin.V2ray x)
143+
| ShadowsocksPlugin.V2ray x -> Some(ShadowsocksPlugin.V2ray x)
144144
| _ -> None)
145145
f
146146
p
@@ -154,10 +154,13 @@ type ShadowsocksObject =
154154
module ShadowsocksObject =
155155
let inline _Host f p =
156156
f p.Host <&> fun x -> { p with Host = x }
157+
157158
let inline _Port f p =
158159
f p.Port <&> fun x -> { p with Port = x }
160+
159161
let inline _Encryption f p =
160162
f p.Encryption <&> fun x -> { p with Encryption = x }
163+
161164
let inline _Plugin f p =
162165
f p.Plugin <&> fun x -> { p with Plugin = x }
163166

Aurum.Configuration/Sing/DNS.fs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ type DnsDomainRuleType =
2929
| Keyword of string list
3030
| Regex of string list
3131

32-
type DnsServerObject =
33-
{ tag: string
34-
address: string }
32+
type DnsServerObject = { tag: string; address: string }
3533

3634
type RuleType =
3735
| Block of rules: DnsDomainRuleType
@@ -58,9 +56,15 @@ type DnsObject =
5856
let mapDnsRuleType dnsRuleType (origObject: DnsRuleObject) =
5957
match dnsRuleType with
6058
| Full domain -> { origObject with Domain = Some domain }
61-
| Suffix domain -> { origObject with DomainSuffix = Some domain }
62-
| Keyword domain -> { origObject with DomainKeyword = Some domain }
63-
| Regex domain -> { origObject with DomainRegex = Some domain }
59+
| Suffix domain ->
60+
{ origObject with
61+
DomainSuffix = Some domain }
62+
| Keyword domain ->
63+
{ origObject with
64+
DomainKeyword = Some domain }
65+
| Regex domain ->
66+
{ origObject with
67+
DomainRegex = Some domain }
6468

6569
let mapRuleType ruleType =
6670
match ruleType with
@@ -82,8 +86,9 @@ let mapRuleType ruleType =
8286
Outbound = None
8387
Server = "block"
8488
DisableCache = None
85-
RewriteTtl = None } |> mapDnsRuleType rules
86-
| Redirect (rules, tag) ->
89+
RewriteTtl = None }
90+
|> mapDnsRuleType rules
91+
| Redirect(rules, tag) ->
8792
{ Inbound = None
8893
QueryType = None
8994
Network = None
@@ -101,7 +106,8 @@ let mapRuleType ruleType =
101106
Outbound = None
102107
Server = tag
103108
DisableCache = None
104-
RewriteTtl = None } |> mapDnsRuleType rules
109+
RewriteTtl = None }
110+
|> mapDnsRuleType rules
105111

106112
let createDnsObject (internalDnsObject: InternalDnsObject) =
107113
{ DnsObject.rules = List.map mapRuleType internalDnsObject.rules

Aurum.Configuration/Sing/Inbound.fs

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ type SOCKSRecord =
2121
users: obj list }
2222

2323
module SOCKSRecord =
24-
let inline _tag f p =
25-
f p.tag <&> fun x -> { p with tag = x }
24+
let inline _tag f p = f p.tag <&> fun x -> { p with tag = x }
2625

2726
let inline _listen f p =
28-
f p.listen <&> fun x -> { p with listen = x}
27+
f p.listen <&> fun x -> { p with listen = x }
2928

3029
let inline _listenPort f p =
3130
f p.listenPort <&> fun x -> { p with listenPort = x }
@@ -40,7 +39,8 @@ module SOCKSRecord =
4039
f p.sniff <&> fun x -> { p with sniff = x }
4140

4241
let inline _sniffOverrideDestination f p =
43-
f p.sniffOverrideDestination <&> fun x -> { p with sniffOverrideDestination = x }
42+
f p.sniffOverrideDestination
43+
<&> fun x -> { p with sniffOverrideDestination = x }
4444

4545
let inline _domainStrategy f p =
4646
f p.domainStrategy <&> fun x -> { p with domainStrategy = x }
@@ -52,7 +52,10 @@ module SOCKSRecord =
5252
f p.proxyProtocol <&> fun x -> { p with proxyProtocol = x }
5353

5454
let inline _proxyProtocolAcceptNoHeader f p =
55-
f p.proxyProtocolAcceptNoHeader <&> fun x -> { p with proxyProtocolAcceptNoHeader = x }
55+
f p.proxyProtocolAcceptNoHeader
56+
<&> fun x ->
57+
{ p with
58+
proxyProtocolAcceptNoHeader = x }
5659

5760
let inline _detour f p =
5861
f p.detour <&> fun x -> { p with detour = x }
@@ -80,8 +83,7 @@ type HttpRecord =
8083
setSystemProxy: bool option }
8184

8285
module HttpRecord =
83-
let inline _tag f p =
84-
f p.tag <&> fun x -> { p with tag = x }
86+
let inline _tag f p = f p.tag <&> fun x -> { p with tag = x }
8587

8688
let inline _listen f p =
8789
f p.listen <&> fun x -> { p with listen = x }
@@ -99,7 +101,8 @@ module HttpRecord =
99101
f p.sniff <&> fun x -> { p with sniff = x }
100102

101103
let inline _sniffOverrideDestination f p =
102-
f p.sniffOverrideDestination <&> fun x -> { p with sniffOverrideDestination = x }
104+
f p.sniffOverrideDestination
105+
<&> fun x -> { p with sniffOverrideDestination = x }
103106

104107
let inline _domainStrategy f p =
105108
f p.domainStrategy <&> fun x -> { p with domainStrategy = x }
@@ -111,16 +114,18 @@ module HttpRecord =
111114
f p.proxyProtocol <&> fun x -> { p with proxyProtocol = x }
112115

113116
let inline _proxyProtocolAcceptNoHeader f p =
114-
f p.proxyProtocolAcceptNoHeader <&> fun x -> { p with proxyProtocolAcceptNoHeader = x }
117+
f p.proxyProtocolAcceptNoHeader
118+
<&> fun x ->
119+
{ p with
120+
proxyProtocolAcceptNoHeader = x }
115121

116122
let inline _detour f p =
117123
f p.detour <&> fun x -> { p with detour = x }
118124

119125
let inline _users f p =
120126
f p.users <&> fun x -> { p with users = x }
121127

122-
let inline _tls f p =
123-
f p.tls <&> fun x -> { p with tls = x }
128+
let inline _tls f p = f p.tls <&> fun x -> { p with tls = x }
124129

125130
let inline _setSystemProxy f p =
126131
f p.setSystemProxy <&> fun x -> { p with setSystemProxy = x }
@@ -141,11 +146,10 @@ type MixedRecord =
141146
detour: string option
142147

143148
users: obj list option
144-
setSystemProxy: bool option}
149+
setSystemProxy: bool option }
145150

146151
module MixedRecord =
147-
let inline tag_ f p =
148-
f p.tag <&> fun x -> { p with tag = x }
152+
let inline tag_ f p = f p.tag <&> fun x -> { p with tag = x }
149153

150154
let inline _listen f p =
151155
f p.listen <&> fun x -> { p with listen = x }
@@ -163,18 +167,23 @@ module MixedRecord =
163167
f p.sniff <&> fun x -> { p with sniff = x }
164168

165169
let inline _sniffOverrideDestination f p =
166-
f p.sniffOverrideDestination <&> fun x -> { p with sniffOverrideDestination = x }
170+
f p.sniffOverrideDestination
171+
<&> fun x -> { p with sniffOverrideDestination = x }
167172

168173
let inline _domainStrategy f p =
169174
f p.domainStrategy <&> fun x -> { p with domainStrategy = x }
175+
170176
let inline _udpTimeout f p =
171177
f p.udpTimeout <&> fun x -> { p with udpTimeout = x }
172178

173179
let inline _proxyProtocol f p =
174180
f p.proxyProtocol <&> fun x -> { p with proxyProtocol = x }
175181

176182
let inline _proxyProtocolAcceptNoHeader f p =
177-
f p.proxyProtocolAcceptNoHeader <&> fun x -> { p with proxyProtocolAcceptNoHeader = x }
183+
f p.proxyProtocolAcceptNoHeader
184+
<&> fun x ->
185+
{ p with
186+
proxyProtocolAcceptNoHeader = x }
178187

179188
let inline _detour f p =
180189
f p.detour <&> fun x -> { p with detour = x }
@@ -227,8 +236,7 @@ type TunRecord =
227236
detour: string option }
228237

229238
module TunRecord =
230-
let inline _tag f p =
231-
f p.tag <&> fun x -> { p with tag = x }
239+
let inline _tag f p = f p.tag <&> fun x -> { p with tag = x }
232240

233241
let inline _interfaceName f p =
234242
f p.interfaceName <&> fun x -> { p with interfaceName = x }
@@ -288,7 +296,8 @@ module TunRecord =
288296
f p.sniff <&> fun x -> { p with sniff = x }
289297

290298
let inline _sniffOverrideDestination f p =
291-
f p.sniffOverrideDestination <&> fun x -> { p with sniffOverrideDestination = x }
299+
f p.sniffOverrideDestination
300+
<&> fun x -> { p with sniffOverrideDestination = x }
292301

293302
let inline _domainStrategy f p =
294303
f p.domainStrategy <&> fun x -> { p with domainStrategy = x }
@@ -297,7 +306,10 @@ module TunRecord =
297306
f p.proxyProtocol <&> fun x -> { p with proxyProtocol = x }
298307

299308
let inline _proxyProtocolAcceptNoHeader f p =
300-
f p.proxyProtocolAcceptNoHeader <&> fun x -> { p with proxyProtocolAcceptNoHeader = x }
309+
f p.proxyProtocolAcceptNoHeader
310+
<&> fun x ->
311+
{ p with
312+
proxyProtocolAcceptNoHeader = x }
301313

302314
let inline _detour f p =
303315
f p.detour <&> fun x -> { p with detour = x }

Aurum.Configuration/Sing/Outbound.fs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ type MultiplexRecord =
2020
padding: bool option }
2121

2222
module MultiplexRecord =
23-
let inline _enabled f p = f p.enabled <&> fun x -> { p with enabled = x }
23+
let inline _enabled f p =
24+
f p.enabled <&> fun x -> { p with enabled = x }
2425

2526
let inline _protocol f p =
2627
f p.protocol <&> fun x -> { p with protocol = x }
@@ -227,7 +228,7 @@ type VMessRecord =
227228
domainStrategy: string option
228229
fallbackDelay: string option }
229230

230-
static member FromV2FlyObject v2flyObject = ()
231+
static member FromV2FlyObject v2flyObject = ()
231232

232233
module VMessRecord =
233234
let inline _tag f p = f p.tag <&> fun x -> { p with tag = x }

Aurum.Configuration/V2fly/Outbound.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ type OutboundObject =
6868
elif options |> List.contains "tls" then
6969
let host = (options |> List.find (fun a -> a.IndexOf("host") <> -1)).Split("=")[1]
7070

71-
let transportSettings =
72-
createWebSocketObject None None None (Some host) None None
71+
let transportSettings = createWebSocketObject None None None (Some host) None None
7372

7473
let securitySettings = createTLSObject (Some host) None
7574

Aurum.Configuration/V2fly/Routing.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ type RuleObject =
5959
Networks: RuleMatchNetwork option
6060
PortList: string option
6161
InboundTag: string list option }
62+
6263
static member FromGenericRuleObject(genericRuleObject: Routing.RuleObject) =
6364
let ipList =
6465
genericRuleObject.Ip

Aurum.Interop/ProcessWrapper.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ type CoreProcess
2222
disposed <- false
2323

2424
member this.Process
25-
with get() = internalProcess
26-
and set(value) = internalProcess <- value
25+
with get () = internalProcess
26+
and set (value) = internalProcess <- value
2727

2828
member this.Start() =
2929
(this.Process <- Process.Start(coreProcessInfo))

0 commit comments

Comments
 (0)