安装

Xeoncross/lowendscript

benjamin74/3proxy

配置

假设搭建3proxy服务的server ip为xxx.xxx.xxx.xxx

准备配置proxy用户名为somepu,密码为somepw

开启的http proxy端口为2356,开启的socks5 proxy端口为3456

示例/etc/3proxy/3proxy.cfg文件

#nserver 8.8.8.8
daemon
service
users somepu:CL:somepw
log /var/log/3proxy.log D
logformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
rotate 7
auth strong
flush
allow somepu
maxconn 20

# starting HTTP proxy with disabled NTLM auth ( -n )
proxy -p2356 -n

# starting SOCKS proxy
socks -p3456 -n

# starting POP3 proxy on port 110
#pop3p

测试

启动3proxy: cd /etc/3proxy && ./3proxy 3proxy.cfg

用curl通过http代理取页面:curl -x somepu:somepw@xxx.xxx.xxx.xxx:2356 http://abbypan.blogspot.com -v

用curl通过socks5代理取页面:curl --proxy socks5h://somepu:somepw@xxx.xxx.xxx.xxx:3456 http://abbypan.blogspot.com -v



Published

20 November 2014

Categories

Tags


Share On