安装依赖
yum install asciidoc -y
下载对应版本
在github下载需要版本的安装包:github路径为https://github.com/tinyproxy/tinyproxy/releases
编译服务
我这里采用直接编译,然后把编译好的二进制程序和配置文件拷贝到指定的位置。
# Tinyproxy使用configure基于automake系统的标准GNU 脚本。如果从git checkout编译,则需要先运行
./autogen.sh
# 从顶级目录生成configure脚本。发行版tarball包含预先创建的configure脚本,因此从发布版本构建时,您可以跳过此步骤。那么基本上你需要做的就是
./configure
make
make install
部署服务
编译完成后把src
下的tinyproxy
程序文件和etc/tinyproxy.conf
拷贝到对应的位置,启动之前说下几个重要的配置文件选项
# 服务的启动用户和用户组
User soul
Group soul
# 服务端口
Port 8888
# 日志目录
LogFile "/opt/logs/tinyproxy/tinyproxy.log"
# 允许访问的网段
Allow 0.0.0.0/0
# 设置代理密码
BasicAuth user password
配置文件配置完成后就可以直接启动程序
./tinyproxy -c ./tinyproxy.conf
# 启动完成后可以查看对应的端口和日志信息确认服务运行状态
测试
使用curl命令进行代理服务测试
curl ifconfig.me --proxy 172.16.32.235:8888 -U user:password