利用sni proxy做国内的出墙服务,使用什么方式连接到境外服务器比较好?

2013-01-04 01:12:37 +08:00
 iCodex
这个设想很简单,只是为了保证单位人员的上网需求,同时方便记录所浏览的站点。
由于高墙对国内的服务器没有做过滤,因此只要电信运营商没有做关键词过滤和特征过滤,应该不会有问题的。
使用HTTPS-SNI-Proxy https://github.com/dlundquist/HTTPS-SNI-Proxy

假设A服务器:国内机房 180.149.133.188
上面安装sni proxy,监听80端口和443端口,然后配置文件中添加了一些网站
B服务器:香港电讯盈科

cat /etc/sni_proxy.conf
user nobody

listen 180.149.133.188 80 {
proto http
table http_hosts
}
listen 180.149.133.188 443 {
proto tls
table https_hosts
}

table http_hosts {
twitter.com 199.59.148.10 80
twitter.com 199.59.150.39 80
.*\.twitter\.com\$ 199.59.149.230 80
.*\.youtube\.com\$ 203.208.46.206 80
.*\.ytimg\.com\$ 203.208.46.206 80
.*\.google\.com\$ 203.208.46.200 80
.*\.google\.com\.hk\$ 74.125.31.190 80
.*\.googleusercontent\.com\$ 203.208.46.200 80
.*\.googlecode\.com\$ 203.208.46.200 80
.*\.gstatic\.com\$ 203.208.46.200 80
.*\.ggpht\.com\$ 203.208.46.200 80
.*\.googleapis\.com\$ 173.194.72.95 80
.*\.googlesyndication\.com\$ 74.125.31.190 80
.*\.googlehosted\.com\$ 74.125.31.190 80
}

table https_hosts {
twitter.com 199.59.148.10 443
twitter.com 199.59.150.39 443
.*\.twitter\.com\$ 199.59.149.230 443
.*\.youtube\.com\$ 203.208.46.206 443
.*\.ytimg\.com\$ 203.208.46.206 443
.*\.google\.com\$ 203.208.46.200 443
.*\.google\.com\.hk\$ 74.125.31.190 443
.*\.googleusercontent\.com\$ 203.208.46.200 443
.*\.googlecode\.com\$ 203.208.46.200 443
.*\.gstatic\.com\$ 203.208.46.200 443
.*\.ggpht\.com\$ 203.208.46.200 443
.*\.googleapis\.com\$ 173.194.72.95 443
.*\.googlesyndication\.com\$ 74.125.31.190 443
.*\.googlehosted\.com\$ 74.125.31.190 443
}

然后服务器上配置完了,我只需要在单位网关上做dns污染这些域名的解析就可以实现代理

现在google和youtube的可以指定谷歌北京的IP 203.208.32.0/19,但其他的域名比如twitter就需要一个通道连接到境外的B服务器了。一般这种情况,用什么方式会比较好?综合安全性和速度方面 ipsec?openvpn?
17036 次点击
所在节点    服务器
1 条回复
sNullp
2013-01-04 09:19:45 +08:00
IPSec 会比 OpenVPN 好得多。特别是CISCO/IPSec,strongSwan可以搭建

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/56515

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX