SS5 Socks Server

Description

SS5 is a socks server that implements the SOCKS v4 and v5 protocol. As a proxy server, SS5 authenticates, profiles and processes network requests for clients. It establishes connections to application hosts for client applications. When the client attempts to access the network, the client connects to the SS5 daemon instead of the application host.

Following authentication, clients request that SS5 perform network activities for the client. The activities might include:

* Connect
* Bind
* Udp Associate

The SS5 protocol is independent of application protocols, and can assist with different networking services, including telnet, ftp, finger, whois, gopher, and WWW access.

又是一個 OpenSource 的好東西,簡單紀錄一下安裝在 CentOS 5.4 的 VPS 過程 :O

先安裝需要的套件


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

下載 SS5


wget http://softlayer.dl.sourceforge.net/project/ss5/ss5/3.7.9-1/ss5-3.7.9-1.tar.gz
tar zxvf ss5-3.7.9-1.tar.gz
cd ss5-3.7.9
./configure
make
make install
cd ..
mv /etc/init.d/ss5 /etc/init.d/ss5.bak
cp conf/ss5.init /etc/init.d/ss5
rm -f zxvf ss5-3.7.9-1.tar.gz
rm -rf ss5-3.7.9

先把 Socks 4 的模組更名,讓 SS5 不支援 Socks 4,免得被有心人士掃到之後就流量大增囉!


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

設定要認證才能使用 SS5


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 - - - - -

增加使用者密碼,請注意要1行1個,格式是帳號 密碼,範例:wHOaMi balabababa


vi /etc/opt/ss5/ss5.passwd

大功告成! 設定權限再啟動唄~ ;)


chmod +x /etc/init.d/ss5
chkconfig --add ss5
chkconfig ss5 on

/etc/init.d/ss5 restart

SS5 預設的 PORT 是 1080,啟動後就能連上了~! :D

SS5 紀錄檔在


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