史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   網路軟硬體架設技術文件 (http://forum.slime.com.tw/f133.html)
-   -   Socks5伺服器架設 (http://forum.slime.com.tw/thread115781.html)

psac 2004-07-03 11:15 PM

Socks5伺服器架設
 
ss5 全稱是Socks Server 5,我不知道作者為什麼不取個更個性化的名字。可能工程最初也只是按興趣隨便開始的吧。它更新得沒多久,是個新東西。但是這並不說明它是個笨拙的新生兒。下面是它的features

程式碼:
Socks 4 Protocol SS5 V2.4
CONNECT operation Supported
BIND operation Supported
IDENTD protocol (Rfc 1413) Not supported



Socks 4A Protocol Extension SS5 V2.4
DNS resolution Supported: dns response can be ordered



Socks 5 Protocol Rfc 1928 SS5 V2.4
Authentication Basic using:

a) password file

b) Generic External Authentication Program

c) PAM support

d) Fake authentication

CONNECT operation Supported
BIND operation Supported
UDP PROXY or UDP ASSOCIATE Supported
DNS resolution Supported: dns response can be ordered



Other features SS5 V2.4
Profiling Supported using:

a) group file

b) ldap support

Protocol fixup Supported for the following protocols:
a) Http,

b) Https,

c) Smtp,

d) Pop3,

e) Imap4

Bandwidth control Supported
Source interface Supported only CONNECT operation
Server load balancing Supported: ss5 balance the requests over different real servers (ONLY thread mode!)
Session affinity by sticky option now available

Admin Console Supported: ss5 shows Virtual table, Affinity table and Statistics table
作者提供了很多分發包格式,因為我要裝的那台機器是redhat9的,我就拉了一個ss5-2.4-slb-mr7.src.rpm回來,像其他的整合ldap和pam的,我也用不到,就不需要一個高大全的東西了。

即使是它的源碼包,也沒有提供自訂連接阜的參數。因此多了一些修改源碼的地方。

程式碼:
rpm -ivh ss5-2.4-slb-mr7.src.rpm

cd /usr/src/redhat/SOURCES

tar -xzvf ss5-2.4.tar.gz
進入解開的ss5-2.4目錄,編輯SS5Main.h 修改SOCKS5_PORT常量,其他的常
量也可以按需要修改

程式碼:
#define SOCKS5_PORT 9780
然後把改過的目錄重新打包回去

程式碼:
tar -czvf ss5-2.4.tar.gz ss5-2.4
編譯(這裡用了-ba參數產生源碼srpm)

程式碼:
cd ../SPECS
rpmbuild -ba --target=i686 ss5.spec
最後安裝

程式碼:
cd ../RPMS/i686
rpm -ivh ss5-2.4-mr7.i686.rpm
配置方面很簡單,網站本身有一些示例,配置文件本身也都有註釋。我只按自己的需要配置了一部分。

建立/etc/ss5.passwd文件,把用戶和密碼按每行一個用戶的格式寫好,用戶和密碼用空格區分。

接下來就是/etc/ss5.conf

程式碼:
#允許從任何位址用認證方式連接
auth - - u
#允許任何轉發,不過像http等需要fixup的傳輸協定還要特別指定
permit - - - - - - - - -

#fixup的類似寫法
#permit - - - - 80 http - - -

#指定admin的IP,主要是三個狀態頁
admin 123.456.789.123
其他比較有實用價值的是permit的流量控制,virtual段所實現的流量均衡等。

隨手提供一個我已經做過的rpm,連接阜是9780


所有時間均為台北時間。現在的時間是 04:57 AM

Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2024, Jelsoft Enterprises Ltd.

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1