diff --git a/Cargo.lock b/Cargo.lock index 2d3513fd..5d49e2c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -404,7 +404,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -621,7 +621,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libsodium-ffi" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", @@ -941,7 +941,7 @@ dependencies = [ "pest_meta 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1245,7 +1245,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1285,7 +1285,7 @@ dependencies = [ "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "json5 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", - "libsodium-ffi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libsodium-ffi 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "md-5 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1377,7 +1377,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.31" +version = "0.15.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1392,7 +1392,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2053,7 +2053,7 @@ dependencies = [ "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" -"checksum libsodium-ffi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "bc94b67e718c7c2bd77619ce308ee62f93a55196457f536cdec07fae1fb95a2d" +"checksum libsodium-ffi 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "f1c5b499a9cf40a6abc3decd941b5df959f4baf8e958ab5372acb88b0cefdf64" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" @@ -2138,7 +2138,7 @@ dependencies = [ "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "702662512f3ddeb74a64ce2fbbf3707ee1b6bb663d28bb054e0779bbc720d926" -"checksum syn 0.15.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b4cfac95805274c6afdb12d8f770fa2d27c045953e7b630a81801953699a9a" +"checksum syn 0.15.32 (registry+https://github.com/rust-lang/crates.io-index)" = "846620ec526c1599c070eff393bfeeeb88a93afa2513fc3b49f1fea84cf7b0ed" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum tar 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)" = "c2167ff53da2a661702b3299f71a91b61b1dffef36b4b2884b1f9c67254c0133" "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" diff --git a/README.md b/README.md index 4853d6ee..f1147a38 100644 --- a/README.md +++ b/README.md @@ -12,18 +12,18 @@ shadowsocks is a fast tunnel proxy that helps you bypass firewalls. ## Dependencies -* libcrypto (OpenSSL) -* libsodium >= 1.0.7 (Required for ciphers that are provided by libsodium) +* libcrypto (OpenSSL) +* libsodium >= 1.0.7 (Required for ciphers that are provided by libsodium) ## Build & Install ### Optional Features -* `sodium` - Enabled linking to [`libsodium`](https://github.com/jedisct1/libsodium), which will also enable ciphers that depending on `libsodium`. +* `sodium` - Enabled linking to [`libsodium`](https://github.com/jedisct1/libsodium), which will also enable ciphers that depending on `libsodium`. -* `rc4` - Enabled `rc4` encryption algorithm. Some OpenSSL Crypto does not ship with `rc4`, because it was already deprecated in 2015. +* `rc4` - Enabled `rc4` encryption algorithm. Some OpenSSL Crypto does not ship with `rc4`, because it was already deprecated in 2015. -* `single-threaded` - Let `sslocal` and `ssserver` run in single threaded mode (by using `tokio::current_thread::Runtime`). +* `single-threaded` - Let `sslocal` and `ssserver` run in single threaded mode (by using `tokio::current_thread::Runtime`). Default features: `["sodium", "rc4"]`. @@ -41,7 +41,7 @@ then you can find `sslocal` and `ssserver` in `$CARGO_HOME/bin`. Requirements: -* Linux x86\_64 +* Linux x86\_64 Download static-linked build [here](https://github.com/shadowsocks/shadowsocks-rust/releases). @@ -73,7 +73,7 @@ For Windows users, if you have encountered any problem in building, check and di Requirements: -* Docker +* Docker ```bash ./build/build-release @@ -81,8 +81,8 @@ Requirements: Then `sslocal`, `ssserver` and `ssurl` will be packaged in -- `./build/shadowsocks-latest-release.x86_64-unknown-linux-musl.tar.gz` -- `./build/shadowsocks-latest-release.x86_64-unknown-linux-musl.tar.xz` +* `./build/shadowsocks-latest-release.x86_64-unknown-linux-musl.tar.gz` +* `./build/shadowsocks-latest-release.x86_64-unknown-linux-musl.tar.xz` Read `Cargo.toml` for more details. @@ -134,15 +134,15 @@ Start local and server ShadowSocks with If you Build it with Makefile: ```bash -$ sslocal -c config.json -$ ssserver -c config.json +sslocal -c config.json +ssserver -c config.json ``` If you Build it with Cargo: ```bash -$ cargo run --bin sslocal -- -c config.json -$ cargo run --bin ssserver -- -c config.json +cargo run --bin sslocal -- -c config.json +cargo run --bin ssserver -- -c config.json ``` List all available arguments with `-h`. @@ -153,33 +153,33 @@ Local client ```bash # Read local client configuration from file -$ sslocal -c /path/to/shadowsocks.json +sslocal -c /path/to/shadowsocks.json # Pass all parameters via command line -$ sslocal -b "127.0.0.1:1080" -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --plugin "obfs-local" --plugin-opts "obfs=tls" +sslocal -b "127.0.0.1:1080" -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --plugin "obfs-local" --plugin-opts "obfs=tls" # Pass server with SIP002 URL -$ sslocal -b "127.0.0.1:1080" --server-url "ss://YWVzLTI1Ni1nY206cGFzc3dvcmQ@127.0.0.1:8388/?plugin=obfs-local%3Bobfs%3Dtls" +sslocal -b "127.0.0.1:1080" --server-url "ss://YWVzLTI1Ni1nY206cGFzc3dvcmQ@127.0.0.1:8388/?plugin=obfs-local%3Bobfs%3Dtls" ``` Server ```bash # Read server configuration from file -$ ssserver -c /path/to/shadowsocks.json +ssserver -c /path/to/shadowsocks.json # Pass all parameters via command line -$ ssserver -s "[::]:8388" -m "aes-256-gcm" -k "hello-kitty" --plugin "obfs-server" --plugin-opts "obfs=tls" +ssserver -s "[::]:8388" -m "aes-256-gcm" -k "hello-kitty" --plugin "obfs-server" --plugin-opts "obfs=tls" ``` DNS Local server ```bash # Read configuration from file -$ ssdns -c /path/to/shadowsocks.json +ssdns -c /path/to/shadowsocks.json # Pass all parameters via command line -$ ssdns -s "[::]:8388" -m "aes-256-gcm" -k "hello-kitty" --dns "8.8.8.8:53" +ssdns -s "[::]:8388" -m "aes-256-gcm" -k "hello-kitty" --dns "8.8.8.8:53" ``` For DNS relay server, you can set remote DNS server in configuration file with `dns` key in root object. @@ -194,17 +194,17 @@ For DNS relay server, you can set remote DNS server in configuration file with ` ### Stream Ciphers -* `aes-128-cfb`, `aes-128-cfb1`, `aes-128-cfb8`, `aes-128-cfb128` -* `aes-256-cfb`, `aes-256-cfb1`, `aes-256-cfb8`, `aes-256-cfb128` -* `rc4`, `rc4-md5` -* `chacha20`, `salsa20`, `chacha20-ietf` -* `plain` (No encryption, just for debugging) +* `aes-128-cfb`, `aes-128-cfb1`, `aes-128-cfb8`, `aes-128-cfb128` +* `aes-256-cfb`, `aes-256-cfb1`, `aes-256-cfb8`, `aes-256-cfb128` +* `rc4`, `rc4-md5` +* `chacha20`, `salsa20`, `chacha20-ietf` +* `plain` (No encryption, just for debugging) ### AEAD Ciphers -* `aes-128-gcm`, `aes-256-gcm` -* `chacha20-ietf-poly1305`, `xchacha20-ietf-poly1305` -* `aes-128-pmac-siv`, `aes-256-pmac-siv` (experimental) +* `aes-128-gcm`, `aes-256-gcm` +* `chacha20-ietf-poly1305`, `xchacha20-ietf-poly1305` +* `aes-128-pmac-siv`, `aes-256-pmac-siv` (experimental) ## Useful Tools @@ -218,26 +218,26 @@ For DNS relay server, you can set remote DNS server in configuration file with ` It supports the following features: -- [x] Socks5 CONNECT command -- [x] UDP ASSOCIATE command (partial) -- [ ] HTTP Proxy protocol Deprecated, use `privoxy` instead. -- [x] Various crypto algorithms -- [x] Load balancing (multiple servers) -- [x] [SIP004](https://github.com/shadowsocks/shadowsocks-org/issues/30) AEAD ciphers -- [x] [SIP003](https://github.com/shadowsocks/shadowsocks-org/issues/28) Plugins -- [x] [SIP002](https://github.com/shadowsocks/shadowsocks-org/issues/27) Extension ss URLs +* [x] Socks5 CONNECT command +* [x] UDP ASSOCIATE command (partial) +* [ ] HTTP Proxy protocol Deprecated, use `privoxy` instead. +* [x] Various crypto algorithms +* [x] Load balancing (multiple servers) +* [x] [SIP004](https://github.com/shadowsocks/shadowsocks-org/issues/30) AEAD ciphers +* [x] [SIP003](https://github.com/shadowsocks/shadowsocks-org/issues/28) Plugins +* [x] [SIP002](https://github.com/shadowsocks/shadowsocks-org/issues/27) Extension ss URLs ## TODO -- [x] Documentation -- [x] Extend configuration format -- [x] Improved logging format (waiting for the new official log crate) -- [ ] Support more ciphers without depending on `libcrypto` (waiting for an acceptable Rust crypto lib implementation) -- [x] Windows support. (Depending on mio and coio-rs) -- [x] Build with stable. (Depending on coio) -- [ ] Support HTTP Proxy protocol (it is easy to use another tools to convert HTTP proxy protocol to Socks5, like `privoxy`) -- [ ] One-time Auth. (Already deprecated according to Shadowsocks' community) -- [x] AEAD ciphers. (proposed in [SIP004](https://github.com/shadowsocks/shadowsocks-org/issues/30), still under discussion) +* [x] Documentation +* [x] Extend configuration format +* [x] Improved logging format (waiting for the new official log crate) +* [ ] Support more ciphers without depending on `libcrypto` (waiting for an acceptable Rust crypto lib implementation) +* [x] Windows support. (Depending on mio and coio-rs) +* [x] Build with stable. (Depending on coio) +* [ ] Support HTTP Proxy protocol (it is easy to use another tools to convert HTTP proxy protocol to Socks5, like `privoxy`) +* [ ] One-time Auth. (Already deprecated according to Shadowsocks' community) +* [x] AEAD ciphers. (proposed in [SIP004](https://github.com/shadowsocks/shadowsocks-org/issues/30), still under discussion) ## License