【问题标题】:android: mapping hostname to ipandroid:将主机名映射到 ip
【发布时间】:2017-04-18 00:37:52
【问题描述】:

windows/linux 上有一个名为 hosts 的文件,用于将服务器名称映射到 IP 地址。安卓有办法吗?

 192.168.1.22  domain1.com     
 192.168.1.22  domain2.com

这样做的原因是为了测试使用 HTTPS 在 Windows 机器上运行的 Web 应用程序。

【问题讨论】:

标签: android ip hosts server-name


【解决方案1】:

类似的问题,不同的 StackExchange 站点:

https://android.stackexchange.com/questions/60150/how-to-edit-etc-hosts-file

一般来说,ADB 是您的朋友。您还需要打开开发者模式,但我希望您已经在开发过程中这样做了。

/etc/hosts 仍然是 /etc/hosts,因为 Android 的核心是 Linux。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-05-07
    • 2017-10-30
    • 2018-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多