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.

142 lines
4.7 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
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
10 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
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 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-2015, 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 Tu \fBss-tunnel\fR
  25. .ds Me \fBShadowsocks\fR
  26. .TH SHADOWSOCKS-LIBEV 8 "January 7, 2015"
  27. .SH NAME
  28. shadowsocks-libev \- a lightweight and secure scoks5 proxy
  29. .SH SYNOPSIS
  30. \*(Lo|\*(Re|\*(Se
  31. \-s server_host \-p server_port
  32. \-l local_port \-k password
  33. \-m encrypt_method \-f pid_file
  34. \-t timeout \-c config_file
  35. .SH DESCRIPTION
  36. \*(Me is a lightweight and secure socks5 proxy. It is a port of the original
  37. shadowsocks created by clowwindy. \*(Me is written in pure C and takes advantage
  38. of \fBlibev\fP to achieve both high performance and low resource consumption.
  39. .PP
  40. \*(Me consists of four components. One is \*(Se that runs on a remote server
  41. to provide secured tunnel service. \*(Lo and \*(Re are clients on your local
  42. machines to proxy TCP traffic. \*(Tu is a tool for local port forwarding.
  43. .PP
  44. While \*(Lo works as a standard socks5 proxy, \*(Re works as a transparent proxy
  45. and requires netfilter's NAT module. For more information, check out the example
  46. section.
  47. .SH OPTIONS
  48. .TP
  49. .B \-s \fIserver_host\fP
  50. Set the server's hostname or IP.
  51. .TP
  52. .B \-p \fIserver_port\fP
  53. Set the server's port number.
  54. .TP
  55. .B \-l \fIlocal_port\fP
  56. Set the local port number.
  57. .TP
  58. .B \-k \fIpassword\fP
  59. Set the password. The server and the client should use the same password.
  60. .TP
  61. .B \-m \fIencrypt_method\fP
  62. Set the cipher. Shadowsocks accepts 16 different ciphers: table, rc4, rc4-md5,
  63. aes-128-cfb, aes-192-cfb, aes-256-cfb, bf-cfb, camellia-128-cfb,
  64. camellia-192-cfb, camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb, rc2-cfb,
  65. seed-cfb, salsa20 and chacha20. The default cipher is \fItable\fP. If
  66. built with PolarSSL or custom OpenSSL libraries, some of these ciphers may
  67. not work.
  68. .TP
  69. .B \-f \fIpid_file\fP
  70. Start shadowsocks as a daemon with 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 \-d \fIaddr\fP
  82. Setup the name servers for libudns. The default server is fetched from
  83. /etc/resolv.conf.
  84. .TP
  85. .B \-u
  86. Enable UDP relay.
  87. .TP
  88. .B \-v
  89. Enable verbose mode.
  90. .TP
  91. .B \--fast-open
  92. Enable TCP fast open.
  93. .TP
  94. .B \--acl \fIacl_config\fP
  95. Enable ACL (Access Control List).
  96. .SH EXAMPLE
  97. \*(Re requires netfilter's NAT function. Here is an example:
  98. # Create new chain
  99. root@Wrt:~# iptables -t nat -N SHADOWSOCKS
  100. # Ignore your shadowsocks server's addresses
  101. # It's very IMPORTANT, just be careful.
  102. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN
  103. # Ignore LANs and any other addresses you'd like to bypass the proxy
  104. # See Wikipedia and RFC5735 for full list of reserved networks.
  105. # See ashi009/bestroutetb for a highly optimized CHN route list.
  106. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
  107. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
  108. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
  109. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
  110. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
  111. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
  112. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
  113. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN
  114. # Anything else should be redirected to shadowsocks's local port
  115. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345
  116. # Apply the rules
  117. root@Wrt:~# iptables -t nat -A OUTPUT -p tcp -j SHADOWSOCKS
  118. # Start the shadowsocks-redir
  119. root@Wrt:~# ss-redir -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid
  120. .SH SEE ALSO
  121. .BR iptables (8),
  122. /etc/shadowsocks-libev/config.json
  123. .br
  124. .SH AUTHOR
  125. shadowsocks was created by clowwindy <clowwindy42@gmail.com> and
  126. shadowsocks-libev was maintained by Max Lv <max.c.lv@gmail.com> and Linus Yang
  127. <laokongzi@gmail.com>.
  128. .PP
  129. This manual page was written by Max Lv <max.c.lv@gmail.com>.