首页 技术 正文
技术 2022年11月15日
0 收藏 588 点赞 4,451 浏览 1190 个字

一、安装

Shadowsocks使用socks5协议,而终端很多工具目前只支持http和https等协议,所以我们为终端设置Shadowsocks的思路就是将socks5协议转换成http协议,然后为终端设置即可。

安装polipo(github地址:https://github.com/jech/polipo)

yum install -y texi2html texinfo
git clone https://github.com/jech/polipo.git
cd polipo
make all
make install

二、配置polipo

vi /etc/polipo/config

socksParentProxy = "127.0.0.1:10080"
socksProxyType = socks5
proxyAddress="0.0.0.0"
proxyPort=
logFile = /var/log/polipo
logLevel =
logSyslog = true
daemonise=true
chunkHighMark =
objectHighMark = serverMaxSlots =
serverSlots =
serverSlots1 =

polipo -v 可以查看支持的选项

三、启动polipo

polipo -c /etc/polipo/config

四、polipo监听58888端口

[root@k8s polipo]# ss -lntup|grep polipo
tcp LISTEN *: *:* users:(("polipo",pid=,fd=))

五、测试

curl -x 10.0..x:  ip.gs

六、添加http_proxy环境变量,实现全局代理

当前会话生效

[root@k8s ~]# export http_proxy=http://10.0.0.32:58888
[root@k8s ~]# export https_proxy=http://10.0.0.32:58888
[root@k8s ~]# curl ip.gs
Current IP / 当前 IP: xx.xx.xx.xx
ISP / 运营商: xxxxx
City / 城市: xx
Country / 国家: xx
IP.GS is now IP.SB, please visit https://ip.sb/ for more information. / IP.GS 已更改为 IP.SB ,请访问 https://ip.sb/ 获取更详细 IP 信息!
Please join Telegram group https://t.me/sbfans if you have any issues. / 如有问题,请加入 Telegram 群 https://t.me/sbfans /\_/\
=( °w° )=
) ( //
(__ __)//

取消此环境变量,关闭代理

unset http_proxy

同时可以将下面环境变量设置的语句添加到/etc/profile、~/.bashrc等文件来实现更大的代理范围

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,492
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,907
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,740
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,493
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,132
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,295