V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iCodex
V2EX  ›  服务器

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

  •  
  •   iCodex · 2013-01-04 01:12:37 +08:00 · 17028 次点击
    这是一个创建于 4123 天前的主题,其中的信息可能已经有所发展或是发生改变。
    这个设想很简单,只是为了保证单位人员的上网需求,同时方便记录所浏览的站点。
    由于高墙对国内的服务器没有做过滤,因此只要电信运营商没有做关键词过滤和特征过滤,应该不会有问题的。
    使用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?
    1 条回复    1970-01-01 08:00:00 +08:00
    sNullp
        1
    sNullp  
       2013-01-04 09:19:45 +08:00   ❤️ 1
    IPSec 会比 OpenVPN 好得多。特别是CISCO/IPSec,strongSwan可以搭建
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1730 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 16:37 · PVG 00:37 · LAX 09:37 · JFK 12:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.