ss5
1、安装ss5
----------------------------------------
freebsd# cd /usr/ports/net/ss5/
freebsd# make install clean
----------------------------------------
freebsd# cd /usr/ports/net/ss5/
freebsd# make install clean
报错:
===> openldap-client-2.4.19 depends on package: libtool>=2.2 - not found
===> Found libtool-1.5.24, but you need to upgrade to libtool>=2.2.
*** Error code 1
===> openldap-client-2.4.19 depends on package: libtool>=2.2 - not found
===> Found libtool-1.5.24, but you need to upgrade to libtool>=2.2.
*** Error code 1
Stop in /usr/ports/net/openldap24-client.
*** Error code 1
*** Error code 1
解决办法:
freebsd# cd /usr/ports/devel/libtool22/
freebsd# make install clean
freebsd# cd /usr/ports/devel/libltdl22
freebsd# make install clean
freebsd# cd /usr/ports/devel/libtool22/
freebsd# make install clean
freebsd# cd /usr/ports/devel/libltdl22
freebsd# make install clean
然后再继续:
freebsd# cd /usr/ports/net/ss5/
freebsd# make install clean
freebsd# cd /usr/ports/net/ss5/
freebsd# make install clean
2、修改配置文件
---------------------------------------
freebsd# vi /usr/local/etc/ss5/ss5.conf
---------------------------------------
freebsd# vi /usr/local/etc/ss5/ss5.conf
auth 0.0.0.0/0 – u
permit u 0.0.0.0/0 – 0.0.0.0/0 – – – – -
permit u 0.0.0.0/0 – 0.0.0.0/0 – – – – -
freebsd# vi /usr/local/etc/ss5/ss5.passwd //添加认证用户
king 1q2w3e
freebsd# vi /etc/rc.conf
ss5_enable="YES" //添加ss5启动项
freebsd# /usr/local/etc/rc.d/ss5 start
socks5
1、安装socks5
---------------------------------------
freebsd# cd /usr/ports/net/socks5/
---------------------------------------
freebsd# cd /usr/ports/net/socks5/
freebsd# make install clean
2、配置socks5
---------------------------------------
freebsd# vi /usr/local/etc/socks5.conf
---------------------------------------
freebsd# vi /usr/local/etc/socks5.conf
#指定SOCKS v5绑定的ip地址和监听的端口。假如不指定绑定的IP将使用0.0.0.0
set SOCKS5_BINDINFC 0.0.0.0:1080
#忽略ident请求。当客户机没有运行identd时,使用SOCKS5_NOIDENT将降低超时值
set SOCKS5_NOIDENT
#指定连接停顿最长时间。超过最大值后,socks5断开连接
set SOCKS5_TIMEOUT 15
#socks5将接受SOCKS V4 协议的请求,默认不接受
set SOCKS5_V4SUPPORT
#指定同时存在的最大子进程数,Socks5预设为64
set SOCKS5_MAXCHILD 4
#指定密码文档
set SOCKS5_PWDFILE /usr/local/etc/socks5.passwd
#指定日志文件
set SOCKS5_LOGFILE /var/log/socks5.log
#任何的客户连接都使用username/password用户认证方法
#auth - - u //用户认证方法
auth - - - //允许所有用户
auth - - - //允许所有用户
#允许来自192.168.0.X的任何经过用户认证的连接, 这里我没做限制.
permit - - - - - - //允许所有IP
#permit u - - - - - //允许认证用户
#permit u - 192.168.0.X - - -
freebsd# vi /usr/local/etc/socks5.passwd
king 741852
freebsd# vi /etc/rc.conf #添加socks5项
socks5_enable="YES"
socks5_flags="-t -b 222.192.55.99:8080"
#pf开放8080端口
pass in quick proto tcp to $ext_if port 8080
3、开始测试
freebsd# /usr/local/bin/socks5 -f -s
如果出现下面的信息表示测试成功。
18210: Socks5 starting at Mon Dec 14 18:23:45 1998 in normal mode
freebsd# /usr/local/bin/socks5 -f -s
如果出现下面的信息表示测试成功。
18210: Socks5 starting at Mon Dec 14 18:23:45 1998 in normal mode
4、启动socks5
freebsd# /usr/local/etc/rc.d/socks5 start
本文转自king_819 51CTO博客,原文链接:http://blog.51cto.com/kerry/239076,如需转载请自行联系原作者