my blog my blog

Tag: socks
64位版本的SocksCap64代理程序介绍与推荐

 

奶牛最近在找一个好用的代理程序,支持socks5的tcp和udp两种协议,并且支持64位win8系统,终于最后找到了这个sockscap64.

首先很难的,作者是国人,并且提倡软件免费,并打算一直免费提供sockscap64这软件。sockscap64目前支持socks代理和http代理,并且支持tcp和udp,Sockscap64是基于远程DLL注入技术, 通过修改系统Winsock的API后从而使运行于Sockscap64的网络软件通过SOCKS代理访问网络; 从而实现网络加速或突破局域网限制的功能。经过测试udp功能也比较稳定。

特此推荐,下载http://www.sockscap64.com/software/SocksCap64-setup-2.6.exe

Ubuntu下socks5代理服务器dante-server的安装与配置

 

安装

  1. apt-get install dante-server 

配置文件在/etc/danted.conf

  1. vim /etc/danted.conf 
  2. # $Id: sockd.conf,v 1.43 2005/12/26 16:35:26 michaels Exp $ 
  3. # 
  4. # A sample danted.conf 
  5. # 
  6. # 
  7. # The configfile is divided into three parts; 
  8. #    1) serversettings 
  9. #    2) rules 
  10. #    3) routes 
  11. # 
  12. # The recommended order is: 
  13. #   Serversettings: 
  14. #               logoutput 
  15. #               internal 
  16. #               external 
  17. #               method 
  18. #               clientmethod 
  19. #               users 
  20. #               compatibility 
  21. #               extension 
  22. #               connecttimeout 
  23. #               iotimeout 
  24. #               srchost 
  25. # 
  26. #  Rules: 
  27. #       client block/pass 
  28. #               from to 
  29. #               libwrap 
  30. #               log 
  31. # 
  32. #     block/pass 
  33. #               from to 
  34. #               method 
  35. #               command 
  36. #               libwrap 
  37. #               log 
  38. #               protocol 
  39. #               proxyprotocol 
  40. # 
  41. #  Routes: 
  42.  
  43. # the server will log both via syslog, to stdout and to /var/log/lotsoflogs 这行是日志输出,输出到syslog stdout和lotsoflogs里面
  44. logoutput: syslog stdout /var/log/lotsoflogs 
  45.  
  46. # The server will bind to the address 10.1.1.1, port 1080 and will only 
  47. # accept connections going to that address. 
  48. #internal: 10.1.1.1 port = 1080 
  49. # Alternatively, the interface name can be used instead of the address. 这里设置eth0为网卡,端口1080
  50. internal: eth0 port = 1080 
  51.  
  52. # all outgoing connections from the server will use the IP address 
  53. # 195.168.1.1 
  54. #external: 192.168.1.1,这里是设置流量出口使用的ip,也是用eth0网卡的
  55. external:eth0
  56. # list over acceptable methods, order of preference. 
  57. # A method not set here will never be selected. 
  58. # 
  59. # If the method field is not set in a rule, the global 
  60. # method is filled in for that rule. 
  61. # 
  62.  
  63. # methods for socks-rules. 设置方式为用户名模式
  64. method: username 
  65. #methods for client-rules. 
  66. clientmethod: none 
  67.  
  68. #or for PAM authentification 
  69. #method: pam 
  70.  
  71. # 
  72. # An important section, pay attention. 
  73. # 
  74.  
  75. # when doing something that can require privilege, it will use the 
  76. # userid: 
  77. user.privileged: root 
  78.  
  79. # when running as usual, it will use the unprivileged userid of: 
  80. user.notprivileged: nobody 
  81.  
  82. # If you compiled with libwrap support, what userid should it use 
  83. # when executing your libwrap commands?  "libwrap". 
  84. user.libwrap: nobody 
  85.  
  86.  
  87. # 
  88. # some options to help clients with compatibility: 
  89. # 
  90.  
  91. # when a client connection comes in the socksserver will try to use 
  92. # the same port as the client is using, when the socksserver 
  93. # goes out on the clients behalf (external: IP address). 
  94. # If this option is set, Dante will try to do it for reserved ports aswell. 
  95. # This will usually require user.privileged to be set to "root". 
  96. compatibility: sameport 
  97.  
  98. # If you are using the bind extension and have trouble running servers 
  99. # via the server, you might try setting this.  The consequences of it 
  100. # are unknown. 
  101. compatibility: reuseaddr 
  102.  
  103. # 
  104. # The Dante server supports some extensions to the socks protocol. 
  105. # These require that the socks client implements the same extension and 
  106. # can be enabled using the "extension" keyword. 
  107. # 
  108. # enable the bind extension. 
  109. extension: bind 
  110.  
  111.  
  112. # 
  113. # 
  114. # misc options. 
  115. # 
  116.  
  117. # how many seconds can pass from when a client connects til it has 
  118. # sent us it's request?  Adjust according to your network performance 
  119. # and methods supported. 
  120. #connecttimeout: 30   # on a lan, this should be enough if method is "none". 
  121.  
  122. # how many seconds can the client and it's peer idle without sending 
  123. # any data before we dump it?  Unless you disable tcp keep-alive for 
  124. # some reason, it's probably best to set this to 0, which is 
  125. # "forever". 
  126. #iotimeout: 0 # or perhaps 86400, for a day. 
  127.  
  128. # do you want to accept connections from addresses without 
  129. # dns info?  what about addresses having a mismatch in dnsinfo? 
  130. #srchost: nounknown nomismatch 
  131.  
  132. # 
  133. # The actual rules.  There are two kinds and they work at different levels. 
  134. # 
  135. # The rules prefixed with "client" are checked first and say who is allowed 
  136. # and who is not allowed to speak/connect to the server.  I.e the 
  137. # ip range containing possibly valid clients. 
  138. # It is especially important that these only use IP addresses, not hostnames, 
  139. # for security reasons. 
  140. # 
  141. # The rules that do not have a "client" prefix are checked later, when the 
  142. # client has sent its request and are used to evaluate the actual 
  143. # request. 
  144. # 
  145. # The "to:" in the "client" context gives the address the connection 
  146. # is accepted on, i.e the address the socksserver is listening on, or 
  147. # just "0.0.0.0/0" for any address the server is listening on. 
  148. # 
  149. # The "to:" in the non-"client" context gives the destination of the clients 
  150. # socksrequest. 
  151. # 
  152. # "from:" is the source address in both contexts. 
  153. # 
  154.  
  155.  
  156. # the "client" rules.  All our clients come from the net 10.0.0.0/8. 
  157. # 
  158.  
  159. # Allow our clients, also provides an example of the port range command. 设置客户可以通过任何ip登陆,访问任何ip
  160. client pass { 
  161.         from: 0.0.0.0/0 to: 0.0.0.0/0 
  162. #       method: rfc931 # match all idented users that also are in passwordfile 
  163. } 
  164.  
  165. # This is identical to above, but allows clients without a rfc931 (ident) 
  166. # too.  In practise this means the socksserver will try to get a rfc931 
  167. # reply first (the above rule), if that fails, it tries this rule. 
  168. #client pass { 
  169. #       from: 10.0.0.0/8 port 1-65535 to: 0.0.0.0/0 
  170. #} 
  171.  
  172.  
  173. # drop everyone else as soon as we can and log the connect, they are not 
  174. # on our net and have no business connecting to us.  This is the default 
  175. # but if you give the rule yourself, you can specify details. 
  176. #client block { 
  177. #       from: 0.0.0.0/0 to: 0.0.0.0/0 
  178. #       log: connect error 
  179. #} 
  180.  
  181.  
  182. # the rules controlling what clients are allowed what requests 
  183. # 
  184.  
  185. # you probably don't want people connecting to loopback addresses, 
  186. # who knows what could happen then. 
  187. #block { 
  188. #       from: 0.0.0.0/0 to: 127.0.0.0/8 
  189. #       log: connect error 
  190. #} 
  191.  
  192. # the people at the 172.16.0.0/12 are bad, no one should talk to them. 
  193. # log the connect request and also provide an example on how to 
  194. # interact with libwrap. 
  195. #block { 
  196. #       from: 0.0.0.0/0 to: 172.16.0.0/12 
  197. #       libwrap: spawn finger @%a 
  198. #       log: connect error 
  199. #} 
  200.  
  201. # unless you need it, you could block any bind requests. 
  202. #block { 
  203. #       from: 0.0.0.0/0 to: 0.0.0.0/0 
  204. #       command: bind 
  205. #       log: connect error 
  206. #} 
  207.  
  208. # or you might want to allow it, for instance "active" ftp uses it. 
  209. # Note that a "bindreply" command must also be allowed, it 
  210. # should usually by from "0.0.0.0/0", i.e if a client of yours 
  211. # has permission to bind, it will also have permission to accept 
  212. # the reply from anywhere. 
  213. #pass { 
  214. #       from: 10.0.0.0/8 to: 0.0.0.0/0 
  215. #       command: bind 
  216. #       log: connect error 
  217. #} 
  218.  
  219. # some connections expect some sort of "reply", this might be 
  220. # the reply to a bind request or it may be the reply to a 
  221. # udppacket, since udp is packetbased. 
  222. # Note that nothing is done to verify that it's a "genuine" reply, 
  223. # that is in general not possible anyway.  The below will allow 
  224. # all "replies" in to your clients at the 10.0.0.0/8 net. 
  225. #pass { 
  226. #       from: 0.0.0.0/0 to: 10.0.0.0/8 
  227. #       command: bindreply udpreply 
  228. #       log: connect error 
  229. #} 
  230.  
  231.  
  232. # pass any http connects to the example.com domain if they 
  233. # authenticate with username. 
  234. # This matches "example.com" itself and everything ending in ".example.com". 
  235. #pass { 
  236. #       from: 10.0.0.0/8 to: .example.com port = http 
  237. #       log: connect error 
  238. #       method: username 
  239. #} 
  240.  
  241.  
  242.  
  243.  
  244. # block any other http connects to the example.com domain. 
  245. #block { 
  246. #       from: 0.0.0.0/0 to: .example.com port = http 
  247. #       log: connect error 
  248. #} 
  249.  
  250. # everyone from our internal network, 10.0.0.0/8 is allowed to use 
  251. # tcp and udp for everything else. 设置协议支持tcp和udp
  252. pass { 
  253.         from: 0.0.0.0/0 to: 0.0.0.0/0 
  254.         protocol: tcp udp 
  255. } 
  256.  
  257. # last line, block everyone else.  This is the default but if you provide 
  258. # one  yourself you can specify your own logging/actions 
  259. #block { 
  260. #       from: 0.0.0.0/0 to: 0.0.0.0/0 
  261. #       log: connect error 
  262. #} 
  263.  
  264. # route all http connects via an upstream socks server, aka "server-chaining". 
  265. #route { 
  266. # from: 10.0.0.0/8 to: 0.0.0.0/0 port = http via: socks.example.net port = socks 
  267. #} 

配置完成,

  1. /etc/init.d/danted start 

进行启动。登陆是用本机用户名和密码即可。建议将用户的shell设置为nologin