linux使用ss代理

1.安装ss

yum -y install epel-release
yum install -y python-setuptools && easy_install pip
pip install shadowsocks
vim /etc/shadowsocks.json  (服务端配置)
{ 
"server":"45.63.xx.xx", 
"server_port":10086, 
"local_address": "127.0.0.1", 
"local_port":1080, 
"password":"********", 
"timeout":600, 
"method":"rc4-md5"
}

sslocal -c /etc/shadowsocks.json -d start

2.安装polipo代理

cd /tmp
git clone https://github.com/jech/polipo.git
yum install -y gcc gcc-c++ texinfo
cd polipo
make all
mkdir /etc/polipo
vim /etc/polipo/config

proxyAddress = "0.0.0.0"
socksParentProxy = "127.0.0.1:1080"
socksProxyType = socks5
chunkHighMark = 50331648
objectHighMark = 16384
logFile = "/tmp/polipo.log"
daemonise = true
serverMaxSlots = 64
serverSlots = 16
serverSlots1 = 32

./polipo -c /etc/polipo/conf
export http_proxy="http://127.0.0.1:8123/"
curl www.google.com

[root@XXX polipo]# curl ip.gs
当前 IP:45.63.xx.xx 来自:日本东京都东京 choopa.com
取消代理:unset http_proxy
全局生效可以添加到/etc/profile

添加新评论