-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathssprivoxy.txt
63 lines (56 loc) · 1.64 KB
/
ssprivoxy.txt
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#-----------------------
#本代码将安装shadowsocks和privoxy
#执行后再运行的apt-get等操作将通过shadowsocks以提高网络访问速度
#
#适用场景:
# 在优质网络服务器上搭建好ss后 用于 提升国内服务器/自己电脑的网速
#
#PS: 如果您只需要简单开个代理,建议使用tinyproxy
#-----------------------
#安装shadowsocks,使用豆瓣源
mkdir -p ~/.pip
echo """
[global]
index-url = http://pypi.doubanio.com/simple/
[install]
trusted-host=pypi.doubanio.com
""">~/.pip/pip.conf
pip install shadowsocks
#在screen中运行sslocal
screen -S ss
sslocal ... #直接运行有参数说明的,这里就不细说了
#按下Ctrl+A d,测试一下:
curl ip.cn --proxy socks5://127.0.0.1:1080
#安装privoxy:
apt-get install -y privoxy
echo """
user-manual /usr/share/doc/privoxy/user-manual
confdir /etc/privoxy
logdir /var/log/privoxy
actionsfile match-all.action
actionsfile user.action
logfile logfile
toggle 1
enable-remote-toggle 0
enable-remote-http-toggle 0
enable-edit-actions 0
enforce-blocks 0
buffer-limit 4096
enable-proxy-authentication-forwarding 0
forwarded-connect-retries 0
accept-intercepted-requests 0
allow-cgi-request-crunching 0
split-large-forms 0
keep-alive-timeout 5
tolerate-pipelining 1
socket-timeout 300
listen-address 127.0.0.1:8118
forward-socks5 / 127.0.0.1:1080 .
""">/etc/privoxy/config
service privoxy restart
#安装好了privoxy就可以修改系统环境变量设置代理啦:
export http_proxy="http://127.0.0.1:8118"
export https_proxy="http://127.0.0.1:8118"
#测试一下:
curl ip.cn
#大功告成~