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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM