轻量级 HTTP(s) 代理 TinyProxy

  

 

J

  CentOS 下安装 TinyProxy

  yum install -y tinyproxy

  启动、停止、重启

  # 启动service tinyproxy start# 停止service tinyproxy stop# 重启service tinyproxy restart

  相关配置

  默认配置文件路径

  /etc/tinyproxy/tinyproxy.conf

  允许所有人使用代理,注释 Allow 127.0.0.1

  # Allow 127.0.0.1

  修改监听端口号, 默认 8888

  Port 1234

  代理请求过滤,示例:仅允许代理请求 anoyi.com 的内容,配置如下:

  # 指定过滤内容的文件位置Filter /etc/tinyproxy/filter# 使用 URL 过滤而不是 domainsFilterURLs On# 允许代理过滤文件里的地址,若不允许,此处设置为 NoFilterDefaultDeny Yes

  然后在 /etc/tinyproxy/filter 文件添加如下内容:

  anoyi.com

  查看代理请求日志

  tail -f /var/log/tinyproxy/tinyproxy.log

  应用场景

  请求国外的资源,例如 谷歌,youtube 。。。

猜你喜欢

转载自www.cnblogs.com/qfjavabd/p/10310378.html
今日推荐