Commit Graph
174 Commits
Author SHA1 Message Date
zonyitoo fc17623c9e add useful logs about association drops 2020-12-22 00:28:10 +08:00
ty 07583f3cc8 Refactored and separate library into crates (#345)
* Refactored and separate library into crates

- shadowsocks: the core feature of shadowsocks
- shadowsocks-service: library for building shadowsocks services
    - dns, http, redir, socks, tunnel
    - load balancer
- shadowsocks-rust: release binaries

fix #347

* unified DnsResolver implementation

* unified local service common parameters into ServiceContext

- ServiceContext is common parameters shared between all local
implementations
- Completely removed https local support

* add #292 reply attack protection

* migrated redir local server

* support customizing outbound socket bind address

* manager outbound socket should accepts connect_opts

* republic local implementations

* socks5 udp server should always listen to client address

* socks4 controlled by local-socks4 feature

* socks4 also obey mode configuration

* socks server tcp cannot be disable. add support of udp-bind-addr parameter

* add udp-bind-addr for customizing udp-relay bind-addr

* local-dns infra, support customizing resolver

* fully implements DNS relay server

* support binding to specific interface on Linux-like platform

* tcp cannot be disabled in socks

* enable local-flow-stat

* fixed windows build

* fixed android specific warnings and compile errors

* allow udp_only mode in socks5

* dns relay listens to both TCP and UDP, mode controls outbound upstreams

* dns relay retries twice if request failed

* doc

* fix DnsClient typo

* fix stream EncryptWriter bug

* allow disable logging output

updated dependencies

* add readme

* refine doc

* remove depending on trust-dns-client

* socks4/4a client

* allow socks5 udp_only mode, fixes compile warning

* create standalone socks5 UDP relay server

- socks5 UDP association full cone (NAT2)

* server udp relay supports full cone (NAT2)

* acl moved to crate root

* redir udp relay support full cone (NAT2)

* standard socks5 udp test must use tcp_and_udp mode

* set server context fields with pub APIs

* udp_max_associations and udp_timeout default value set in Config

* local dns resolver retry with fixed attempts

* max_udp_association keeps unlimited by default

* fixed logging binary name

* pops first exited future result for local and server

* update reverse target index cache

* fix ProxyClientStreamWriteHalf that allows sending empty buffers

ref #232

* remove unused import when socks4 is disabled

* make balancer become a globally shared object

* print plugin exit status

* control local, server, manager services in features
2020-12-20 19:06:21 +08:00
zonyitoo 6880c5892c Renamed library back to shadowsocks
- ref #326
- Binary crate will keep shadowsocks-rust's name
2020-12-01 09:09:46 +08:00
zonyitoo 5451714b79 Compatible with local_address missing in configuration
ref #332
2020-11-29 15:14:05 +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 5d42ac9371 Update Cargo.lock for trust-dns's commit hash
fix #325
2020-11-26 01:34:27 +08:00
zonyitoo 3184c9c02b Upgrade json5 to v0.3 for compatible with non-BMP unicode 2020-11-24 20:55:41 +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 e9366e1236 strum is still required for RedirType 2020-11-21 14:07:16 +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 2d533e0592 ProxyUpstream sending queries with both TCP & UDP if possible 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 2f3a6d34bf Deps to hyper and tower dev branch 2020-11-15 14:23:21 +08:00
zonyitoo 08d0871742 Support SIP008 extend server fields server, server_port, remarks 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 8b313a2d5d Master is now v1.8.24 2020-11-03 01:51:09 +08:00
zonyitoo bf6f2002e4 Master is now v1.8.23 2020-11-02 01:59:06 +08:00
zonyitoo 3a5034e161 TCP detect portal URL switched to firefox's service
- Master is now v1.8.22
- ref #180
2020-11-02 01:16:04 +08:00
zonyitoo 0b2d7aa900 Release v1.8.21 2020-11-01 21:53:40 +08:00
zonyitoo 98863cc8d9 [#308] Support daemonize on *nix platforms 2020-11-01 01:16:37 +08:00
zonyitoo 89e0f940ae Switch logger to log4rs for more configurable features 2020-10-30 22:49:44 +08:00
zonyitoo ead8e9a3a8 Master is now v1.8.21 2020-10-14 01:18:21 +08:00
zonyitoo 91142cb57d UDP relay replies with domain address as the client requests
- Updated dependencies minor versions
2020-10-14 00:46:08 +08:00
zonyitoo f44309a0bf Fixed bug, UDP association bypass task should just copy directly 2020-10-13 21:56:55 +08:00
zonyitoo 62df315922 Reset version to v1.8.20 2020-10-12 10:50:01 +08:00
zonyitoo 0d675b36e6 Release v1.8.20-alpha.1
- Release macos build with gnu-tar
- Updated openssl-src and other dependencies
2020-10-12 10:07:54 +08:00
zonyitoo 945ebacd76 set COPYFILE_DISABLE on macos runner, use gnu-tar instead of bsd-tar on github action 2020-10-12 10:05:30 +08:00
zonyitoo 3b21cc3cec Master is now v1.8.20 2020-10-11 17:20:49 +08:00
zonyitoo 367f64585b Updated acl generate script and dependencies 2020-10-11 15:34:25 +08:00
zonyitoo eec4b4a43b Master is now v1.8.19 2020-09-15 10:36:23 +08:00
zonyitoo 0904d84485 Updated dependencies 2020-09-15 10:11:43 +08:00
zonyitoo 9ef4c29f34 Master is now v1.8.18 2020-09-09 22:04:55 +08:00
zonyitoo 1bb92d3684 Master is now v1.8.17 2020-08-20 22:50:13 +08:00
zonyitoo 3ff5666371 Updated dependencies 2020-08-20 14:14:29 +08:00
zonyitoo 0b87f7413e Master is now v1.8.16 2020-08-10 01:19:12 +08:00
zonyitoo 30db05fbea Updated dependencies 2020-08-10 01:12:54 +08:00
zonyitoo 663be08c9d Make a formal release of v1.8.14 2020-08-09 01:06:49 +08:00
zonyitoo 22f25a20ca Update dependencies for triggering rebuild 2020-08-07 01:06:30 +08:00
zonyitoo 23c2695b3d Support mimalloc and tcmalloc 2020-08-04 00:08:49 +08:00
zonyitoo 357e1a06f5 Uses tokio *_buf APIs for better styling, kill plugins when Dropped 2020-08-03 02:09:17 +08:00
zonyitoo efd9e7747d Master is now v1.8.14 2020-07-22 00:22:05 +08:00
zonyitoo 5324ab7829 Removed unnecessary ACL cache 2020-07-13 23:03:14 +08:00
zonyitoo ad12d59d12 AEAD TCP protocol should check the reserved higher 2 bits
- https://shadowsocks.org/en/spec/AEAD-Ciphers.html
- Higher 2 bits are reserved for future use
2020-07-04 22:11:43 +08:00
zonyitoo a940a4085f [#272] Support customizing manager created server's bind address 2020-06-28 21:05:18 +08:00
zonyitoo a27c3902e0 Do not panic for listen error 2020-06-21 22:03:41 +08:00