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

android 手机更改 dns,访问局域网内的域名,失败,求指教。

  •  
  •   bigxu · Jan 21, 2018 · 4419 views
    This topic created in 3061 days ago, the information mentioned may be changed or developed.
    1. 更改 dns 服务器
      手机上更改 dns 服务器为局域网内 dns 服务器: 192.168.0.105
    2. 手机上测试域名解析及端口:IP 解析成功,80 打开 scan host "v.localhost": 192.168.0.105 80 success
    3. 手机浏览器访问 http://v.localhost 失败: connect refused
    4. 电脑 http server tcpdump 抓包,没有发现连接申请。
    5. 手机测试直接访问 IP:成功
      浏览器直接访问 http://192.168.0.105 成功
    Supplement 1  ·  Jan 21, 2018
    解决了 x.localhost 不行的 x.com 之类的行
    4 replies    2018-01-21 18:10:33 +08:00
    Tianao
        1
    Tianao  
       Jan 21, 2018 via iPhone
    是不是缓存没有刷新?
    bigxu
        2
    bigxu  
    OP
       Jan 21, 2018
    @Tianao 清空浏览器缓存试了,不行
    sunnyadam
        3
    sunnyadam  
       Jan 21, 2018
    手机加走电脑的代理,然后抓包
    bigxu
        4
    bigxu  
    OP
       Jan 21, 2018
    @sunnyadam 多谢,搞定了。是浏览器的问题。

    https://iyware.com/dont-use-dev-for-development

    .test
    .example
    .invalid
    .localhost
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   933 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 20:37 · PVG 04:37 · LAX 13:37 · JFK 16:37
    ♥ Do have faith in what you're doing.