标签 shadowsocks 下的文章

Centos7 一键安装 $$

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
yum update -y

yum install -y python-setuptools net-tools

easy_install pip

pip install --upgrade pip shadowsocks

cat>/etc/systemd/system/shadowsocks-server.service<<EOF
[Unit]
Description=Shadowsocks Server
After=network.target

[Service]
ExecStart=/usr/bin/ssserver -c /etc/ss-config.json
Restart=always

[Install]
WantedBy=multi-user.target
EOF

num=$((30000 + RANDOM))
pass=`date +%s | sha256sum | base64 | head -c 12`

cat>/etc/ss-config.json<<EOF
{
    "server_port":$num,
    "password":"$pass",
    "timeout":60,
    "method":"rc4-md5"
}
EOF


systemctl daemon-reload
systemctl enable shadowsocks-server
systemctl restart shadowsocks-server
systemctl status shadowsocks-server

cat /etc/ss-config.json

kcptun

VERSION=20170930
wget https://github.com/xtaci/kcptun/releases/download/v$VERSION/kcptun-linux-amd64-$VERSION.tar.gz
tar zxf kcptun-linux-amd64-$VERSION.tar.gz
rm -f client_linux_amd64 kcptun-linux-amd64-$VERSION.tar.gz
chmod a+x server_linux_amd64
mv -f server_linux_amd64 /usr/bin


num=$((30000 + RANDOM))
pass=`date +%s | sha256sum | base64 | head -c 12`
port=`grep -oP "\d{4,5}" /etc/ss-config.json`

cat>/etc/kcp-config.json<<EOF
{
    "listen":":$num",
    "target":"127.0.0.1:$port",
    "key":"$pass",
    "crypt":"aes-192",
    "mode":"fast2"
}
EOF

cat>/etc/systemd/system/kcp-server.service<<EOF
[Unit]
Description=Kcptun server
After=network.target

[Service]
ExecStart=/usr/bin/server_linux_amd64 -c /etc/kcp-config.json
Restart=always

[Install]
WantedBy=multi-user.target
EOF


systemctl daemon-reload
systemctl enable kcp-server
systemctl restart kcp-server
systemctl status kcp-server

cat /etc/kcp-config.json

使用Privoxy将socks5代理转为http代理

访问谷歌

大家都知道shadowsocks只提供了SOCKS5的代理,而没有提供http代理,而很多软件仅提供了http代理的支持,比如老高需要使用shell命令行扶墙,或者使用git同步android的源代码,再或者更新android SDK,该怎么办呢?

老高在此介绍一个软件Privoxy,它可以作为代理的代理,为我们解决上述问题!

Privoxy is a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data and HTTP headers, controlling access, and removing ads and other obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual needs and tastes. It has application for both stand-alone systems and multi-user networks.

由介绍看来,privoxy的功能可远远不止http代理这么简单!

- 阅读剩余部分 -