利用sockstunnel翻墙(原创文章)

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

首先在你的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 
related post: http://briteming.blogspot.com/2012/06/shadowsocks.html(利用shadowsocks翻墙) 

没有评论: