Skip to content

Commit

Permalink
Deprecate -key option in README
Browse files Browse the repository at this point in the history
-key will be phased out due to lack of client support.
  • Loading branch information
riobard committed Apr 15, 2018
1 parent 5580b11 commit 7358a5c
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ GoDoc at https://godoc.org/github.com/shadowsocks/go-shadowsocks2/

## Install


Pre-built binaries for common platforms are available at https://github.com/shadowsocks/go-shadowsocks2/releases

Install from source
Expand All @@ -29,13 +28,12 @@ go get -u -v github.com/shadowsocks/go-shadowsocks2

## Basic Usage


### Server

Start a server listening on port 8488 using `AEAD_CHACHA20_POLY1305` AEAD cipher with password `your-password`.

```sh
go-shadowsocks2 -s ss://AEAD_CHACHA20_POLY1305:your-password@:8488 -verbose
shadowsocks2 -s 'ss://AEAD_CHACHA20_POLY1305:your-password@:8488' -verbose
```


Expand All @@ -46,9 +44,9 @@ connections, and tunnels both UDP and TCP on port 8053 and port 8054 to 8.8.8.8:
respectively.

```sh
go-shadowsocks2 -c ss://AEAD_CHACHA20_POLY1305:your-password@[server_address]:8488 \
-verbose -socks :1080 -u -udptun :8053=8.8.8.8:53,:8054=8.8.4.4:53 \
-tcptun :8053=8.8.8.8:53,:8054=8.8.4.4:53
shadowsocks2 -c 'ss://AEAD_CHACHA20_POLY1305:your-password@[server_address]:8488' \
-verbose -socks :1080 -u -udptun :8053=8.8.8.8:53,:8054=8.8.4.4:53 \
-tcptun :8053=8.8.8.8:53,:8054=8.8.4.4:53
```

Replace `[server_address]` with the server's public address.
Expand All @@ -57,27 +55,6 @@ Replace `[server_address]` with the server's public address.
## Advanced Usage


### Use random keys instead of passwords

A random key is almost always better than a password. Generate a base64url-encoded 16-byte random key

```sh
go-shadowsocks2 -keygen 16
```

Start a server listening on port 8848 using `AEAD_AES_128_GCM` AEAD cipher with the key generated above.

```sh
go-shadowsocks2 -s :8488 -cipher AEAD_AES_128_GCM -key k5yEIX5ciUDpkpdtvZm7zQ== -verbose
```

And the corresponding client to connect to it.

```sh
go-shadowsocks2 -c [server_address]:8488 -cipher AEAD_AES_128_GCM -key k5yEIX5ciUDpkpdtvZm7zQ== -verbose
```


### Netfilter TCP redirect (Linux only)

The client offers `-redir` and `-redir6` (for IPv6) options to handle TCP connections
Expand All @@ -88,8 +65,7 @@ Start a client listening on port 1082 for redirected TCP connections and port 10
TCP IPv6 connections.

```sh
go-shadowsocks2 -c [server_address]:8488 -cipher AEAD_AES_128_GCM -key k5yEIX5ciUDpkpdtvZm7zQ== \
-redir :1082 -redir6 :1083
shadowsocks2 -c 'ss://AEAD_CHACHA20_POLY1305:your-password@[server_address]:8488' -redir :1082 -redir6 :1083
```


Expand All @@ -110,8 +86,7 @@ Start a client on the same machine with the server. The client listens on port 1
and tunnels to localhost:5201 where iperf3 is listening.

```sh
go-shadowsocks2 -c [server_address]:8488 -cipher AEAD_AES_128_GCM -key k5yEIX5ciUDpkpdtvZm7zQ== \
-tcptun :1090=localhost:5201
shadowsocks2 -c 'ss://AEAD_CHACHA20_POLY1305:your-password@[server_address]:8488' -tcptun :1090=localhost:5201
```

Start iperf3 client to connect to the tunneld port instead
Expand All @@ -128,4 +103,3 @@ The code base strives to
- be idiomatic Go and well organized;
- use fewer external dependences as reasonably possible;
- only include proven modern ciphers;

0 comments on commit 7358a5c

Please sign in to comment.