zonyitoo
486e1d7279
Local, Server & Manager unified binary ssservice
...
- fixes #698
- Refactored shadowsocks-rust crate structure. Common code are put into
a separated library
2021-11-27 17:36:16 +08:00
zonyitoo
4a4576bcf5
Split library and binaries into separated crates
...
- shadowsocks-core is a library contains all necessary functions for
running shadowsocks
- shadowsocks is a binary crate that ships end-user products
ref #326
2020-11-29 00:12:16 +08:00
zonyitoo
89722523a6
Plugins::join_all should exit if one of the plugins is exited
...
- Make clippy happy
- Upgrade tokio-rustls to 0.21 and other related crates
2020-11-28 02:32:52 +08:00
zonyitoo
2bbc151ff8
Revert AEAD direct buffer decryption
...
- DecryptedReader provides AsyncRead interface, which means that it
obeys AsyncRead::poll_read calling convention: fills buffer only when
read have been succeeded
- Benchmark doesn't show any speed differences in both download and upload
2020-11-27 20:32:11 +08:00
zonyitoo
0cd21827b2
SIP008 configuration format support
...
- "plugin" could be empty, which implies no plugin
- ServerConfig read and stores "id" and "remarks", only for ser
2020-11-24 09:29:56 +08:00
zonyitoo
8bd54052ac
Config check_integrity extends to DnsLocal, TunnelLocal and HttpsLocal
2020-11-23 23:16:42 +08:00
zonyitoo
fee940af88
Customized s2p and p2s copy function
2020-11-23 13:01:48 +08:00
zonyitoo
e6718a0510
Ensure ReadBuf is initialized before poll_read
2020-11-23 00:24:05 +08:00
zonyitoo
aa6cd4ce48
--local-dns-addr is checked after Android's VPN mode's default address
...
fix #323
2020-11-22 23:24:31 +08:00
zonyitoo
d03e475bcc
AEAD DecryptedReader reads directly to ReadBuf if possible
...
- Avoid unnecessary buffer allocation
2020-11-22 23:06:30 +08:00
zonyitoo
bd3d8e5c5e
Decrypt reader optimized memory consumption
...
- Removed data buffer, uses only one buffer for all steps
- Stream reader reads data directly to ReadBuf
2020-11-22 15:17:46 +08:00
zonyitoo
71b98f74d4
Skip setting TCP_NODELAY for bypass calls
2020-11-22 01:18:18 +08:00
zonyitoo
741e019da6
Remove deps to mio v0.6 and update all dependencies
...
fix #321
2020-11-21 22:54:53 +08:00
zonyitoo
855fae6220
Indirect dependent to shadowsocks_crypto, reformatted
2020-11-21 13:38:02 +08:00
zonyitoo
d11a162893
Republic shadowsocks_crypto as crypto mod, set available_ciphers
2020-11-21 13:18:39 +08:00
zonyitoo
eef5fa2096
Updated hyper upgrade API
2020-11-21 12:08:01 +08:00
luozijun
c550913247
Add shadowsocks-crypto
2020-11-21 10:42:56 +08:00
zonyitoo
1758313447
"dns" key is only work for trust-dns feature
2020-11-15 21:16:24 +08:00
zonyitoo
5e428b84de
DNS UDP listener sleep 1s if error occurs
2020-11-15 17:01:22 +08:00
zonyitoo
b0c35eacf2
Fixed remote query log
2020-11-15 16:57:16 +08:00
zonyitoo
174e50e18e
UDP associations sending response directly to socket instead of channel
2020-11-15 15:55:58 +08:00
zonyitoo
5bf36c9ef9
UDP related servers get compatible with recv errors (mostly fd exhausted)
...
- DNS relay server parse request after tokio::spawn
2020-11-15 14:23:21 +08:00
zonyitoo
782da57064
DNS debug log shouldn't print LOCAL and REMOTE everytime
2020-11-15 14:23:21 +08:00
zonyitoo
7572430e14
Send DNS queries sequentially, UDP then TCP
2020-11-15 14:23:21 +08:00
zonyitoo
fd952cac37
fix #318 , impl From<&str> for LocalDnsAddr
2020-11-15 14:23:21 +08:00
zonyitoo
d1d8f72129
Fixed bug, ring AEAD cipher check output.len() shouldn't use equal
2020-11-15 14:23:21 +08:00
zonyitoo
b085122193
fix #318
2020-11-15 14:23:21 +08:00
zonyitoo
b78d1f56bf
Optimized DNS debug log
2020-11-15 14:23:21 +08:00
zonyitoo
2d533e0592
ProxyUpstream sending queries with both TCP & UDP if possible
2020-11-15 14:23:21 +08:00
zonyitoo
91979ec1d9
DNS relay server supports sending in both TCP & UDP (Local + Remote)
2020-11-15 14:23:21 +08:00
zonyitoo
beb1fab9f2
Initialize local dns only of local_dns_addr present
2020-11-15 14:23:21 +08:00
zonyitoo
19d3129cd0
Fixed sslocal dns-addr local-dns-addr and remote-dns-addr requirements
2020-11-15 14:23:21 +08:00
zonyitoo
ca7958b0f1
DNS relay upstream can support both unix socket and udp
2020-11-15 14:23:21 +08:00
zonyitoo
7638140f20
DNS relay outbound socket should also set SO_MARK
...
- Pass Context reference to UpStream trait for protect() and fwmark
2020-11-15 14:23:21 +08:00
zonyitoo
5269e59d7e
Refine local DNS relay configurations
...
- Renamed local-dns-relay feature to local-dns
- sslocal DNS relay cmd options become --dns-addr --local-dns-addr --remote-dns-addr
- sslocal accepts --protocol dns to start standalone DNS resolver
- Hide local-tunnel specific configuration fields if feature disabled
2020-11-15 14:23:21 +08:00
zonyitoo
f2ac8af931
Reserve encrypt/decrypt buffers when needed
2020-11-15 14:23:21 +08:00
zonyitoo
e6e526b0b5
trust-dns works with tokio 0.3
...
- extends "dns" config field to ResolverConfig
2020-11-15 14:23:21 +08:00
zonyitoo
2645d5c818
UdpSocket::as_raw_socket (Windows) is now public
...
- UdpSocket::from_std won't set non-blocking flags
- ref tokio-rs/tokio#3084
2020-11-15 14:23:21 +08:00
zonyitoo
78853d3705
Tests should enable all logging output
2020-11-15 14:23:21 +08:00
zonyitoo
3223ff16c9
Add DNS, HTTP, Socks4/4a tests
2020-11-15 14:23:21 +08:00
zonyitoo
f43ee3e958
Test UDP connectivity with firefox.com DNS query
2020-11-15 14:23:21 +08:00
zonyitoo
6ca52c6d60
Linux redir compatible
2020-11-15 14:23:21 +08:00
zonyitoo
0ac7feb693
Make uds compatible with tokio3
2020-11-15 14:23:21 +08:00
zonyitoo
8c9a024967
Add Socks5 UDP client, fixed compiler warnings
...
- Temporary disable default feature trust-dns, local-http-rustls
2020-11-15 14:23:21 +08:00
zonyitoo
50362bf227
Compat tokio v0.3 AsyncRead and other changes
...
- AsyncRead's ReadBuf API changes
- TcpStream::connect_std replaced by TcpSocket
- UdpSocket::split replaced by Arc<UdpSocket>
- Child's id() returns Option<u32> and doesn't impl Future anymore
- mio-uds have been deprecated, features are merged into mio
ref #301
2020-11-15 14:23:21 +08:00
zonyitoo
d6e2cee019
Renamed create_udp_socket_with_context to create_outbound_udp_socket for more precise meaning
2020-11-08 15:58:15 +08:00
zonyitoo
93365e8b51
Set SO_MARK on Linux for outbound UDP sockets
2020-11-08 15:51:25 +08:00
zonyitoo
90a4be9753
Set IPV6_BINDANY and SO_BINDANY on SOL_SOCKET properly
2020-11-07 12:35:20 +08:00
zonyitoo
8805e9fb84
Suppress warning of unused_mut
2020-11-07 12:35:20 +08:00
zonyitoo
e8292e5146
[ #303 ] Hide client errors into debug level
2020-11-07 00:25:55 +08:00