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.

138 lines
4.6 KiB

11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
10 years ago
10 years ago
11 years ago
10 years ago
10 years ago
10 years ago
11 years ago
11 years ago
10 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
10 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 "August 18, 2014"
  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 takes advantage of \fBlibev\fP to provide a socks5 proxy with both high
  38. performance and low resource consumption.
  39. .PP
  40. \*(Me consists of three components. One is \*(Se that runs on a remote server
  41. to provide secured tunnel service. \*(Lo and \*(Re are clients that run on your
  42. local machines for proxying all your TCP traffic.
  43. .PP
  44. While \*(Lo is a standard socks5 proxy, \*(Re works as a transparent proxy and
  45. requires netfilter's NAT function. For more information, check out the example
  46. section.
  47. .SH OPTIONS
  48. .TP
  49. .B \-s \fIserver_host\fP
  50. Set the shadowsocks server host.
  51. .TP
  52. .B \-p \fIserver_port\fP
  53. Set the shadowsocks server port.
  54. .TP
  55. .B \-l \fIlocal_port\fP
  56. Listen on the local port.
  57. .TP
  58. .B \-k \fIpassword\fP
  59. Set the shadowsocks password. The server and the client should use the same
  60. password.
  61. .TP
  62. .B \-m \fIencrypt_method\fP
  63. Set the cipher. Shadowsocks accepts 14 different ciphers: table, rc4,
  64. rc4-md5, aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, camellia-128-cfb,
  65. camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb, rc2-cfb
  66. and seed-cfb. The default method is \fItable\fP. If compiled with PolarSSL
  67. or custom OpenSSL builds, some of these ciphers may not work.
  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. .TP
  78. .B \-a \fIuser_name\fP
  79. Run as a specific user.
  80. .TP
  81. .B \-u
  82. Enable UDP relay.
  83. .TP
  84. .B \-v
  85. Enable verbose mode.
  86. .TP
  87. .B \--fast-open
  88. Enable TCP fast open.
  89. .TP
  90. .B \--acl \fIacl_config\fP
  91. Enable ACL (Access Control List).
  92. .SH EXAMPLE
  93. \*(Re requires netfilter's NAT function. Here is an example:
  94. # Create new chain
  95. root@Wrt:~# iptables -t nat -N SHADOWSOCKS
  96. # Ignore your shadowsocks server's addresses
  97. # It's very IMPORTANT, just be careful.
  98. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN
  99. # Ignore LANs and any other addresses you'd like to bypass the proxy
  100. # See Wikipedia and RFC5735 for full list of reserved networks.
  101. # See ashi009/bestroutetb for a highly optimized CHN route list.
  102. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
  103. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
  104. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
  105. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
  106. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
  107. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
  108. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
  109. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN
  110. # Anything else should be redirected to shadowsocks's local port
  111. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345
  112. # Apply the rules
  113. root@Wrt:~# iptables -t nat -A OUTPUT -p tcp -j SHADOWSOCKS
  114. # Start the shadowsocks-redir
  115. root@Wrt:~# ss-redir -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid
  116. .SH SEE ALSO
  117. .BR iptables (8),
  118. /etc/shadowsocks-libev/config.json
  119. .br
  120. .SH AUTHOR
  121. shadowsocks was created by clowwindy <clowwindy42@gmail.com> and
  122. shadowsocks-libev was maintained by Max Lv <max.c.lv@gmail.com> and Linus Yang
  123. <laokongzi@gmail.com>.
  124. .PP
  125. This manual page was written by Max Lv <max.c.lv@gmail.com>.