LGA1150
V2EX  ›  Google

用 SNI Proxy 反代 www.googleapis.com 出现的问题

  •  
  •   LGA1150 · Jan 19, 2015 via Android · 4730 views
    This topic created in 4159 days ago, the information mentioned may be changed or developed.
    在VPS上用SNIProxy反代了Google,手机上用时发现很多APP工作不正常
    有些人也发现了这个问题 www.v2ex.com/t/150922
    经过我的排查,发现问题出在www.googleapis.com上
    于是做了以下测试:
    (1) 在原来基础上,手机用浏览器直接访问https://www.googleapis.com 未出现证书错误
    (2) 在hosts中把www.googleapis.com指向证书不是*.googleapis.com的IP,出现与(1)相同的情况(即浏览器正常,APP不正常)
    (3) 在VPS上开放80端口,并NAT到www.googleapis.com的443端口,手机上把访问VPS的443端口的包NAT到VPS的80端口。一切正常

    这是什么原因?如何解决?
    10 replies    2016-02-11 23:50:44 +08:00
    phoenixlzx
        1
    phoenixlzx  
       Jan 19, 2015 via Android   ❤️ 1
    我用了很久的现成配置没遇到过问题
    拿去不谢
    https://gist.github.com/phoenixlzx/bd9ae2629e3e1e72e978

    顺便
    80端口要有个Nginx,访问啥斗给强制跳到HTTPS的443。配合hosts或DNS有奇效
    LGA1150
        2
    LGA1150  
    OP
       Jan 19, 2015 via Android
    @phoenixlzx 文件改好了,但问题照旧
    主要表现在Google Now无法刷新,位置报告无法更新位置,Google+应用的 个人信息-简介-位置信息分享设置 打不开,Google健身无法显示图表等
    wind4
        3
    wind4  
       Jan 19, 2015
    @phoenixlzx 感谢你的配置。前几天sniproxy被扫到了。有没有什么好的办法,防止被滥用?
    phoenixlzx
        4
    phoenixlzx  
       Jan 19, 2015 via Android
    @LGA1150 那是你运营商的问题吧。。。


    @wind4 限制IP。。。之类的?
    wind4
        5
    wind4  
       Jan 19, 2015
    @LGA1150 Google Play好像不支持SNIProxy,我用Chrome(Android)能正常访问,Google Play就直接提示刷新。
    LGA1150
        6
    LGA1150  
    OP
       Jan 19, 2015 via Android
    @phoenixlzx 任何网络环境都这样
    我觉得是证书验证出了问题
    phoenixlzx
        7
    phoenixlzx  
       Jan 20, 2015 via Android
    因为没用 Google Now 所以不知道
    是否支持SNI应该是系统说了算吧,不是哪个应用说的算的
    AVC
        8
    AVC  
       Feb 4, 2015
    谷歌不少的应用是不支持SNI标签的,直接连接IP没有任何域名信息
    chrome支持sni标签,打开的时候自然没问题
    但是应用连接的时候和https://IP的效果是一样的.googleapis最好用端口转发,而不是sniproxy.同理不支持SNI的应用还有推特客户端,FB客户端
    LGA1150
        9
    LGA1150  
    OP
       Feb 4, 2015 via Android
    @AVC 和我想的一样
    uncleroot
        10
    uncleroot  
       Feb 11, 2016
    手机上 google play 用的是 5228 端口 TCP 的, sniproxy 不支持。估计很多 APP 也是专用的 APP 接口,现在 twitter 解决污染后可以直接使用。很多网站只是 DNS 污染,解决 DNS 污染即可。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   994 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 22:28 · PVG 06:28 · LAX 15:28 · JFK 18:28
    ♥ Do have faith in what you're doing.