基于TinyProxy搭建HTTP代理服务器
来源:互联网 发布:java并发编程 豆瓣 编辑:程序博客网 时间:2024/06/05 04:10
一、前言
关于为什么要玩玩HTTP代理就不用我多说了。
二、搭建环境
* Linux laptop 2.6.32-45-generic #100-Ubuntu SMP Wed Nov 14 10:41:11 UTC 2012 i686 GNU/Linux * tinyproxy 1.8.1
三、安装方法
$sudo apt-get install tinyproxy安装后自动以root权限开启了tinyproxy服务,且默认监听端口是8888
四、启动帮助
$tinyproxy --helpUsage: tinyproxy [options]
Options are:
-d Do not daemonize (run in foreground).
-c FILE Use an alternate configuration file.
-h Display this usage information.
-l Display the license.
-v Display version information.
五、根用户的启动方法
* 默认启动$sudo service tinyproxy start
* 重启
$sudo service tinyproxy restart
* 停止
$sudo service tinyproxy stop
六、DIY配置
4.1 默认配置文件位置
/etc/tinyproxy.conf
(可以从/etc/init.d/tinyproxy包装器脚本中查到)
4.2 默认配置说明
* 以根用户启动时,在初始化完成后切换uid/gid为nobody/nogroup* Port 默认监听端口为8888(该端口无需用root权限绑定)
* 默认在所在网卡上监听
* Logfile (必须)日志文件, 默认/usr/var/log/tinyproxy/tinyproxy.log,在LogFile文件不存在时会警告,不会运行失败。
* Pidfile (必须)pid文件, 默认/usr/var/run/tinyproxy/tinyproxy.pid,在PidFile文件不存在时会运行失败。
* StartServers 初始启动的代理服务器子进程(默认是10个)
*** Allow 允许使用tinyproxy进行HTTP代理的IP地址。默认是127.0.0.1,如果想要公开tinyproxy代理服务器,则把Allow一行注释掉。
4.3 Diy配置说明
tinyproxy可以以普通用户权限运行,只要监听端口是公开的就可以了。具体Diy配置方法如下:-- 打包可执行程序与默认配置文件 --
1. $which tinyproxy
/usr/sbin/tinyproxy
2. $cp /usr/sbin/tinyproxy ~/bin
3. $cp /etc/tinyproxy.conf ~/etc
-- 修改配置 --
1. 将Port默认的8888改成你想要的端口(如ljysrv上面的8990 TCP端口)
2. 将Allow 127.0.0.1注释掉
3. 将Logfile改为/tmp/tinyproxy.log
4. 将PidFile改为/tmp/tinyproxy.pid
-- 启动 --
1. $cd ~/bin
2. $./tinyproxy -c ~/etc/tinyproxy.conf
-- 关闭 --
1. $killall tinyproxy
- 基于TinyProxy搭建HTTP代理服务器
- 移植tinyproxy http代理服务器
- 使用TinyProxy搭建代理服务器
- 腾讯云Ubuntu搭建TinyProxy代理服务器
- 利用 Tinyproxy 搭建 HTTP(S) 代理
- CentOS 7 安装 TinyProxy 代理服务器
- 使用nginx搭建http代理服务器
- 使用Nginx搭建Http代理服务器
- 搭建自己的http代理服务器
- 使用nginx搭建http代理服务器
- 使用nginx搭建http代理服务器
- 使用nginx搭建http代理服务器
- Nginx搭建HTTP正向代理服务器
- 搭建自己的http代理服务器
- Tinyproxy
- tinyproxy
- windows平台HTTP代理服务器搭建(CCproxy)
- liunx 系统下 squid 搭建HTTP 代理服务器
- 备忘录模式
- Js 错误 - Throw、Try 和 Catch
- WPF Image控件显示视频数据流
- 楠哥讲心得之三维重建
- 加载本地UITableViewCell
- 基于TinyProxy搭建HTTP代理服务器
- 九九乘法表
- Web Workers
- Matlab中的符号变量和符号运算
- web工程前后台验证(后台合法性校验和页面元素校验)统一处理
- 数据挖掘及相关应用
- CSS3概述
- 设计模式___策略模式
- 文本特征选择的关键算法总结