让影梭和搬瓦工帮你科学上网

文章目录

  1. 1. server
    1. 1.1. shadowsocks
  2. 2. client
    1. 2.1. Mac-shadowsocks
    2. 2.2. polipo
    3. 2.3. Android shadowsocks
    4. 2.4. IOS

环境:

  • server:shadowsocks(Linux)
  • client:shadowsocks(Mac) , polipo

硬广:推荐VPS“搬瓦工”
理由有3:

  • shadowsocks server: 一键安装(后续可自定义配置)
  • 性价比高:目前比较便宜的是 $19.99 一年,256MB内存的VPS,而且可以用 支付宝 支付
  • 操作不能在简单了!

Shadowsocks具体干啥的,都懂得,介绍详见Shadowsocks

准备工作:
VPS“搬瓦工”买一个合适的VPS,然后用支付宝支付!

接下来走安装流程,需要linux一些基础(server_ip和port,password请自行替换自己的)
利用ssh登陆VPS

1
2
3
ssh root@your_ip -p your_port
#替换你的ip和端口(系统会邮件发给你)
#输入你的密码

server

shadowsocks

不推荐自己安装,依赖解决太麻烦:
centos6一键安装脚本

利用官方一键安装:
KiwiVM (进入管理平台)

  • Install new OS 》 选择Centos 6 x86 minimal 或者 Centos 6 x86_64 minimal安装即可,别作死安装centos7啊
  • Shadowsocks Server 》安装Shadowsocks 》默认生成的已经可以用了,但是我们要自己可配端口和密码
  • 自定义配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
vi /etc/shadowsocks.json
{
"server":"0.0.0.0",
"local_port":1080,
"port_password":{
"port1":"password1",
"port2":"password2"
},
"timeout":120, //超时时间
"method":"aes-256-cfb",
"fast_open":false, //如果你的服务器 Linux 内核在3.7+,可以开启 fast_open 以降低延迟
"workers":1 //workers数量
}
#结束掉系统安装的shadowsocks server
killall ssserver
#启用自己配置的shadowsocks server
/usr/bin/ssserver -c /etc/shadowsocks.json --user nobody -d start

client

Mac-shadowsocks

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
brew install python3
pip3 install shadowsocks
brew install openssl swig libevent
pip3 install m2crypto gevent
vi /usr/local/etc/shadowsocks-libev.json
{
"server":"my_server_ip",
"server_port": your_port,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"*****",
"timeout": 60,
"method":"aes-256-cfb"
}
# 启动
sudo touch /var/run/sslocal.pid /var/log/sslocal.log
sudo sslocal -c /usr/local/etc/shadowsocks-libev.json --user root --pid-file /var/run/sslocal.pid --log-file /var/log/sslocal.log -d start

polipo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
brew install polipo
# 设置开机启动,并添加shadowsocks转换
vim /usr/local/opt/polipo/homebrew.mxcl.polipo.plist
-----------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.polipo</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/polipo/bin/polipo</string>
<string>socksParentProxy=127.0.0.1:1080</string>
</array>
<!-- Set `ulimit -n 20480`. The default OS X limit is 256, that's
not enough for Polipo (displays 'too many files open' errors).
It seems like you have no reason to lower this limit
(and unlikely will want to raise it). -->
<key>SoftResourceLimits</key>
<dict>
<key>NumberOfFiles</key>
<integer>20480</integer>
</dict>
</dict>
</plist>
-----------------------------------
ln -sfv /usr/local/opt/polipo/homebrew.mxcl.polipo.plist ~/Library/LaunchAgents/homebrew.mxcl.polipo.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.polipo.plist
#这样开机回自动运行 :polipo socksParentProxy=127.0.0.1:1080
** 命令行执行番羽墙加上下边两句 **
https_proxy=http://127.0.0.1:8123 http_proxy=http://127.0.0.1:8123
** 建议设置alias **
alias fq="https_proxy=http://127.0.0.1:8123 http_proxy=http://127.0.0.1:8123"

Android shadowsocks

温馨提示:不用ROOT!!!
shadowsocks-android(目前最新V3.1.3)

IOS

没有找到能用的IOS版本,知道的告我下!

到这里祝贺你科学上网了,google吧!

如有疑问,请留言或邮件newbvirgil@gmail.com
本文链接 : http://blog.newbmiao.com/2015/11/28/shadowsocks-polipo-vps.html