CentOS搭建socket5代理服務器

1.安裝socket5依賴包
yum -y install gcc automake make pam-devel openldap-devel cyrus-sasl-devel
 
2.下載ss5並安裝
下載官網:http://ss5.sourceforge.net/
軟件包:http://iweb.dl.sourceforge.net/project/ss5/ss5/3.8.9-6/ss5-3.8.9-6.tar.gz
 
注意:不要下載最新版ss5-3.8.9-7.tar.gz,這個包安裝後布不能啓動,報如下錯誤:
[11/Dec/2012:14:44:50 CST] [INFO] SS5 Version 3.8.9 - Release 7 starting
[11/Dec/2012:14:44:50 CST] [INFO] Copyright (C) 2002-2011 by Matteo Ricchetti - <matteo.ricchetti@libero.it>
[11/Dec/2012:14:44:50 CST] [INFO] Setting dynamic configuration.
[11/Dec/2012:14:44:50 CST] [INFO] Cleaning old configuration.
[11/Dec/2012:14:44:50 CST] [INFO] Loading and validating new configuration.
[11/Dec/2012:14:44:50 CST] [0] [ERRO] $S5LoadConfData$: (No such file or directory).
[11/Dec/2012:14:44:50 CST] [ERRO] Configuration not switched.
 
root@test:~# tar zxvf ss5-3.8.9-6.tar.gz
root@test:~# cd ss5-3.8.9
root@test:~# ./configure && make && make install
root@test:~# cd /etc/opt/ss5
root@test:/etc/opt/ss5# ls
ss5.conf  ss5.ha  ss5.passwd
 
ss5.conf配置
#auth    0.0.0.0/0               -               -
去掉註釋,改成
auth    0.0.0.0/0               -               u
u:使用ss5.passwd賬號密碼登陸,-:默認任何人均可使用
 
#permit -        0.0.0.0/0       -       0.0.0.0/0       -       -       -       -       -
去掉註釋:
permit -        0.0.0.0/0       -       0.0.0.0/0       -       -       -       -       -
 
添加用戶名密碼
vim ss5.passwd
test test
 
3. 啓動socks服務測試
root@test:~# chmod 777 /etc/rc.d/init.d/ss5
root@test:~# /etc/init.d/ss5 start
 

若是遇到問題   can't unlink pid file /var/run/ss5/ss5.pidweb

這是由於已經有ss5在運行,ps -A | grep ss5vim

kill掉它,再start便可socket

 

添加 ss5 到服務中,並隨機啓動測試

chkconfig --add ss5spa

chkconfig ss5 on.net

這樣就能夠直接service ss5 restart了,不用指定路徑/etc/init.d/ss5rest

 

默認是1080端口xml

改ss5端口,格式爲ss5  -b ip地址:端口ip

相關文章
相關標籤/搜索