Commit Graph
316 Commits
Author SHA1 Message Date
zonyitoo f0f1ab59cd properly set available redir types for TCP and UDP separately 2021-05-15 00:40:21 +08:00
zonyitoo 6c75ce19f4 support snmalloc and rpmalloc 2021-05-07 11:35:35 +08:00
ty 8a27bb296c support TFO on Linux, FreeBSD, macOS and Windows (#487)
- ref #184
2021-04-25 23:31:13 +08:00
zonyitoo df83d24c5f release v1.10.9 2021-04-23 23:58:08 +08:00
zonyitoo 49b7004d75 Removes non-standard AEAD ciphers that have variable nonce length
- ref shadowsocks-crypto v0.2.4
- release v1.10.8
2021-04-18 21:02:45 +08:00
zonyitoo c842557bc4 support sm4-gcm and sm4-ccm 2021-04-17 22:46:39 +08:00
zonyitoo 40764b70aa update shadowsocks-crypto to v0.2.1
- updated crypto2 to 0.1.2
- support AEAD extra ciphers with aead-cipher-extra
- fixes shadowsocks/shadowsocks-android#2663
- ref shadowsocks/shadowsocks-crypto#8
2021-04-17 21:28:24 +08:00
zonyitoo f805b5d350 Fixed bug, concatenated buffer kept available before first write successfully 2021-04-10 09:22:53 +08:00
zonyitoo 1746c624fc release v1.10.4 2021-04-09 17:25:04 +08:00
zonyitoo fff5600d02 release v1.10.3 2021-04-07 09:55:40 +08:00
zonyitoo 7b493baa71 fixed basic config format mode for local instance
- release v1.10.2
2021-03-28 11:13:01 +08:00
zonyitoo 32640208fa release v1.10.1 2021-03-26 23:00:04 +08:00
zonyitoo 614640ca14 updated tokio to v1.4 and bloomfilter to v1.0.5 2021-03-22 16:52:09 +08:00
zonyitoo 435de948b9 updated dependencies, tokio v1.3 2021-03-14 17:09:41 +08:00
zonyitoo 6bebb6c6c0 support multiple local servers in configuration file
ref #452

- support `locals` in configuration file, running multiple local server
  instance simultaneously
- support `unix://` in `dns` configuration

BREAKING CHANGE:

- `sslocal`'s `--dns-addr` is now only available in Android
- shadowsocks-service's `Config` struct have lots of changes
2021-03-14 17:09:41 +08:00
zonyitoo 4a08d400f3 release v1.9.2 2021-03-06 01:19:53 +08:00
zonyitoo f1f895e511 release v1.9.1 2021-02-26 19:06:02 +08:00
zonyitoo 63be38deca updated tokio 2021-02-07 09:33:17 +08:00
dependabot-preview[bot] 97bd5ae24c Bump tokio from 1.0.2 to 1.1.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.0.2 to 1.1.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.0.2...tokio-1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-25 16:41:26 +08:00
zonyitoo 9000b31ffb Disable deprecated stream ciphers by default
- Enable stream ciphers explicitly with stream-cipher feature
- Upgraded shadowsocks-crypto to v0.1.2

fixes #373
2021-01-04 23:09:12 +08:00
zonyitoo 47169d6fc1 BREAKING: completely deprecated local-dns-relay and single-threaded features 2021-01-04 22:01:34 +08:00
zonyitoo 7bf6d320a7 uses multi-threaded to enable tokio's multi-thread runtime
- single-threaded is kept for compatible
2021-01-03 11:21:29 +08:00
zonyitoo c1bb097cfa Start single-threaded mode with command opt 2021-01-02 21:09:49 +08:00
zonyitoo 75c28313ea disable https by default, let users to choose which TLS library to use 2020-12-30 10:09:34 +08:00
ty 303f96c61f Upgrade to tokio 1.0 (#358)
* upgrade to tokio v1.0

- removed tokio::prelude
- upgrade hyper to v0.14, tokio-rustls to v0.22

still working on migrating trust-dns-* and tokio-native-tls

ref #354

* tokio v1.0 removed with_poll

fix #355, ref #354

* removed CTRL-BREAK signal handler

ref #354

* fixes compliation error, add missing return

fixes #355

* allow setting SO_SNDBUF and SO_RCVBUF for sockets

ref #352

* completely removed unix socket based DNS resolving

ref shadowsocks/shadowsocks-android#2622

* fix build issue on Windows

* fixed uds poll_write loop, fixed udp outbound loopback check

ref #355

* disable default trust-dns resolver for andorid, macos, ios

This commit also:

- Optimized resolve() logging with elapsed time
- updated tokio-native-tls

* local-dns removed from default features

* fix rustc version with rust-toolchain

* Bump bytes from 0.6.0 to 1.0.0

* add dependabot badge

* indirectly depend on trust_dns_proto via trust_dns_resolver

* auto reconnect if udp sendto failed

* recreate proxied socket if recv() returns failure

* increase score precision to 0.0001

* example of log4rs configuration

* PingBalancer instance shouldn't kill probing task when dropping

- Probing task should be controlled by the internal shared state

* switch to trust-dns main for latest tokio 1.0 support
2020-12-28 10:10:19 +08:00
dependabot-preview[bot] 12b96eaa94 Bump log4rs from 0.13.0 to 1.0.0
Bumps [log4rs](https://github.com/estk/log4rs) from 0.13.0 to 1.0.0.
- [Release notes](https://github.com/estk/log4rs/releases)
- [Changelog](https://github.com/estk/log4rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/estk/log4rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-27 00:18:19 +08:00
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
ty a7c9f75d07 Revert "minimize target file size"
This reverts commit d0fc26317d.
2020-12-15 18:30:41 +08:00
kimw d0fc26317d minimize target file size 2020-12-11 20:02:54 +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 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 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 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 cf094ca59b Add back local-dns-relay feature for backward compat 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 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 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 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