侧边栏壁纸
  • 累计撰写 85 篇文章
  • 累计创建 39 个标签
  • 累计收到 9 条评论

目 录CONTENT

文章目录

Linux CentOS搭建Socks5代理服务器

散漫的老何
2022-10-22 / 0 评论 / 0 点赞 / 1,146 阅读 / 315 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2023-03-08,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

Linux CentOS搭建Socks5代理服务器

原文地址:https://www.cnblogs.com/fatt/p/11189426.html

1 安装

] 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

2 配置

2.1 认证

] 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

2.2 启动参数

] cat /etc/sysconfig/ss5
# Add startup option here
# SS5_OPTS=" -u root"
SS5_OPTS=" -u root -b 0.0.0.0:1080"
# 监听ip地址和端口

2.3 服务启动

] chmod a+x /etc/init.d/ss5
] service ss5 start
             Reloading systemd:                                         [  OK  ]
             Starting ss5 (via systemctl):                              [  OK  ]
] netstat -tlunp|grep ss5
tcp        0      0 0.0.0.0:1080            0.0.0.0:*               LISTEN      17786/ss5
] /etc/init.d/ss5 start
doneting ss5...                                            [  OK  ]

2.4 客户端设置

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
0
广告 广告

评论区