#!/bin/bash if command -v pip >/dev/null 2>&1; then : else yum install -y python-pip fi if command -v sslocal >/dev/null 2>&1; then : else pip install shadowsocks fi sslocal -s xxx.xxx.xxx.xxx -p xx -k xx -m aes-256-cfb -d restart if command -v privoxy >/dev/null 2>&1; then : else yum install -y privoxy fi line1='forward-socks5 / localhost:1080 .' line1new=`head -n 1 /etc/privoxy/config` if [ "$line1" != "$line1new" ]; then sed -i '1iforward-socks5 / localhost:1080 .' /etc/privoxy/config fi service privoxy restart export http_proxy=http://127.0.0.1:8118;export https_proxy=http://127.0.0.1:8118;
CentOS 一键安装shadowsocks客户端和privoxy
回复