You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
4.2 KiB

Asciidoc man page rework (#699) * Add 'tunnel_address' support for json config parser And allow ss-tunnel to use the newly introduced parser. Signed-off-by: Adam Anonymous <anonymous_temp_user@yahoo.co.jp> * Add "mode" support for jconf Now jconf supports "mode" setting, allowed values are "tcp_only", "tcp_and_udp" and "udp_only". Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Use jconf "mode" for server/local/tunnel/manager Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Add per-project vimrc to gitignore As the coding style differs from kernel and other projects, so such project vimrc should be helpful. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Introduce asciidoc based documentation framework Use asciidoc for new documentation framework, which could not only output man pages, but also htmls. And asciidoc documentation is much more human-readable than roff man pages. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert shadowsocks-libev man page to asciidoc The port to asciidoc has some format change compared to old one. The most obvious one is the options listed in SYNOPSIS. Now the options list is not split into 2/3 columns, or we must use asciidoc tables and introduce table frames. Other small change includes the removal of AUTHOR sector, as it's not an expendable method to update AUTHOR sector every time it gets updated. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-local man page to asciidoc Also modify gitignore, since it use too generic rules to ignore such documentation. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-manager man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-nat man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-redir man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-server man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-tunnel man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Remove old roff man pages Welcome to the new age of asciidoc. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Add equivalent tables for command line options and config file Now user can get a more clear view of config file and command line options. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
8 years ago
8 years ago
Asciidoc man page rework (#699) * Add 'tunnel_address' support for json config parser And allow ss-tunnel to use the newly introduced parser. Signed-off-by: Adam Anonymous <anonymous_temp_user@yahoo.co.jp> * Add "mode" support for jconf Now jconf supports "mode" setting, allowed values are "tcp_only", "tcp_and_udp" and "udp_only". Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Use jconf "mode" for server/local/tunnel/manager Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Add per-project vimrc to gitignore As the coding style differs from kernel and other projects, so such project vimrc should be helpful. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Introduce asciidoc based documentation framework Use asciidoc for new documentation framework, which could not only output man pages, but also htmls. And asciidoc documentation is much more human-readable than roff man pages. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert shadowsocks-libev man page to asciidoc The port to asciidoc has some format change compared to old one. The most obvious one is the options listed in SYNOPSIS. Now the options list is not split into 2/3 columns, or we must use asciidoc tables and introduce table frames. Other small change includes the removal of AUTHOR sector, as it's not an expendable method to update AUTHOR sector every time it gets updated. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-local man page to asciidoc Also modify gitignore, since it use too generic rules to ignore such documentation. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-manager man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-nat man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-redir man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-server man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-tunnel man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Remove old roff man pages Welcome to the new age of asciidoc. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Add equivalent tables for command line options and config file Now user can get a more clear view of config file and command line options. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
8 years ago
8 years ago
Asciidoc man page rework (#699) * Add 'tunnel_address' support for json config parser And allow ss-tunnel to use the newly introduced parser. Signed-off-by: Adam Anonymous <anonymous_temp_user@yahoo.co.jp> * Add "mode" support for jconf Now jconf supports "mode" setting, allowed values are "tcp_only", "tcp_and_udp" and "udp_only". Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Use jconf "mode" for server/local/tunnel/manager Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Add per-project vimrc to gitignore As the coding style differs from kernel and other projects, so such project vimrc should be helpful. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Introduce asciidoc based documentation framework Use asciidoc for new documentation framework, which could not only output man pages, but also htmls. And asciidoc documentation is much more human-readable than roff man pages. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert shadowsocks-libev man page to asciidoc The port to asciidoc has some format change compared to old one. The most obvious one is the options listed in SYNOPSIS. Now the options list is not split into 2/3 columns, or we must use asciidoc tables and introduce table frames. Other small change includes the removal of AUTHOR sector, as it's not an expendable method to update AUTHOR sector every time it gets updated. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-local man page to asciidoc Also modify gitignore, since it use too generic rules to ignore such documentation. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-manager man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-nat man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-redir man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-server man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-tunnel man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Remove old roff man pages Welcome to the new age of asciidoc. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Add equivalent tables for command line options and config file Now user can get a more clear view of config file and command line options. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
8 years ago
  1. ss-redir(1)
  2. ===========
  3. NAME
  4. ----
  5. ss-redir - shadowsocks client as transparent proxy, libev port
  6. SYNOPSIS
  7. --------
  8. *ss-redir*
  9. [-AuUv] [-h|--help]
  10. [-s <server_host>] [-p <server_port>] [-l <local_port>]
  11. [-k <password>] [-m <encrypt_method>] [-f <pid_file>]
  12. [-t <timeout>] [-c <config_file>] [-b <local_address>]
  13. [-a <user_name>] [-n <nofile>] [--mtu <MTU>]
  14. DESCRIPTION
  15. -----------
  16. *Shadowsocks-libev* is a lightweight and secure socks5 proxy.
  17. It is a port of the original shadowsocks created by clowwindy.
  18. *Shadowsocks-libev* is written in pure C and takes advantage of libev to
  19. achieve both high performance and low resource consumption.
  20. *Shadowsocks-libev* consists of five components.
  21. `ss-redir`(1) works as a transparent proxy on local machines to proxy TCP
  22. traffic and requires netfilter's NAT module.
  23. For more information, check out `shadowsocks-libev`(8) and the following
  24. 'EXAMPLE' section.
  25. OPTIONS
  26. -------
  27. -s <server_host>::
  28. Set the server's hostname or IP.
  29. -p <server_port>::
  30. Set the server's port number.
  31. -l <local_port>::
  32. Set the local port number.
  33. -k <password>::
  34. Set the password. The server and the client should use the same
  35. password.
  36. -m <encrypt_method>::
  37. Set the cipher.
  38. +
  39. *Shadowsocks-libev* accepts 18 different ciphers:
  40. +
  41. table, rc4, rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb,
  42. camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb,
  43. idea-cfb, rc2-cfb, seed-cfb, salsa20, chacha20 and chacha20-ietf.
  44. +
  45. The default cipher is 'table'.
  46. +
  47. If built with PolarSSL or custom OpenSSL libraries, some of
  48. these ciphers may not work.
  49. -a <user_name>::
  50. Run as a specific user.
  51. -f <pid_file>::
  52. Start shadowsocks as a daemon with specific pid file.
  53. -t <timeout>::
  54. Set the socket timeout in seconds. The default value is 60.
  55. -c <config_file>::
  56. Use a configuration file.
  57. +
  58. Refer to `shadowsocks-libev`(8) 'CONFIG FILE' section for more details.
  59. -n <number>::
  60. Specify max number of open files.
  61. +
  62. Only available on Linux.
  63. -b <local_address>::
  64. Specify local address to bind.
  65. -u::
  66. Enable UDP relay.
  67. +
  68. TPROXY is required in redir mode. You may need root permission.
  69. -U::
  70. Enable UDP relay and disable TCP relay.
  71. -A::
  72. Enable onetime authentication.
  73. --mtu <MTU>::
  74. Specify the MTU of your network interface.
  75. --mptcp::
  76. Enable Multipath TCP.
  77. +
  78. Only available with MPTCP enabled Linux kernel.
  79. -v::
  80. Enable verbose mode.
  81. -h|--help::
  82. Print help message.
  83. EXAMPLE
  84. -------
  85. ss-redir requires netfilter's NAT function. Here is an example:
  86. ....
  87. # Create new chain
  88. root@Wrt:~# iptables -t nat -N SHADOWSOCKS
  89. # Ignore your shadowsocks server's addresses
  90. # It's very IMPORTANT, just be careful.
  91. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN
  92. # Ignore LANs and any other addresses you'd like to bypass the proxy
  93. # See Wikipedia and RFC5735 for full list of reserved networks.
  94. # See ashi009/bestroutetb for a highly optimized CHN route list.
  95. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
  96. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
  97. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
  98. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
  99. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
  100. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
  101. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
  102. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN
  103. # Anything else should be redirected to shadowsocks's local port
  104. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345
  105. # Add any UDP rules
  106. root@Wrt:~# ip rule add fwmark 0x01/0x01 table 100
  107. root@Wrt:~# ip route add local 0.0.0.0/0 dev lo table 100
  108. root@Wrt:~# iptables -t mangle -A SHADOWSOCKS -p udp --dport 53 -j TPROXY --on-port 12345 --tproxy-mark 0x01/0x01
  109. # Apply the rules
  110. root@Wrt:~# iptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS
  111. root@Wrt:~# iptables -t mangle -A PREROUTING -j SHADOWSOCKS
  112. # Start the shadowsocks-redir
  113. root@Wrt:~# ss-redir -u -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid
  114. ....
  115. SEE ALSO
  116. --------
  117. `ss-local`(1),
  118. `ss-server`(1),
  119. `ss-tunnel`(1),
  120. `ss-manager`(1),
  121. `shadowsocks-libev`(8),
  122. `iptables`(8),
  123. /etc/shadowsocks-libev/config.json