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.

141 lines
4.7 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
10 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
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 8.8.8.8.
  83. .TP
  84. .B \-u
  85. Enable UDP relay.
  86. .TP
  87. .B \-v
  88. Enable verbose mode.
  89. .TP
  90. .B \--fast-open
  91. Enable TCP fast open.
  92. .TP
  93. .B \--acl \fIacl_config\fP
  94. Enable ACL (Access Control List).
  95. .SH EXAMPLE
  96. \*(Re requires netfilter's NAT function. Here is an example:
  97. # Create new chain
  98. root@Wrt:~# iptables -t nat -N SHADOWSOCKS
  99. # Ignore your shadowsocks server's addresses
  100. # It's very IMPORTANT, just be careful.
  101. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 123.123.123.123 -j RETURN
  102. # Ignore LANs and any other addresses you'd like to bypass the proxy
  103. # See Wikipedia and RFC5735 for full list of reserved networks.
  104. # See ashi009/bestroutetb for a highly optimized CHN route list.
  105. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN
  106. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN
  107. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 127.0.0.0/8 -j RETURN
  108. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 169.254.0.0/16 -j RETURN
  109. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 172.16.0.0/12 -j RETURN
  110. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 192.168.0.0/16 -j RETURN
  111. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 224.0.0.0/4 -j RETURN
  112. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -d 240.0.0.0/4 -j RETURN
  113. # Anything else should be redirected to shadowsocks's local port
  114. root@Wrt:~# iptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 12345
  115. # Apply the rules
  116. root@Wrt:~# iptables -t nat -A OUTPUT -p tcp -j SHADOWSOCKS
  117. # Start the shadowsocks-redir
  118. root@Wrt:~# ss-redir -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid
  119. .SH SEE ALSO
  120. .BR iptables (8),
  121. /etc/shadowsocks-libev/config.json
  122. .br
  123. .SH AUTHOR
  124. shadowsocks was created by clowwindy <clowwindy42@gmail.com> and
  125. shadowsocks-libev was maintained by Max Lv <max.c.lv@gmail.com> and Linus Yang
  126. <laokongzi@gmail.com>.
  127. .PP
  128. This manual page was written by Max Lv <max.c.lv@gmail.com>.