socks5 代理服务器ss5配置

安装

yum install pam-devel openldap-devel openssl-devel
yum -y install gcc automake make pam-devel openldap-devel cyrus-sasl-devel

wget https://sourceforge.net/projects/ss5/files/ss5/3.8.9-8/ss5-3.8.9-8.tar.gz
wget http://downloads.sourceforge.net/project/ss5/ss5/3.8.9-8/ss5-3.8.9-8.tar.gz

tar -xzvf ss5-3.8.9-8.tar.gz
cd ss5-3.8.9
./configure
make
make install

 配置无用户认证方式

#cat /etc/opt/ss5/ss5.conf

auth    0.0.0.0/0               -               -
permit -    0.0.0.0/0    -    0.0.0.0/0    -    -    -    -    -    

 

配置用户认证方式

#cat /etc/opt/ss5/ss5.conf

auth    0.0.0.0/0               -               u
permit -    0.0.0.0/0    -    0.0.0.0/0    -    -    -    -    -

cat /etc/opt/ss5/ss5.passwd
test test

 

启动服务

chmod a+x /etc/init.d/ss5
service ss5 start
             Reloading systemd:                                         [  OK  ]
             Starting ss5 (via systemctl):                              [  OK  ]
ss -tunlp |grep ss5
              tcp    LISTEN     0      6         *:1080                  *:*                         users:(("ss5",pid=13536,fd=4))

systemctl restart ss5

 

启动参数

cat /etc/sysconfig/ss5
# Add startup option here
#SS5_OPTS=" -u root"
SS5_OPTS=" -u root -b 0.0.0.0:1080"

 

客户端设置

alias setproxy="export ALL_PROXY=socks5://10.10.3.2:1080"
alias unsetproxy="unset ALL_PROXY"
alias getip="curl ifconfig.me"

#或者
echo 'export ALL_PROXY="socks5://10.10.3.2:1080"' | tee /etc/profile.d/proxy.sh

 

转载于:https://www.cnblogs.com/fatt/p/11189426.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值