Setup SS5 Socks Proxy

简介: Install and configure ss5 socks proxy with simple authenticationSS5 is a high performance socks proxy server implementing SOCK4 and SOCKS5 protocols.

Install and configure ss5 socks proxy with simple authentication


SS5 is a high performance socks proxy server implementing SOCK4 and SOCKS5 protocols. This step-by-step guide describes installation and configuration of SS5 with user/password authentication on a RHEL/CentOS server.

1. Download the latest source rpm from sourceforge.net.

wget http://downloads.sourceforge.net/ss5/ss5-3.7.9-2.src.rpm

2. Build the source rpm.

This requires the rpmbuild tool provided by rpm-build package. Also, ss5 requires openldap-devel, pam-devel and openssl-devel deveopment packages. Install these packages with yum:

yum install rpm-build openldap-devel pam-devel openssl-devel libgssapi-devel -y (for 32 bit Linux)
yum install rpm-build.x86_64 openldap-devel.x86_64 pam-devel.x86_64 openssl-devel.x86_64 libgssapi-devel.x86_64 -y (for 64 bit Linux)

Now build ss5-3.7.9-2.src.rpm and create the rpm package:

rpmbuild –rebuild ss5-3.7.9-2.src.rpm

3. Install SS5 rpm package

After building, the rpm package will be created in /usr/src/redhat/RPMS/x86_64/ (for 64 bit Linux) or in /usr/src/redhat/RPMS/i386/ (for 32 bit Linux). You can install the rpm using following command:

rpm -ivh /usr/src/redhat/RPMS/x86_64/ss5-3.7.9-2.x86_64.rpm (for 64 bit Linux)
rpm -ivh /usr/src/redhat/RPMS/i386/ss5-3.7.9-2.i386.rpm (for 32 bit Linux)

4. Run SS5 as root and change the port to 9999 (default port is 1080)

Edit /etc/init.d/ss5 and put following lines at the top after shabang:

export SS5_SOCKS_PORT=9999
export SS5_SOCKS_USER=root

You can use any available port you want. 

5. User/password authentication

SS5 configuration file is /etc/opt/ss5/ss5.conf. The ‘auth’ directive sets the authentication policy.

For no authentication,
auth 0.0.0.0/0 – – 

For user/pass auth,
auth 0.0.0.0/0 – u

The user/password pairs are stored in /etc/opt/ss5/ss5.passwd. Make sure that this file is readable only by root:

chown root.root /etc/opt/ss5/ss5.passwd
chmod 750 /etc/opt/ss5/ss5.passwd

In /etc/opt/ss5/ss5.passwd, specify user and pass separated by a space and one user/password per line.

Example:
user1 pass1
user2 pass2

6. Permission

Allow all hosts to connect:

permit – 0.0.0.0/0 – 0.0.0.0/0 – – – – -

7. Start ss5

service ss5 start

目录
相关文章
|
2月前
|
缓存 安全 应用服务中间件
nginx配置proxy_set_header
nginx配置proxy_set_header
|
7月前
|
Python
proxy配置
proxy配置
|
应用服务中间件 nginx
Nginx:proxy_pass和try_files 301跳转带了端口
Nginx:proxy_pass和try_files 301跳转带了端口
493 0
|
应用服务中间件 nginx
Nginx服务器的反向代理proxy_pass配置方法讲解
 Nginx服务器的反向代理proxy_pass配置方法讲解 这篇文章主要介绍了Nginx服务器的反向代理proxy_pass配置方法讲解,包括经常被提到的url的/问题的相关说明,需要的朋友可以参考下 就普...
5125 0
proxy的基本用法
proxy的基本用法
262 0
|
Shell 开发工具 数据安全/隐私保护
SS5 - SOCKS5 代理服务器安装
SS5 - SOCKS5 代理服务器安装
1152 0
|
应用服务中间件 nginx
nginx服务器的反向代理proxy_pass配置方法
nginx服务器的反向代理proxy_pass配置方法
366 0
|
应用服务中间件 nginx
$http_x_forwarded_for 和 \$proxy_add_x_forwarded_for区别
在配置nginx的反向代理时,关于X-Forwarded-For的配置,我看到了两种配置:第一种: proxy_set_header X-Forwarded-For $http_x_forwarded_for; 第二种: proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 一般情况下,都是配置第二种.
5124 0