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

Setup SS5 Socks Proxy的更多相关文章

  1. How do I use SOCKS proxy in delphi?

    TCP====== For Indy 8.0 In Delphi, do the following: IdTCPClient1.SocksInfo.Host := [the DNS name of ...

  2. 使用netty构建一个socks proxy

    使用netty构建一个socks proxy   最近在做的项目,需要自己搭建一个socks代理.netty4.0附带了一个socks代理的样例,但是3.x就没有这个东西了,碰巧使用的又是3.7,就只 ...

  3. How to Setup a Private Proxy Server on EC2 in Under 10 Minutes

    How to Setup a Private Proxy Server on EC2 in Under 10 Minutes I’ve been slacking a bit with regular ...

  4. [Node] Setup an Nginx Proxy for a Node.js App

    Learn how to setup an Nginx proxy server that sits in front of a Node.js app. You can use a proxy to ...

  5. 〖Linux〗转换Socks Proxy为Http Proxy

    使用工具,privoxy,官网: http://www.privoxy.org/ socks5 proxy设定方法: autossh -CgNfD  0.0.0.0:1080 vps-lxb sock ...

  6. CentOS下配置SS5(SOCKS5)代理服务器

    方案:使用开源的SS5( Socks Server 5 ) 官网:http://ss5.sourceforge.net/ (点击左侧的Software在右侧的Server处进入下载地址) CentOs ...

  7. Proxy Server代理服务器(轉載)

    宽带IP城域网开通以来,单位连上了宽带网,10M的带宽让我们感受到了宽带的魅力.电信只提供7个IP地址,对任何一个单位来说都太少了,常用的解决办法是使用代理服务器.微软的MS Proxy Server ...

  8. 实现代理设置proxy

    用户在哪些情况下是需要设置网络代理呢? 1. 内网上不了外网,需要连接能上外网的内网电脑做代理,就能上外网:多个电脑共享上外网,就要用代理: 2.有些网页被封,通过国外的代理就能看到这被封的网站:3. ...

  9. proxy解析

    知其所以然 本文不是教程向,倾向于分析科学上网的一些原理.知其所以然,才能更好地使用工具,也可以创作出自己的工具. 科学上网的工具很多,八仙过海,各显神通,而且综合了各种技术.尝试从以下四个方面来解析 ...

随机推荐

  1. golang类型转换小总结

    1. int <--> string 1.1. int --> string str := strconv.Itoa(intVal) 当然,整数转换成字符串还有其他方法,比如 fmt ...

  2. js中的cookie使用和vue-cookie的使用

    在HTTP协议的定义中,采用了一种机制来记录客户端和服务器端交互的信息,这种机制被称为cookie,cookie规范定义了服务器和客户端交互信息的格式.生存期.使用范围.安全性. 在JavaScrip ...

  3. 洛谷P2097 资料分发1 题解

    题目传送门 这道题竟然是橙色的: 因为可以用并查集来做,当然您用dfs也可以,不过应该要加优化. 一开始就把读入的合并起来,最后逐个查找就好啦... #include<bits/stdc++.h ...

  4. 洛谷P4644 [USACO2005 Dec]Cleaning Shifts 清理牛棚 [DP,数据结构优化]

    题目传送门 清理牛棚 题目描述 Farmer John's cows, pampered since birth, have reached new heights of fastidiousness ...

  5. UVA11987 Almost Union-Find [带权并查集]

    洛谷传送门 Almost Union-Find 题目描述 输入输出格式 输入格式: 输出格式: 输入输出样例 输入样例#1: 5 7 1 1 2 2 3 4 1 3 5 3 4 2 4 1 3 4 3 ...

  6. BeanFactoryAware和BeanNameAware

    实现 BeanFactoryAware 接口的 bean 可以直接访问 Spring 容器,被容器创建以后,它会拥有一个指向 Spring 容器的引用. BeanFactoryAware 接口只有一个 ...

  7. Django 如何实现 如下 联表 JOIN 查询?

    SQL语句: select distinct a.device_hash, sum(b.cmn_merge_count) from (select distinct device_hash from ...

  8. 【BZOJ 2671】 2671: Calc (数论,莫比乌斯反演)

    2671: Calc Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 303  Solved: 157 Description 给出N,统计满足下面条件 ...

  9. 【UOJ #205】【APIO 2016】Fireworks

    http://uoj.ac/problem/205 好神的题啊. dp[i][j]表示以i为根的子树调整成长度j需要的最小代价. 首先要观察到dp值是一个下凸壳. 因为从儿子合并到父亲时要把所有儿子的 ...

  10. 「SCOI2016」萌萌哒

    「SCOI2016」萌萌哒 题目描述 一个长度为 \(n\) 的大数,用 \(S_1S_2S_3 \ldots S_n\) 表示,其中 \(S_i\) 表示数的第 \(i\) 位,\(S_1\) 是数 ...