support socks5 proxy

usage: --socks5 12345

create an socks5 server on port 12345, can be used by socks5 client to access
virtual network.
This commit is contained in:
sijie.sun
2024-08-14 23:26:15 +08:00
committed by Sijie.Sun
parent 2aa686f7ad
commit ae54a872ce
15 changed files with 1889 additions and 10 deletions

View File

@@ -206,7 +206,7 @@ defguard_wireguard_rs = "0.4.2"
[features]
default = ["wireguard", "mimalloc", "websocket", "smoltcp", "tun"]
default = ["wireguard", "mimalloc", "websocket", "smoltcp", "tun", "socks5"]
full = [
"quic",
"websocket",
@@ -215,9 +215,10 @@ full = [
"aes-gcm",
"smoltcp",
"tun",
"socks5",
]
mips = ["aes-gcm", "mimalloc", "wireguard", "tun", "smoltcp"]
bsd = ["aes-gcm", "mimalloc", "smoltcp"]
mips = ["aes-gcm", "mimalloc", "wireguard", "tun", "smoltcp", "socks5"]
bsd = ["aes-gcm", "mimalloc", "smoltcp", "socks5"]
wireguard = ["dep:boringtun", "dep:ring"]
quic = ["dep:quinn", "dep:rustls", "dep:rcgen"]
mimalloc = ["dep:mimalloc-rust"]
@@ -231,3 +232,4 @@ websocket = [
"dep:rcgen",
]
smoltcp = ["dep:smoltcp", "dep:parking_lot"]
socks5 = ["dep:smoltcp"]