2012年7月10日星期二

[GFW BLOG(功夫网与翻墙)] 利用sockstunnel翻墙

原文:http://igfw.net/archives/10549

用Python写的socks5代理及其分支一文中介绍了几种代理工具,其中sockstunnel比较安全也比较麻烦些,我一直没测试,看到网络上一篇教程,喜欢的可以试试。

首先在你的linux vps上搭建python环境(一般来说,linux vps都已搭好了python 环境)
然后运行如下命令(假设你在/root下):
# openssl genrsa -out privkey.pem 2048 
# openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
这样在/root/下,就生成了privkey.pem和cacert.pem
下载源码:
# git clone git://github.com/wynemo/sockstunnel.git
# cd sockstunnel
修改sslserver.py里的
certfile=”cacert.pem”,
keyfile=”privkey.pem”,为
certfile=”/root/cacert.pem”,
keyfile=”/root/privkey.pem”, 

然后运行setsid python sslserver.py

回到本地windows机器,下载源码: https://github.com/wynemo/sockstunnel/zipball/master,解压下载
下来的压缩包,进入解压出来的目录,把里面的client.py的第57行 sslSocket.connect((‘server_ip’, 9999)) 中的
server_ip换成你vps服务器的ip.
在本地运行client.py(本地请先安装python-2.7.3:

http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi)并且设置firefox的socks5代理

127.0.0.1:7000后,就可翻墙了.

项目地址: https://github.com/wynemo/sockstunnel

原文http://briteming.blogspot.com/2012/07/sockstunnel.html

如果要在一个没有安装python的电脑上运行可以参考使用PyInstaller把你的Python程序转为Exe一文将其做成exe程序使用。



--
Posted By GFW BLOG 功夫网与翻墙 to GFW BLOG(功夫网与翻墙) at 7/10/2012 12:55:00 AM

--
1、翻墙利器赛风3下载地址: http://dld.bz/caonima326http://dld.bz/caonima745/
2、我们的订阅地址:http://feeds2.feedburner.com/chinagfwblog
3、停止订阅,请发邮件到
gfw-blog+unsubscribe@googlegroups.com
翻越防火长城,你可以到达世界上的每一个角落。(Across the Great Firewall, you can reach every corner in the world.)

没有评论:

发表评论