如何将LocalHost IP(127.0.0.1)更改为10.0.2.2 [英] How to change LocalHost IP (127.0.0.1) to 10.0.2.2

查看:1059
本文介绍了如何将LocalHost IP(127.0.0.1)更改为10.0.2.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。即时开发在Android中的应用程序。

此应用程序连接到Web应用程序并返回有关某些产品的数据...

由于某些原因,我需要连接LocalHost(IIS)。
为此目的
我必须将LocalHost ip(127.0.0.1)更改为(10.0.2.2)!

但我不知道怎么做!

我使用Windows8

解决方案

您无法从127.0.0.1更改本地环回。它在 RFC 中定义[ ^ ],它是标准的一部分。



我想,你的服务器有DHCP。您只需要拥有原始地址和所需的额外地址(10.0.2.2)。您可以在界面上切换到静态IP,并添加两个地址,如下所述: http://www.tutorialspoint.com/shorttutorials/assign-multiple-ip-addresses-to-windows-8-computer [ ^ ]。


hi . im developing an application in android .
this app connects to a web application and Returns data about some products ...
For some reasons i need to connect LocalHost(IIS) .
for this purpose I have to change LocalHost ip (127.0.0.1) to (10.0.2.2) !
But i dont know How !
I Use Windows8

解决方案

You can't change local loopback from 127.0.0.1. It is defined in the RFC[^], it is part of the standard.

I suppose, your "server" has DHCP. You simply need to have your original address AND your desired extra address (10.0.2.2). You can switch to static ip on your interface, and add both addresses, like described here: http://www.tutorialspoint.com/shorttutorials/assign-multiple-ip-addresses-to-windows-8-computer[^].


这篇关于如何将LocalHost IP(127.0.0.1)更改为10.0.2.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆