SOCK5代理服务器配置

日期:2019-11-19编辑作者:澳门金莎娱乐手机版

                                                                                  SOCK5代理服务器配置

root登录服务器后: lsb_release -a      #查看当前服务器版本 Run the commands below to install the latest version of EPEL repository for CentOS 7 and then update your system for missing updates and security patches.

yum install epel-release

yum groupinstall 'Development Tools'

yum -y install gcc gcc-c++ automake make pam-devel openldap-devel cyrus-sasl-devel  yum -y install openssl-devel                           ###四句命令 yum update -y
wget  #命令

./configure && make && make install               #命令

1.设定用户名/密码

SS5 配置文件位于 /etc/opt/ss5/ss5.conf, ‘auth’ 参数用于设定认证模式。

不使用用户认证,
auth 0.0.0.0/0 – –
使用用户名/密码认证,
auth 0.0.0.0/0 – u

设置权限 ( /etc/opt/ss5/ss5.conf )
允许所有主机连接:
permit u 0.0.0.0/0 – 0.0.0.0/0 – – – – –            最后一个-后有一个tab键(备注)

2.在文件 /etc/opt/ss5/ss5.passwd 中, 每行输入一个用户名和密码,用空格分开。
例如:
user1 pass1
user2 pass2

3.以 root 身份运行 SS5 并修改端口为 8899 (默认端口 1080)
修改 /etc/init.d/ss5 并在文件顶部的 #!/bin/sh 之后添加下面的代码:
export SS5_SOCKS_PORT=8899
export SS5_SOCKS_USER=root

4.用户名/密码保存在文件 /etc/opt/ss5/ss5.passwd。请设置权限:
chown root:root /etc/opt/ss5/ss5.passwd
chmod 755 /etc/opt/ss5/ss5.passwd
chmod 755 /etc/opt/ss5

chmod 755 /etc/init.d/ss5

5.设置ss5端口

vim /etc/sysconfig/ss5

SS5_OPTS=" -u root -b 0.0.0.0:8899"

6.启动/停止/重启 ss5
service ss5 start
service ss5 stop
service ss5 restart

以上就已经配置好了ss5.

 开启阿里云端口网页

上面是购买阿里云服务器的优惠券

Allow all hosts to connect:

澳门金莎娱乐手机版,SOCK5代理服务器配置,sock5代理服务器

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:

  1. User/password authentication
  1. Start ss5

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

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

wget

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

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.

  1. Build the source rpm.
  1. Run SS5 as root and change the port to 9999 (default port is 1080)

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)

export SS5_SOCKS_PORT=9999
export SS5_SOCKS_USER=root

For no authentication,
auth 0.0.0.0/0 – – 

service ss5 start

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:

You can use any available port you want. 

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)

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

Example:
user1 pass1
user2 pass2

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:

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.
  1. Permission

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

  1. Install SS5 rpm package

本文由澳门金莎娱乐网站发布于澳门金莎娱乐手机版,转载请注明出处:SOCK5代理服务器配置

关键词:

sqlplus连接的三种方式,故障诊断

故障诊断 | 系统级追踪诊断方法及案例分享,故障诊断案例 点击上方蓝色文字关注↑↑↑↑↑ 所谓操作系统,是应用...

详细>>

tp5快速入门,入门第一课

ThinkPHP5的安装使用/tp5快速入门,thinkphp5tp5 点击进入视频教程 一 安装 一、安装 1、简介 TP5是一个快捷,简单的基于...

详细>>

04搭建嵌入式开发环境,Window之间文件传输

Linux,Window之间文件传输-NFS,Samba,SSH,-nfssamba NFS     NFS(Network FileSystem)即网络文件系统,它允许网络中的计...

详细>>

如何使用Linux下的系统日志,linux日志分析

加强安全(二)Linux可疑日志分析整理,linux日志分析 Hello,大家好,我是Lionel,距离2018还不到10天了,回忆起2017公司...

详细>>