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.

122 lines
4.4 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
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  1. .ig
  2. . manual page for shadowsocks-libev
  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 25, 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 several
  65. encryption methods: table, rc4, aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb,
  66. camellia-128-cfb, camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb,
  67. idea-cfb, rc2-cfb and seed-cfb. The default method is \fItable\fP.
  68. .TP
  69. .B \-f \fIpid_file\fP
  70. Start shadowsocks as a daemon with a specific pid file.
  71. .TP
  72. .B \-t \fItimeout\fP
  73. Set the socket timeout in secondes. The default value is 10.
  74. .TP
  75. .B \-c \fIconfig_file\fP
  76. Use a configuration file.
  77. .SH EXAMPLE
  78. \*(Re needs to be used with the NAT function. Here is an example:
  79. # Create new chain
  80. root@Wrt:~# iptables -t nat -N SHADOWSOCKS
  81. # Ignore your shadowsocks server's addresses
  82. # It's very IMPORTANT, just be careful.
  83. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN
  84. # Ignore LANs and any other addresses you'd like to bypass the proxy
  85. # See Wikipedia and RFC5735 for full list of reserved networks.
  86. # See ashi009/bestroutetb for a highly optimized CHN route list.
  87. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
  88. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
  89. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
  90. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
  91. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
  92. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
  93. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
  94. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN
  95. # Anything else should be redirected to shadowsocks's local port
  96. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345
  97. # Apply the rules
  98. root@Wrt:~# iptables -t nat -A OUTPUT -p tcp -j SHADOWSOCKS
  99. # Start the shadowsocks-redir
  100. root@Wrt:~# ss-redir -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid
  101. .SH SEE ALSO
  102. .BR iptables (8),
  103. /etc/shadowsocks/config.json
  104. .br
  105. .SH AUTHOR
  106. shadowsocks was created by clowwindy <clowwindy42@gmail.com> and
  107. shadowsocks-libev was maintained by Max Lv <max.c.lv@gmail.com>.
  108. .PP
  109. This manual page was written by Max Lv <max.c.lv@gmail.com>.