• 请不要在回答技术问题时复制粘贴 AI 生成的内容
shuijinliuxi
V2EX  ›  程序员

最新的 Chrome 浏览器地址栏直接输入中文内容会提示:您是不是要访问 http:xn--

  •  
  •   shuijinliuxi · Oct 6, 2018 · 12742 views
    This topic created in 2954 days ago, the information mentioned may be changed or developed.

    以前在深圳那边完全没出现这情况,最近国庆回家,用着家里的中国移动宽带,然后就有这问题,把 WIFI 切换到手机热点也正常没有弹框。本来以为是运营商劫持,但又有以下的情况:

    1. 搜索英文不会出现这情况;
    2. 直接 TAB 键使用搜索引擎搜索不会出现这情况;

    点击 http:xn-- 后直接进入的是 http://express.hivedata.com.cn/navi/news/homePage 这个网址,广州移动的。

    哪位知道这是什么导致的?

    28 replies  •  2018-10-07 23:32:34 +08:00
    ZenFX
    ZenFX
    Oct 6, 2018 via Android❤️2
    1
    随便 ping 一个不存在的域名,看能不能解析到 ip,如果可以的话,那就是运营商对 DNS 做了处理,当访问不存在域名时自动跳转到自己页面。你搜索中文的时候,因为这个中文在运营商的 DNS 可以解析到 ip,chrome 会误认为那是一个可以正常打开的网页,所以会出现你上面那个提示。解决方法就是用公共 DNS,前提是公共 DNS 没有被劫持。
    ranye
    ranye
    Oct 6, 2018
    2
    chrome 自带的功能,我昨天搜 node.js 就弹了
    shuijinliuxi
    shuijinliuxi
    OP
    Oct 6, 2018
    3
    @ZenFX

    ping http://www.fakedomain.com

    ping: cannot resolve http://www.fakedomain.com: Unknown host
    ZenFX
    ZenFX
    Oct 6, 2018 via Android
    4
    @shuijinliuxi 不要加前面 http:// 部分再试下
    shuijinliuxi
    shuijinliuxi
    OP
    Oct 6, 2018
    5
    @ranye

    如果是这样的话,那我切换到手机热点应该也会有同样的弹框才对,但是结果并没有。不过 @ZenFX 的解释好像能通,应该是运营商的 DNS 不同导致的,手机的网络是中国联通的,可能区别在这吧……
    shuijinliuxi
    shuijinliuxi
    OP
    Oct 6, 2018
    6
    @ZenFX

    呃,犯了低级错误。

    ING …… (69.172.201.153): 56 data bytes
    ZenFX
    ZenFX
    Oct 6, 2018
    7
    @shuijinliuxi 你这个域名本身就可以正常解析 ip,我说的不存在域名指的是没做解析的那种,比如 www.cmiowejfioawjef.com 这种乱码类型的
    ZenFX
    ZenFX
    Oct 6, 2018
    8
    @shuijinliuxi 你也可以随便 ping 一串中文,看能不能正常 ping 通
    fengleelogos
    fengleelogos
    Oct 6, 2018 via Android
    9
    chrome 更新版本后,默认不跳转到 https 服务了,这个不知道和 dns 有没有关系
    shuijinliuxi
    shuijinliuxi
    OP
    Oct 6, 2018
    10
    @ZenFX 你的那个(cmiowejfioawjef)也显示可以解析,对应 IP 是:221.179.46.194
    shuijinliuxi
    shuijinliuxi
    OP
    Oct 6, 2018
    11
    @ZenFX ping 中文也可以通:

    ping 内容
    PING xn--v6qq2w (221.179.46.194): 56 data bytes
    64 bytes from 221.179.46.194: icmp_seq=0 ttl=54 time=15.699 ms
    64 bytes from 221.179.46.194: icmp_seq=1 ttl=54 time=16.506 ms
    64 bytes from 221.179.46.194: icmp_seq=2 ttl=54 time=21.858 ms
    Request timeout for icmp_seq 3
    ZenFX
    ZenFX
    Oct 6, 2018❤️3
    12
    @shuijinliuxi 这就说明你们运营商的 DNS 对不存在的域名做了手脚,实际上这个域名是没有做解析的,正常情况是 ping 不通的,221.179.46.194 这个 IP 也是广州移动的 IP。
    shuijinliuxi
    shuijinliuxi
    OP
    Oct 6, 2018
    13
    @ZenFX 嗯,知道问题所在了,谢谢
    bethebetter
    bethebetter
    Oct 6, 2018
    14
    @shuijinliuxi #13 大兄 dei,考虑换到开源自由的 Firefox 不?[媚眼]
    junjieyuanxiling
    junjieyuanxiling
    Oct 6, 2018 via Android
    15
    联通网络没有此状况。
    flowfire
    flowfire
    Oct 6, 2018 via iPhone
    16
    @bethebetter #14 已经切换到开放自由的 firefox + duckduckgo + protonmail + openstreetmap,手动斜眼
    skylancer
    skylancer
    Oct 6, 2018
    17
    is feature not bug

    而且很多个版本之前已经有了
    CodeMan27
    CodeMan27
    Oct 6, 2018
    18
    @shuijinliuxi 给楼主一个建议:
    看一看 http://www.example.com/
    点进里面的链接,会有关于 http://xn--什么什么的内容
    例如我用 360 浏览器,在新标签页里面输入 http://xn--0zwm56d,
    下面会有显示‘ http://测试’
    devotenimabi
    devotenimabi
    Oct 6, 2018
    19
    Punycode 了解一下
    maohhgg
    maohhgg
    Oct 6, 2018
    20
    http://xn-- 开头的我觉得是 chrome 把你输入的中文识别为域名了。你说的在我这并不能复现。是你最近经常浏览中文域名的网站么?
    maohhgg
    maohhgg
    Oct 6, 2018
    21
    http://express.hivedata.com.cn/navi/news/homePage 这个大概是在你访问的 http://{中文} 的域名不能访问,移动自己的报错页面。而且人家也给你说了啊。“网络正常,页面出错啦~”。移动给你说了你当前的网络是正常的,只是你给的域名打不开而已。
    starship
    starship
    Oct 6, 2018
    22
    联想到了 Punycode 钓鱼攻击
    https://www.v2ex.com/t/355984
    ggsimidar
    ggsimidar
    Oct 6, 2018
    23
    这显然是输入的中文被当作中文域名了,就像我输入个 g 就会有 google.com 一样,看一下自己浏览历史和书签里面有没有这个域名
    wdy3334
    wdy3334
    Oct 6, 2018 via Android
    24
    之前几个版本都遇到过,改成 114.114.114.114 过两天再改回来就好了,反正我是不知道
    wdy3334
    wdy3334
    Oct 6, 2018 via Android
    25
    @wdy3334 不知道原因
    franklinyu
    franklinyu
    Oct 7, 2018
    26
    @starship #22 然而蘋果官網有 EV
    alfchin
    alfchin
    Oct 7, 2018 via iPhone
    27
    @bethebetter 你的 firefox 会不会偷偷给收藏夹内的京东书签加返利链接?
    Inkway
    Inkway
    Oct 7, 2018
    28
    重装 Ubuntu 也遇到了相同问题,DNS 改为 8.8.8.8 就好了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1443 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 59ms · UTC 15:52 · PVG 23:52 · LAX 07:52 · JFK 10:52
    ♥ Do have faith in what you're doing.