部署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 ...
随机推荐
- 数据结构&算法(二)_算法基础之前传(递归、时间复杂度、空间复杂度、二分查找)
什么是算法: 间而言之算法(Algorithm):一个计算过程,解决问题的方法 递归的两个特点: 调用自身 结束条件 递归示例: def func(x): : print("我的小鲤鱼&qu ...
- shell sed 命令
1:行首空格 sed 's/^[ \t]*//g' 2:行末空格 sed 's/[ \t]*$//g' 3,删除行首的空格或TAB,并删除<tr>.cat poem2id.txt | ...
- iPhone获取手机里面所有的APP(私有库)+ 通过包名打开应用
1.获取到手机里面所有的APP包名 - (void)touss { Class lsawsc = objc_getClass("LSApplicationWorkspace"); ...
- JavaScript返回顶部特效
样式: <style type="text/css"> /*返回顶部特效*/ a { border: none; text-decoration: none; outl ...
- JMS、MQ、ActiveMQ
JMS 的一个标准或者说是一个协议. 通常用于企业级应用的消息传递. 主要有topic 消息(1 对多), queue 消息(1对1). ActiveMQ 是一个JMS 的实现, apache 出的. ...
- Python3:自动发送账单邮件
Python3:自动发送账单邮件 一.前言 民间借贷,没有信用卡那样,每月会收到账单:为了民间借贷管理更加合理化,写了个还款账单小程序. 二.源码 (1)配置文件代码: [dbmysql] ip = ...
- Apache 工作模式配置优化
Apahce 工作模式配置 1.查看当前MPM工作模式 /usr/local/apache2/bin/apachectl -V Server version: Apache/2.4.27 (Unix) ...
- navicate中文破解版,注册码
https://pan.baidu.com/s/1nvIIOad 用户名随意,有下在面的KEY就可以了NAVN-LNXG-XHHX-5NOO
- Maven的SSM框架配置文件:
applicationContext.xml: <?xml version="1.0" encoding="UTF-8"?> <beans x ...
- Python 之 matplotlib (十六)Animation动画【转】
本文转载自:https://blog.csdn.net/wangsiji_buaa/article/details/80057875 代码: import matplotlib.pyplot as ...