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'