Privoxy搭建代理服务器

Docker Hub镜像地址

Dockerfile

FROM alpine

EXPOSE 8118

RUN apk --no-cache --update add privoxy wget ca-certificates bash p7zip && \
wget https://s3.amazonaws.com/ab2p/ab2p.all_rus.7z && \
mkdir temp && \
7za e ab2p.all_rus.7z -y -otemp && \
cp temp/ab2p.system.action temp/ab2p.action temp/ab2p.system.filter temp/ab2p.filter /etc/privoxy && \
sed -i'' 's/127\.0\.0\.1:8118/0\.0\.0\.0:8118/' /etc/privoxy/config && \
sed -i'' 's/enable-edit-actions\ 0/enable-edit-actions\ 1/' /etc/privoxy/config && \
sed -i'' 's/#max-client-connections/max-client-connections/' /etc/privoxy/config && \
sed -i'' 's/accept-intercepted-requests\ 0/accept-intercepted-requests\ 1/' /etc/privoxy/config && \
sed -i'' 's/http/https/g' /etc/privoxy/ab2p.system.filter && \
echo 'actionsfile ab2p.system.action' >> /etc/privoxy/config && \
echo 'actionsfile ab2p.action' >> /etc/privoxy/config && \
echo 'filterfile ab2p.system.filter' >> /etc/privoxy/config && \
echo 'filterfile ab2p.filter' >> /etc/privoxy/config && \
rm -Rf temp ab2p.all_rus.7z && \
apk del bash p7zip
RUN chown privoxy.privoxy /etc/privoxy/*
ENTRYPOINT ["privoxy"]
CMD ["--no-daemon","--user","privoxy","/etc/privoxy/config"]

RUN

docker run -d --restart unless-stopped --name privoxy -p 8118:8118 splazit/privoxy-alpine

TEST

curl -vv https://www.bing.com --proxy localhost:8118

最新文章

  1. [OC] NSURLSession
  2. staxon实现json和xml互转
  3. H5案例分享:JS手势框架 —— Hammer.js
  4. (转载)JavaWeb学习总结(五十二)——使用JavaMail创建邮件和发送邮件
  5. 斐讯k1路由器刷Breed BootLoader(不死UBoot)教程
  6. HTTP详解(3)-http1.0 和http1.1 区别
  7. 【转载】让c++ 函数返回一个数组
  8. Codeforces Round #214 (Div. 2) c题(dp)
  9. CSS选择器笔记
  10. Unit Testing PowerShell Code with Pester
  11. sphinx (coreseek)——3、区段查询 与 增量索引实例
  12. 特性(Attributes)
  13. bug 修复:上传库存时前端回发file_name参数丢失;
  14. 通过Xshell连接CentOS虚拟机
  15. k8s 网络模型
  16. Django框架(七)
  17. Python基础(5)——函数
  18. 在浏览器中输入url回车之后会发生什么
  19. 【CF757G】Can Bash Save the Day? 可持久化点分树
  20. 有意思的JSON.parse()、JSON.stringify()

热门文章

  1. Mstar 平台(648)唤醒之串口唤醒
  2. Xmanager PowerSuite 6企业版详细安装破解教程,解决评估过期问题(附注册机,全网独家可用),非学校/家庭免费版
  3. github将本地仓库的代码上传到Github
  4. OSS利用ossutil64上传文件
  5. HTML a标签链接 设置点击下载文件
  6. SNF快速开发平台2019-权限管理模型-记录级-字段级权限实践
  7. 巧用List.stream()方法对List做处理
  8. openvswitch2.11.0修改源码后重新编译(2)
  9. python中的__futrue__模块,以及unicode_literals模块
  10. Windows版的OpenJDK下载(Red Hat 提供)