部署tinyproxy透明代理服务
线上需要一个https的透明代理,开始打算用nginx,调试了一段时间发现配置较复杂且没有成功。后来用的tinyproxy做的透明代理。安装配置过程就是下载、解压、编译、安装、配置、启动一波流:
安装依赖
sudo apt-get install asciidoc
下载
sudo wget https://github.com/tinyproxy/tinyproxy/releases/download/1.8.4/tinyproxy-1.8.4.tar.gz -O tinyproxy-1.8.4.tar.gz
解压
sudo tar xvfz tinyproxy.1.8.4.tar.gz
编译配置
./configure --enable-transparent --prifix=/usr/local/tinyproxy
更多的编译选项可以参考源码目录的README文件,部分说明如下:
```
./configure
make
make install
in the top level directory to compile and install Tinyproxy. There are
additional command line arguments you can supply to configure. They
include:
--enable-debug If you would like to turn on full
debugging support
--enable-xtinyproxy Compile in support for the XTinyproxy
header, which is sent to any web
server in your domain.
--enable-filter Allows Tinyproxy to filter out certain
domains and URLs.
--enable-upstream Enable support for proxying connections
through another proxy server.
--enable-transparent
Allow Tinyproxy to be used as a
transparent proxy daemon
--enable-static Compile a static version of Tinyproxy
--with-stathost=HOST Set the default name of the stats host
Support
#编译
`sudo make`
#安装
`sudo make install`
修改配置文件一般需要指定用户、用户组、端口、访问IP段,当然这些都有默认值,然后启动程序和测试。
```
启动程序:
/usr/local/tinyproxy/sbin/tinyproxy -c /usr/local/tinyproxy/etc/tinyproxy.conf
测试代理节点是否生效(假设代理程序安装在10.10.10.10的机器,监听的是8888端口):
curl url --proxy 10.10.10.10:8888
如果是https代理加 -k 参数
curl url --proxy 10.10.10.10:8888 -k
```
关于配置文件的一点补充:
```
添加多段IP地址
Allow 10.27.80.0/24
Allow 11.65.48.0/24
Allow 18.90.12.145
添加head信息,https的代理不能添加(一条信息一条记录和ip访问限制设置一样)
AddHeader "Referer" "http://www.baidu.com"
部署tinyproxy透明代理服务的更多相关文章
- 部署tinyproxy代理服务
#安装依赖 yum install asciidoc #下载 wget https://github.com/tinyproxy/tinyproxy/releases/download/1.8.4/t ...
- CentOS如何部署TinyProxy
TinyProxy是个非常便利,及容易架设的HTTP代理 安装方法 rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release- ...
- Linux 部署Nginx反向代理服务 使用openssl自生成证书并配置https
1.安装Nginx编译所依赖的包 正常centos中可以使用yum安装一下依赖包: yum install -y gcc gcc-c++ pcre pcre-devel zlib zlib-devel ...
- Cloudflare Workers 部署跨域代理服务
项目源码:https://github.com/netnr/workers 发布链接:https://cors.zme.ink 使用文档:https://developers.cloudflare.c ...
- 使用Squid部署代理服务
Squid是Linux系统中最为流行的一款高性能代理服务软件,通常用作Web网站的前置缓存服务,能够代替用户向网站服务器请求页面数据并进行缓存.简单来说,Squid服务程序会按照收到的用户请求向网站源 ...
- Linux下squid代理缓存服务环境部署
代理服务器英文全称是Proxy Server,其功能就是代理网络用户去取得网络信息. Squid是一个缓存Internet 数据的软件,其接收用户的下载申请,并自动处理所下载的数据.当一个用户想要下载 ...
- kvm虚拟化管理平台WebVirtMgr部署-完整记录(安装ubuntu虚拟机)-(5)
之前介绍了在webvirtmgr平台下创建centos,windows server 2008的虚拟机,今天说下创建ubuntu虚拟机的过程. (1)首先下载ubuntu16.04的iso镜像放到/u ...
- 代理服务 SQUID 测试
第一部分:SQUID基础 Squid代理服务的基本配置: http_port 3128 #设置监听的IP与端口号 cache_mem 64 MB ...
- 正向代理tinyproxy使用总结
使用tinyproxy的问题背景: 其实以前代理一直用的是apache,后来,那次有个任务要给ios的推送设置代理,任务很紧急,可是apache报错. 原因如下:APNS发送通知的端口2195,但是A ...
随机推荐
- iOS 多线程安全 与 可变字典
这周最大的收获是稍稍通透了 多线程安全字典的重要性. 诱因是,发现了有字典坏地址错误 果断以为是 value 或者 key 是可能出现了空值,补充了潜在的判断,虽然有的位置已经预判断的,但 ...
- JAVA 对象序列化——Serializable(转)
文章出自:http://www.cnblogs.com/chenfei0801/archive/2013/04/05/3001149.html Java的对象序列化是指将那些实现了Serializab ...
- linux mkisofs(genisoimage)命令用法
功能说明:建立ISO 9660映像文件. 常用命令:genisoimage -o imagename.iso file 语 法:mkisofs [-adDfhJlLNrRTvz][-print-siz ...
- Linux下代理服务器(proxy)配置
Linux下有很多程序都只有命令行接口,对于这类程序,它们通过代理服务器(proxy)访问网络的方式也不尽相同.在本文中Easwy总结了一些常用Linux程序配置代理服务器的方法. [ 通用代理服务器 ...
- Python3.x:pdf2htmlEX(解析pdf)安装和使用
Python3.x:pdf2htmlEX(解析pdf)安装和使用 简介 pdf2htmlEX是一款优秀的pdf转换成html的工具: 下载 windows下载地址:http://soft.rubypd ...
- 二叉树、平衡二叉树、B-Tree与B+Tree
本文总结自:https://blog.csdn.net/chuixue24/article/details/80027689 二叉树(B树,binary tree) 左子树的键值 < 根的键值 ...
- poj 3253超时
哈夫曼树超时是因为每次都需要重排,十分浪费时间,即使是快排.
- 8月份的To-Do List
1.汲取归纳<Effective Objective-C 2.0 >的知识点 2.回顾网易云课堂翁恺老师的C语言相关课程, 为学习算法做好准备 3.读完Kelly McGonigal的&l ...
- 1163: [Baltic2008]Mafia
1163: [Baltic2008]Mafia Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 123 Solved: 70[Submit][Stat ...
- Spring AOP(6)-- XML配置
applicationContext-xml.xml <?xml version="1.0" encoding="UTF-8"?><beans ...