From 457fc589e77d3c4561865833801c4993ca9e010c Mon Sep 17 00:00:00 2001 From: Max Lv Date: Mon, 18 Aug 2014 13:25:21 +0800 Subject: [PATCH] update documents --- README.md | 24 ++++++++++++++++-------- shadowsocks.8 | 40 +++++++++++++++++++++++++++------------- src/utils.c | 24 ++++++++++++++++-------- 3 files changed, 59 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index a7bfa8ba..d696976e 100644 --- a/README.md +++ b/README.md @@ -180,29 +180,37 @@ Usage usage: ss-[local|redir|server|tunnel] + -s host name or ip address of your remote server -p port number of your remote server -l port number of your local server -k password of your remote server - [-m ] encrypt method, supporting table, rc4, + + [-m ] encrypt method: table, rc4, aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb, rc2-cfb and seed-cfb - [-f ] valid path to the pid file + [-f ] file to store the pid [-t ] socket timeout in seconds - [-c ] json format config file + [-c ] config file in json - [-i ] specific network interface to bind, + + [-i ] network interface to bind, not available in redir mode - [-b ] specific local address to bind, + [-b ] local address to bind, not available in server mode - [-u] udprelay mode to supprot udp traffic + [-u] enable udprelay mode not available in redir mode - [-L :] setup a local port forwarding tunnel + [-L :] setup a local port forwarding tunnel, only available in tunnel mode - [-v] verbose mode, debug output in console + [-v] verbose mode + + + [--fast-open] enable TCP fast open, + only available on Linux kernel > 3.7.0 + [--acl ] config file of ACL (Access Control List) notes: diff --git a/shadowsocks.8 b/shadowsocks.8 index ef65c193..fbc6e486 100644 --- a/shadowsocks.8 +++ b/shadowsocks.8 @@ -24,7 +24,7 @@ .ds Se \fBss-server\fR .ds Me \fBshadowsocks\fR -.TH SHADOWSOCKS-LIBEV 8 "April 25, 2013" +.TH SHADOWSOCKS-LIBEV 8 "August 18, 2014" .SH NAME shadowsocks-libev \- a lightweight secured scoks5 proxy @@ -38,17 +38,16 @@ shadowsocks-libev \- a lightweight secured scoks5 proxy .SH DESCRIPTION \*(Me is a lightweight secured socks5 proxy. It is a port of the original shadowsocks created by clowwindy. \*(Me is written in pure -C and uses \fBlibev\fP to provide a both high performance and low resource -consumption socks5 proxy for users that need a secured tunnel to visit the -internet freely and privately. +C and takes advantage of \fBlibev\fP to provide a socks5 proxy with both high +performance and low resource consumption. .PP \*(Me consists of three components. One is \*(Se that runs on a remote server to provide secured tunnel service. \*(Lo and \*(Re are clients that run on your local machines for proxying all your TCP traffic. .PP -While \*(Lo can be used as a standard socks5 proxy, \*(Re works as a transparent -proxy and should be used with the kernel's NAT function. For more information, -check the example section. +While \*(Lo is a standard socks5 proxy, \*(Re works as a transparent proxy and +requires netfilter's NAT function. For more information, check out the example +section. .SH OPTIONS .TP @@ -66,10 +65,11 @@ Set the shadowsocks password. The server and the client should use the same password. .TP .B \-m \fIencrypt_method\fP -Set the shadowsocks encryption method. Currently, shadowsocks accepts several -encryption methods: table, rc4, aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, -camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb, -idea-cfb, rc2-cfb and seed-cfb. The default method is \fItable\fP. +Set the cipher. Shadowsocks accepts 14 different ciphers: table, rc4, +aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, camellia-128-cfb, +camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb, rc2-cfb +and seed-cfb. The default method is \fItable\fP. If compiled with PolarSSL +or custom OpenSSL builds, some of these ciphers may not work. .TP .B \-f \fIpid_file\fP Start shadowsocks as a daemon with a specific pid file. @@ -79,11 +79,24 @@ Set the socket timeout in secondes. The default value is 10. .TP .B \-c \fIconfig_file\fP Use a configuration file. +.TP .B \-a \fIuser_name\fP Run as a specific user. +.TP +.B \-u +Enable UDP relay. +.TP +.B \-v +Enable verbose mode. +.TP +.B \--fast-open +Enable TCP fast open. +.TP +.B \--acl \fIacl_config\fP +Enable ACL (Access Control List). .SH EXAMPLE -\*(Re needs to be used with the NAT function. Here is an example: +\*(Re requires netfilter's NAT function. Here is an example: # Create new chain root@Wrt:~# iptables -t nat -N SHADOWSOCKS @@ -119,6 +132,7 @@ Run as a specific user. .br .SH AUTHOR shadowsocks was created by clowwindy and -shadowsocks-libev was maintained by Max Lv . +shadowsocks-libev was maintained by Max Lv and Linus Yang +. .PP This manual page was written by Max Lv . diff --git a/src/utils.c b/src/utils.c index 41df1a43..38ecb032 100644 --- a/src/utils.c +++ b/src/utils.c @@ -202,29 +202,37 @@ void usage() printf(" maintained by Max Lv and Linus Yang \n\n"); printf(" usage:\n\n"); printf(" ss-[local|redir|server|tunnel]\n"); + printf("\n"); printf(" -s host name or ip address of your remote server\n"); printf(" -p port number of your remote server\n"); printf(" -l port number of your local server\n"); printf(" -k password of your remote server\n"); printf("\n"); - printf(" [-m ] encrypt method, supporting table, rc4,\n"); + printf("\n"); + printf(" [-m ] encrypt method: table, rc4,\n"); printf(" aes-128-cfb, aes-192-cfb, aes-256-cfb,\n"); printf(" bf-cfb, camellia-128-cfb, camellia-192-cfb,\n"); printf(" camellia-256-cfb, cast5-cfb, des-cfb,\n"); printf(" idea-cfb, rc2-cfb and seed-cfb\n"); - printf(" [-f ] valid path to the pid file\n"); + printf(" [-f ] file to store the pid\n"); printf(" [-t ] socket timeout in seconds\n"); - printf(" [-c ] json format config file\n"); + printf(" [-c ] config file in json\n"); printf("\n"); - printf(" [-i ] specific network interface to bind,\n"); + printf("\n"); + printf(" [-i ] network interface to bind,\n"); printf(" not available in redir mode\n"); - printf(" [-b ] specific local address to bind,\n"); + printf(" [-b ] local address to bind,\n"); printf(" not available in server mode\n"); - printf(" [-u] udprelay mode to supprot udp traffic\n"); + printf(" [-u] enable udprelay mode\n"); printf(" not available in redir mode\n"); - printf(" [-L :] setup a local port forwarding tunnel\n"); + printf(" [-L :] setup a local port forwarding tunnel,\n"); printf(" only available in tunnel mode\n"); - printf(" [-v] verbose mode, debug output in console\n"); + printf(" [-v] verbose mode\n"); + printf("\n"); + printf("\n"); + printf(" [--fast-open] enable TCP fast open,\n"); + printf(" only available on Linux kernel > 3.7.0\n"); + printf(" [--acl ] config file of ACL (Access Control List)\n"); printf("\n"); }