CentOS 5 VPS安装 socks 5 S5代理[转]

配置编译环境

yum -y install gcc automake make

安装socks5必要的包

yum -y install pam-devel openldap-devel cyrus-sasl-devel

下载,编译安装socks5

#wget http://nchc.dl.sourceforge.net/project/ss5/ss5/3.7.9-1/ss5-3.7.9-1.tar.gz
#tar zxf ss5-3.7.9-1.tar.gz
#cd ss5-3.7.9
#./configure
#make
#make install

默认支持S4匿名可以使用取消S4

mv /usr/lib/ss5/mod_socks4.so /usr/lib/ss5/mod_socks4.so.bk

增加用户密码:

#cd /etc/opt/ss5/
#vi ss5.passwd

你的用户名 你的密码

#vi /etc/opt/ss5/ss5.conf

把其中的

#auth    0.0.0.0/0               –               –

改为

auth    0.0.0.0/0               –               u

#permit –        0.0.0.0/0       –       0.0.0.0/0       –       –       –       –       –

改为

permit  u        0.0.0.0/0       –       0.0.0.0/0        –       –       –       –       –

接下来修改端口

#vi /etc/rc.d/init.d/ss5daemon /usr/sbin/ss5 -m -t -b IP:8833

else
     /usr/local/sbin/ss5 -m -t -b IP:8833

运行:

#/etc/rc.d/init.d/ss5 start

如果有错误可以跟踪日志:

#tail -f /var/log/ss5/ss5.log

5.3 64bit安装失败

[andy@andy ss5-3.7.9]#make
make[1]: Entering directory `/usr/src/ss5-3.7.9/common’
make[1]: Nothing to be done for `all’.
make[1]: Leaving directory `/usr/src/ss5-3.7.9/common’
make[1]: Entering directory `/usr/src/ss5-3.7.9/modules’
make[2]: Entering directory `/usr/src/ss5-3.7.9/modules/mod_socks4′
gcc -g -O2 -DLINUX -D_FILE_OFFSET_BITS=64 -I . -I ../../include -shared -fPIC   -o mod_socks4.so SS5Mod_socks4.o ../../common/SS5OpenLdap.o -lpthread
/usr/bin/ld: ../../common/SS5OpenLdap.o: relocation R_X86_64_32S against `a local symbol’ can not be used when making a shared object; recompile with -fPIC
../../common/SS5OpenLdap.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [mod_socks4.so] Error 1
make[2]: Leaving directory `/usr/src/ss5-3.7.9/modules/mod_socks4′
make[1]: *** [all] Error 1
make[1]: Leaving directory `/usr/src/ss5-3.7.9/modules’
make: *** [modules] Error 2

发表评论

邮箱地址不会被公开。 必填项已用*标注

click to changeSecurity Code