荣耀之链论坛

 找回密码
 立即注册
搜索
查看: 3463|回复: 4

centos 搭建代理服务器

[复制链接]

1325

主题

2372

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
10262
发表于 2018-1-7 20:59 | 显示全部楼层 |阅读模式
http://blog.csdn.net/cysdxy/article/details/53031810
使用tinyproxy:

安装
yum install tinyproxy

配置
vim /etc/tinyproxy/tinyproxy.conf
修改Port 端口号为你想设定的值
将Allow 选项后面的IP改成你想使用这个代理的客户机的IP,如果你想任何人都可以访问,把这行前面加个#注释一下就行了

使用
service tinyproxy stop
service tinyproxy start
service tinyproxy restart
来停止、启动、重启tinystart

将tinyproxy设置开机启动
chkconfig --level 2345 tinyproxy on

设置防火墙
iptables -I INPUT -p tcp --dport 设置的代理端口 -j ACCEPT  && service iptables save &&service iptables restart



然后在浏览器的代理选项那里IP就填服务器的IP,端口就填刚刚设置的端口

回复

使用道具 举报

1325

主题

2372

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
10262
 楼主| 发表于 2018-1-7 20:59 | 显示全部楼层
这两个都是实测第一次能成功,但是马上就会被防火墙封掉

然后下面那个不知道为什么,检测失败,但是又是可以使用的
我发现chrome还是不如极速方便

回复 支持 反对

使用道具 举报

1325

主题

2372

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
10262
 楼主| 发表于 2018-1-8 00:17 | 显示全部楼层
http://blog.csdn.net/zjiang1994/article/details/74925039

这个是sock5的代理 实测第一次可以用,但是第二个页面就不行了,难道这么块就被防火墙收录了?

以上命令的汇总一条一条粘贴就好(vim编辑部分需要自己编辑)。

yum install gcc openldap-devel pam-devel openssl-devel
wget http://jaist.dl.sourceforge.net/ ... /ss5-3.8.9-8.tar.gz
tar -vzx -f ss5-3.8.9-8.tar.gz
cd ss5-3.8.9/
./configure
make
make install
chmod a+x /etc/init.d/ss5
service ss5 start
vim /etc/opt/ss5/ss5.conf
# 修改配置文件
service ss5 restart


这个socket5代理默认的端口是1080

回复 支持 反对

使用道具 举报

1325

主题

2372

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
10262
 楼主| 发表于 2018-1-8 16:59 | 显示全部楼层
搭建影梭服务器
http://blog.csdn.net/hksangs/article/details/53397287
http://blog.csdn.net/AirenMc/article/details/61932633
yum install python-setuptools && easy_install pip

pip install shadowsocks

ssserver -p 1280 -k password -m aes-256-cfb -d start
// ssserver -p 服务器端口 -k 密码 -m 加密方法 -d start 代表后台运行

输入上面的命令就是已经运行成功了  
如果需要再加一个用户可以再输入命令,注意密码和端口变一下
ssserver -p 1281 -k password1 -m aes-256-cfb -d start




下面是配置文件运行的方式,并且有多用户

算了,下面的方式不知道为什么不行还是用单用户吧




创建/etc/shadowsocks/目录
mkdir /etc/shadowsocks

在/etc/shadowsocks/目录下创建配置文件
vim /etc/shadowsocks/conf.json

// 单用户配置
{
"server":"your_server_ip",     // 你的服务器ip
"server_port":8388,             // 端口号(每一个账号都不能重复)
"local_address": "127.0.0.1",  // 本地地址,一般不变
"local_port":1080,             // 本地端口,一般不变
"password":"*********",            // 连接密码
"timeout":300,                 // 相应超时时间
"method":"aes-256-cfb",            // 加密方式
"fast_open": false             //  使用TCP_FASTOPEN, 参数选项true / false,一般保持默认即可
}

// 多用户配置
{
"server":"your_server_ip",
"local_address": "127.0.0.1",
"local_port":1080,
"port_password":{
      "8989":"password0",           // 左边是端口号,右边是密码
      "9001":"password1",
      "9002":"password2",
      "9003":"password3",
      "9004":"password4"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}

根据配置文件启动
ssserver -c /etc/shadowsocks/conf.json start // 前台运行
ssserver -c /etc/shadowsocks/conf.json -d start // 后台运行
ssserver -c /etc/shadowsocks.json -d stop // 停止服务

回复 支持 反对

使用道具 举报

1325

主题

2372

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
10262
 楼主| 发表于 2018-5-14 16:24 | 显示全部楼层
ssserver -p 1280 -k password -m aes-256-cfb -d stop
停止这个用户
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

荣耀之链

GMT+8, 2025-6-18 03:01 , Processed in 0.013656 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表