Android 设备上的互联网访问位于具有身份验证的代理后面
我无法通过 android 模拟器 2.2 连接到互联网,该模拟器位于需要代理身份验证的代理后面。
在互联网上搜索了很多以找到合适的解决方案,但没有一个适合我。
我正在 Ubuntu 机器上运行模拟器。
情况: 我有一个设计为在 ubuntu(linux) 和 android 上运行的应用程序。
该应用程序具有通过提供代理详细信息连接到互联网的功能,并且在提供正确的详细信息后在 ubuntu 上运行时可以正确连接。但是,这无法通过模拟器连接。 即使模拟器上的网络浏览器也无法连接到互联网。对 APN 设置进行一些更改后,它至少给了我一个网页,说 ISA 服务器需要身份验证,但从未收到任何弹出窗口要求输入这些详细信息。
通过将 -debug-proxy 标志应用于模拟器,日志显示它正在尝试连接到所请求的代理服务器,但服务器在身份验证方面面临挑战,并且所有应用程序似乎都没有机会填写此详细信息,因此失败。这就是我的应用程序发生的情况。
有谁知道为什么会发生这种情况以及我如何解决这个问题? 提前致谢。
PS 这也发生在实际的 Android 设备上,所以这可能不仅仅是模拟器的问题。
I am unable to connect to the Internet through android emulator 2.2 which is behind a proxy that requires proxy authentication.
Searched a lot over the Internet to find a proper solution but none of them are working for me.
I am running the emulator on a Ubuntu machine.
Situation:
I have an application which is designed to run on both ubuntu(linux) and android.
This application has a feature to connect to internet by providing proxy details and it connects properly when run on ubuntu after providing correct details. however this fails to connect through the emulator.
Even the web browser on the emulator doesn't connect to internet. Doing some changes in APN settings, it atleast gave me a webpage saying that the ISA server needs authentication, but never got any popup requesting to enter those details.
By applying -debug-proxy flag to emulator, the logs showed that it is trying to connect to the requested proxy server, but the server is challenging with authentication and none of the applications seem to get a chance to fill in this details and hence failing. This is what is happening with my application.
Does anyone have any clue why this could be happening and how i can resolve this issue?
Thanks in advance.
P.S. This is happening on actual android devices as well, so it may not be the problem of just the emulator.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
Puneet ...按照 viv 所说的操作,同时给出 IP 格式的代理地址,而不是给出其 DNS 名称。我读过一些内容,指出解析 DNS 名称时出现问题。
Puneet ... Do as viv said and along with this give proxy address in its IP format instead of giving its DNS name. I have read some where that it is having problem in resolving DNS name.
如果我错了请告诉我,但我认为 Puneet 正在谈论 wifi 连接。因此,解决方案不是像移动网络那样配置 APN。我遇到了同样的问题,并且仍在寻找解决方案......
Tell me if I'm wrong but I think Puneet is talking about wifi connection. So the solution is not to configure an APN as it's for mobile networks. I got the same problem and I'm still searching for a solution...
有一种简单的方法可以让您在设备上访问互联网,但仅限于浏览。除浏览器外,其他应用程序都无法访问互联网。您可以在 http://androidproxy.blogspot.in/2011 上找到详细信息/01/setting-up-proxy.html。
要获取 IP 地址,只需 ping 组织中的代理服务器即可。默认端口为 8080。
There is a simple method by which you can get internet access on the device but only for browsing. Except the browser no other apps will have access to internet. You can find detailed information on http://androidproxy.blogspot.in/2011/01/setting-up-proxy.html.
In order to get the IP address just ping the proxy server in your organisation. By default the port is 8080.
您可以使用代理管理器应用程序从经过身份验证的代理后面连接到互联网。
You can use Proxy Manager application to connect to internet from behind a authenticated proxy.
试试这个:
进入设置->无线和网络 ->移动网络->接入点名称。
如果您在此处看到任何条目,请编辑其设置
Try this:
Go to setings -> wireless and networks -> Mobile networks -> Access point name.
If you see any entry here, edit it's settings
我知道这是一篇旧帖子,但对于提出同样问题的人来说,我确实从代理网络中的手机进行连接,需要使用现在 Android 市场上的 Autoproxy 应用程序进行身份验证: https://market.android。 com/details?id=com.mgranja.autoproxy_lite&feature=search_result&rdid=com.mgranja.autoproxy_lite&rdot=1&pli=1
I know this is an old post but just for people asking the same question, I did connect from my phone in proxy network that required authentication by using the Autoproxy app that is now in the android market: https://market.android.com/details?id=com.mgranja.autoproxy_lite&feature=search_result&rdid=com.mgranja.autoproxy_lite&rdot=1&pli=1
如果您使用webview,您可以在设置时覆盖webviewclient的onReceivedHttpAuthRequest方法。
if you use webview, you can override onReceivedHttpAuthRequest method of webviewclient when set it.