open×××是差很少是你们用来作×××服务器的首先,那open×××如何突破防火墙的封锁咧,有两种解决方案,一是用open×××自带的http-proxy,二是用HttpTunnelnode
1、利open×××自带的http-proxy突破防火墙的封锁
Open×××自己可使用http代理,也就是说,Open×××客户端不是直接和Open×××服务器链接,而是使用http代理进行链接。这个特性是Open×××的外围特性,不是其核心的,然而却能解决不少实际问题,它至关于隧道外面又套了一个隧道,不过这个外面的隧道并非真实的隧道,由于它并无封装,而仅仅是假装了端口信息而已,然而无论怎么说,它仍是使用http代理服务器的connect方法的。具体流程就是:服务器
1.Open×××客户端链接http代理服务器(CONNECT方法);tcp
2.http代理服务器链接Open×××服务器;ide
3.http代理服务器在Open×××客户端和Open×××服务器之间中转数据。ui
Open×××客户端 --> http代理服务器 --> Open×××服务器spa
http代理服务器和Open×××服务器可安装在同一台机器上
配置Open×××服务器(安装过程可见之前的博文):代理
cat /etc/open***/server.confserver
- port 9091
- proto tcp #协议启用tcp
- dev tap
- ca ca.crt
- cert server.crt
- key server.key
- dh dh1024.pem
- server 10.9.0.0 255.255.255.0
- #ifconfig-pool-persist ipp.txt
- client-config-dir /etc/open***/ccd
- push "route 10.9.0.0 255.255.255.0"
- push "redirect-gateway def1 bypass-dhcp"
- push "dhcp-option DNS 8.8.8.8"
- keepalive 10 120
- comp-lzo
- user nobody
- group nobody
- persist-key
- persist-tun
- status status.log
- log open***.log
- verb 3
配置http代理服务器,这里就用squid(安装过程见之前博文)xml
cat /etc/squid/squid.confip
- http_port 8080 #启用通常不会被封的端口
- access_log /var/log/squid/access.log squid
- auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/userpw #用户名密码认证
- acl password proxy_auth REQUIRED
- http_access allow password
- acl all src 0.0.0.0/0.0.0.0
- http_access allow all
- coredump_dir /var/spool/squid
- header_access Via deny all
- header_access X-Forwarded-For deny all
Open×××客户端配置:
- client
- dev tap0
- dev-node *** #tap网卡名称
- proto tcp
- remote 222.101.202.303 9091
- nobind
- persist-key
- persist-tun
- ca ca.crt
- cert client001.crt
- key client001.key
- ns-cert-type server
- comp-lzo
- verb 3
- http-proxy 222.101.202.303 8080 pw.txt #pw.txt为squid的用户名和密码认证文件,用户名一行,密码一行
- http-proxy-retry
cat pw.txt
test #squid认证用户名
test123 #squid认证密码
如今就开始用open×××客户端去链接open×××服务端,若是出现如下的提示信息,就说明经过http-proxy链接open×××服务端成功了
Wed Dec 05 14:24:53 2012 Send to HTTP proxy: 'CONNECT 203.169.243.4:18181 HTTP/1.0' Wed Dec 05 14:24:53 2012 Attempting Basic Proxy-Authorization Wed Dec 05 14:24:55 2012 HTTP proxy returned: 'HTTP/1.0 200 Connection established'