forked from shadowsocks/shadowsocks-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
275 lines (238 loc) · 7.44 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
[package]
name = "shadowsocks-rust"
version = "1.21.0"
authors = ["Shadowsocks Contributors"]
description = "shadowsocks is a fast tunnel proxy that helps you bypass firewalls."
repository = "https://github.com/shadowsocks/shadowsocks-rust"
readme = "README.md"
documentation = "https://docs.rs/shadowsocks-rust"
keywords = ["shadowsocks", "proxy", "socks", "socks5", "firewall"]
license = "MIT"
edition = "2021"
rust-version = "1.74"
[badges]
maintenance = { status = "passively-maintained" }
[[bin]]
name = "sslocal"
path = "bin/sslocal.rs"
required-features = ["local"]
[[bin]]
name = "ssserver"
path = "bin/ssserver.rs"
required-features = ["server"]
[[bin]]
name = "ssurl"
path = "bin/ssurl.rs"
required-features = ["utility"]
[[bin]]
name = "ssmanager"
path = "bin/ssmanager.rs"
required-features = ["manager"]
[[bin]]
name = "ssservice"
path = "bin/ssservice.rs"
required-features = ["service"]
[[bin]]
name = "sswinservice"
path = "bin/sswinservice.rs"
required-features = ["winservice"]
[workspace]
members = ["crates/shadowsocks", "crates/shadowsocks-service"]
[profile.release]
lto = "fat"
codegen-units = 1
incremental = false
panic = "abort"
strip = true
[features]
default = [
"logging",
"hickory-dns",
"local",
"server",
"manager",
"utility",
"service",
"local-http",
"local-tunnel",
"local-socks4",
"multi-threaded",
"aead-cipher-2022",
]
# Basic Features
basic = ["logging", "hickory-dns", "local", "server", "multi-threaded"]
# All Suggested Features
full = [
"logging",
"hickory-dns",
"dns-over-tls",
"dns-over-https",
"local",
"server",
"manager",
"utility",
"service",
"local-http",
"local-http-rustls",
"local-tunnel",
"local-socks4",
"local-dns",
"local-redir",
"local-tun",
"local-fake-dns",
"local-online-config",
"multi-threaded",
"stream-cipher",
"aead-cipher-2022",
]
# Full features with extra (non-stable)
full-extra = [
"full",
"dns-over-h3",
"aead-cipher-extra",
"aead-cipher-2022-extra",
"security-replay-attack-detect",
]
# Enable local server
local = ["shadowsocks-service/local"]
# Enable remote server
server = ["shadowsocks-service/server"]
# Enable manager server
manager = ["shadowsocks-service/manager"]
# Enable utility
utility = ["qrcode"]
# Enable service
service = ["local", "server", "manager"]
# Enable Windows Service
winservice = ["service", "windows-service"]
# Enables Hickory-DNS for replacing tokio's builtin DNS resolver
hickory-dns = ["shadowsocks-service/hickory-dns"]
# Hickory-DNS was renamed from Trust-DNS, keep compatibility.
trust-dns = ["hickory-dns"]
dns-over-tls = ["shadowsocks-service/dns-over-tls"]
dns-over-native-tls = ["shadowsocks-service/dns-over-native-tls"]
dns-over-native-tls-vendored = [
"shadowsocks-service/dns-over-native-tls-vendored",
]
dns-over-https = ["shadowsocks-service/dns-over-https"]
dns-over-h3 = ["shadowsocks-service/dns-over-h3"]
# Enable logging output
logging = ["log4rs", "tracing", "tracing-subscriber", "time"]
# Enable DNS-relay
local-dns = ["local", "shadowsocks-service/local-dns"]
# Enable client flow statistic report
# Currently is only used in Android
local-flow-stat = ["local", "shadowsocks-service/local-flow-stat"]
# Enable HTTP protocol for sslocal
local-http = ["local", "shadowsocks-service/local-http"]
local-http-native-tls = [
"local-http",
"shadowsocks-service/local-http-native-tls",
]
local-http-native-tls-vendored = [
"local-http",
"shadowsocks-service/local-http-native-tls-vendored",
]
local-http-rustls = ["local-http", "shadowsocks-service/local-http-rustls"]
# Enable REDIR protocol for sslocal
# (transparent proxy)
local-redir = ["local", "shadowsocks-service/local-redir"]
# Enable tunnel protocol for sslocal
local-tunnel = ["local", "shadowsocks-service/local-tunnel"]
# Enable socks4 protocol for sslocal
local-socks4 = ["local", "shadowsocks-service/local-socks4"]
# Enable Tun interface protocol for sslocal
local-tun = ["local", "shadowsocks-service/local-tun", "ipnet"]
# Enable Fake DNS for sslocal
local-fake-dns = ["local", "shadowsocks-service/local-fake-dns", "ipnet"]
# sslocal support online URL (SIP008 Online Configuration Delivery)
# https://shadowsocks.org/doc/sip008.html
local-online-config = [
"local",
"mime",
"shadowsocks-service/local-online-config",
]
# ssurl support outline (ssconf) URL
utility-url-outline = ["reqwest"]
# Enable jemalloc for binaries
jemalloc = ["jemallocator"]
# Enable bundled tcmalloc
tcmalloc-vendored = ["tcmalloc/bundled"]
# Enable snmalloc for binaries
snmalloc = ["snmalloc-rs"]
# Enable tokio's multi-threaded runtime
multi-threaded = ["tokio/rt-multi-thread"]
# Enable Stream Cipher Protocol
# WARN: Stream Cipher Protocol is proved to be insecure
# https://github.com/shadowsocks/shadowsocks-rust/issues/373
# Users should always avoid using these ciphers in practice
stream-cipher = ["shadowsocks-service/stream-cipher"]
# Enable extra AEAD ciphers
# WARN: These non-standard AEAD ciphers are not officially supported by shadowsocks community
aead-cipher-extra = ["shadowsocks-service/aead-cipher-extra"]
# Enable AEAD 2022
aead-cipher-2022 = ["shadowsocks-service/aead-cipher-2022"]
# Enable AEAD 2022 with extra ciphers
aead-cipher-2022-extra = ["shadowsocks-service/aead-cipher-2022-extra"]
# Enable detection against replay attack (Stream / AEAD)
security-replay-attack-detect = [
"shadowsocks-service/security-replay-attack-detect",
]
replay-attack-detect = [
"security-replay-attack-detect",
] # Backward compatibility. DO NOT USE.
[dependencies]
log = "0.4"
log4rs = { version = "1.2", optional = true }
tracing = { version = "0.1", optional = true }
tracing-subscriber = { version = "0.3", optional = true, features = [
"std",
"fmt",
"env-filter",
"time",
"local-time",
] }
time = { version = "0.3", optional = true }
serde = { version = "1.0", features = ["derive"] }
json5 = "0.4"
thiserror = "1.0"
base64 = "0.22"
mime = { version = "0.3", optional = true }
clap = { version = "4.5", features = ["wrap_help", "suggestions"] }
cfg-if = "1"
qrcode = { version = "0.14", default-features = false, optional = true }
sysexits = "0.8"
build-time = "0.1"
directories = "5.0"
xdg = "2.5"
rpassword = "7.3"
libc = { version = "0.2", features = ["extra_traits"] }
rand = "0.8"
futures = "0.3"
tokio = { version = "1", features = ["rt", "signal"] }
ipnet = { version = "2.10", optional = true }
mimalloc = { version = "0.1", default-features = false, optional = true }
tcmalloc = { version = "0.3", optional = true }
jemallocator = { version = "0.5", optional = true }
snmalloc-rs = { version = "0.3", optional = true }
rpmalloc = { version = "0.2", optional = true }
shadowsocks-service = { version = "1.21.0", path = "./crates/shadowsocks-service" }
windows-service = { version = "0.7", optional = true }
[target.'cfg(unix)'.dependencies]
daemonize = "0.5"
[target.'cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
reqwest = { version = "0.12", features = [
"blocking",
"rustls-tls",
"rustls-tls-native-roots",
], default-features = false, optional = true }
[target.'cfg(not(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64")))'.dependencies]
reqwest = { version = "0.12", features = [
"blocking",
"native-tls-vendored",
], optional = true }
[dev-dependencies]
byteorder = "1.5"
env_logger = "0.11"
byte_string = "1.0"
tokio = { version = "1", features = ["net", "time", "macros", "io-util"] }