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.

120 lines
4.2 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  1. .ig
  2. . manual page for NEW and IMPROVED linux top
  3. .
  4. . Copyright (c) 2012-2013, by: Max Lv
  5. . All rights reserved.
  6. .
  7. . Permission is granted to copy, distribute and/or modify this document
  8. . under the terms of the GNU Free Documentation License, Version 1.1 or
  9. . any later version published by the Free Software Foundation;
  10. . with no Front-Cover Texts, no Back-Cover Texts, and with the following
  11. . Invariant Sections (and any sub-sections therein):
  12. . all .ig sections, including this one
  13. . STUPID TRICKS Sampler
  14. . AUTHOR
  15. .
  16. . A copy of the Free Documentation License is included in the section
  17. . entitled "GNU Free Documentation License".
  18. .
  19. ..
  20. \# - these two are for chuckles, makes great grammar
  21. .ds Lo \fBss-local\fR
  22. .ds Re \fBss-redir\fR
  23. .ds Se \fBss-server\fR
  24. .ds Me \fBshadowsocks\fR
  25. .TH SHADOWSOCKS-LIBEV 8 "April 7, 2013"
  26. .SH NAME
  27. shadowsocks-libev \- a lightweight secured scoks5 proxy
  28. .SH SYNOPSIS
  29. \*(Lo|\*(Re|\*(Se
  30. \-s server_host \-p server_port
  31. \-l local_port \-k password
  32. \-m encrypt_method \-f pid_file
  33. \-t timeout \-c config_file
  34. .SH DESCRIPTION
  35. \*(Me is a lightweight secured socks5 proxy. It is a port of
  36. the original shadowsocks created by clowwindy. \*(Me is written in pure
  37. C and uses \fBlibev\fP to provide a both high performance and low resource
  38. consumption socks5 proxy for users that need a secured tunnel to visit the
  39. internet freely and privately.
  40. .PP
  41. \*(Me consists of three components. One is \*(Se that runs on a remote server
  42. to provide secured tunnel service. \*(Lo and \*(Re are clients that run on your
  43. local machines for proxying all your TCP traffic.
  44. .PP
  45. While \*(Lo can be used as a standard socks5 proxy, \*(Re works as a transparent
  46. proxy and should be used with the kernel's NAT function. For more information,
  47. check the example section.
  48. .SH OPTIONS
  49. .TP
  50. .B \-s \fIserver_host\fP
  51. Set the shadowsocks server host.
  52. .TP
  53. .B \-p \fIserver_port\fP
  54. Set the shadowsocks server port.
  55. .TP
  56. .B \-l \fIlocal_port\fP
  57. Listen on the local port.
  58. .TP
  59. .B \-k \fIpassword\fP
  60. Set the shadowsocks password. The server and the client should use the same
  61. password.
  62. .TP
  63. .B \-m \fIencrypt_method\fP
  64. Set the shadowsocks encryption method. Currently, shadowsocks accepts two
  65. encryption methods: table or rc4. And the default method is \fItable\fP.
  66. .TP
  67. .B \-f \fIpid_file\fP
  68. Start shadowsocks as a daemon with a specific pid file.
  69. .TP
  70. .B \-t \fItimeout\fP
  71. Set the socket timeout in secondes. The default value is 10.
  72. .TP
  73. .B \-c \fIconfig_file\fP
  74. Use a configuration file.
  75. .SH EXAMPLE
  76. \*(Re needs to be used with the NAT function. Here is an example:
  77. # Create new chain
  78. root@Wrt:~# iptables -t nat -N SHADOWSOCKS
  79. # Ignore your shadowsocks server's addresses
  80. # It's very IMPORTANT, just be careful.
  81. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN
  82. # Ignore LANs and any other addresses you'd like to bypass the proxy
  83. # See Wikipedia and RFC5735 for full list of reserved networks.
  84. # See ashi009/bestroutetb for a highly optimized CHN route list.
  85. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
  86. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
  87. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
  88. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
  89. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
  90. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
  91. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
  92. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN
  93. # Anything else should be redirected to shadowsocks's local port
  94. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345
  95. # Apply the rules
  96. root@Wrt:~# iptables -t nat -A OUTPUT -p tcp -j SHADOWSOCKS
  97. # Start the shadowsocks-redir
  98. root@Wrt:~# ss-redir -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid
  99. .SH SEE ALSO
  100. .BR iptables (8),
  101. /etc/shadowsocks/config.json
  102. .br
  103. .SH AUTHOR
  104. shadowsocks was created by clowwindy <clowwindy42@gmail.com> and
  105. shadowsocks-libev was maintained by Max Lv <max.c.lv@gmail.com>.
  106. .PP
  107. This manual page was written by Max Lv <max.c.lv@gmail.com>.