Android模拟器:无法全局使代理设置在所有应用程序中工作

huangapple go评论115阅读模式
英文:

Android Emulator: Not able to get Proxy settings to work globaly across all apps

问题

我在尝试在HTTP代理后面运行所有应用程序时遇到了困难。我尝试使用"-http-proxy"选项,但似乎对某些代理提供商无效/存在问题。另外,我已经尝试了APN方法,但不幸的是,它不能全局地为所有应用程序启用代理功能。

是否可以请任何人提供建议或替代方法来解决这个问题?

英文:

I have encountered difficulties while attempting to run all apps behind an HTTP proxy. I have tried using the "-http-proxy" option, but it appears to be ineffective/buggy with certain proxy providers. Additionally, I have explored the APN method, but unfortunately, it does not enable the proxy to function globally for all apps.

Could anyone kindly provide suggestions or alternative approaches to address this issue?

答案1

得分: 1

模拟器代理设置:
在Android模拟器中,您可以尝试在设备的网络设置中直接设置代理:

  1. 打开模拟器上的设置应用。
  2. 转到“网络与互联网”或“Wi-Fi”设置。
  3. 找到活动的网络连接(通常标记为Wi-Fi)并点击它。
  4. 寻找“代理”或“高级”设置选项。
  5. 根据您的需求配置代理设置(例如,输入代理主机名/IP和端口)。
  6. 保存设置并重新启动模拟器。

系统代理设置:
另一种方法是在Android模拟器内的系统级别配置代理设置:

  1. 打开模拟器上的设置应用。
  2. 转到“网络与互联网”或“Wi-Fi”设置。
  3. 找到活动的网络连接(通常标记为Wi-Fi)并点击它。
  4. 点击“代理”或“高级”设置。
  5. 选择“手动”或“代理自动配置”并输入代理详细信息。
  6. 保存设置并重新启动模拟器。

使用PAC文件配置代理:
您可以尝试使用代理自动配置(PAC)文件来配置模拟器的代理设置:

  1. 将PAC文件托管在模拟器可以访问的Web服务器上。
  2. 打开模拟器上的设置应用。
  3. 转到“网络与互联网”或“Wi-Fi”设置。
  4. 找到活动的网络连接(通常标记为Wi-Fi)并点击它。
  5. 点击“代理”或“高级”设置。
  6. 选择“自动”并输入PAC文件的URL。
  7. 保存设置并重新启动模拟器。

第三方模拟器:
如果内置的Android模拟器不符合您的需求,您可以考虑使用提供更好代理支持的第三方模拟器:

英文:

Emulator Proxy Settings:
In the Android emulator, you can try setting the proxy directly within the device's network settings:

Open the Settings app on the emulator.
Go to "Network & internet" or "Wi-Fi" settings.
Find the active network connection (usually labeled as Wi-Fi) and tap on it.
Look for the "Proxy" or "Advanced" settings option.
Configure the proxy settings according to your requirements (e.g., enter the proxy hostname/IP and port).
Save the settings and restart the emulator.
System Proxy Settings:
Another approach is to configure the proxy settings at the system level within the Android emulator:

Open the Settings app on the emulator.
Go to "Network & internet" or "Wi-Fi" settings.
Find the active network connection (usually labeled as Wi-Fi) and tap on it.
Tap on "Proxy" or "Advanced" settings.
Choose "Manual" or "Proxy Auto-Config" and enter the proxy details.
Save the settings and restart the emulator.
Proxy Configuration with a PAC File:
You can try using a Proxy Auto-Configuration (PAC) file to configure the proxy settings for the emulator:

Host the PAC file on a web server accessible to the emulator.
Open the Settings app on the emulator.
Go to "Network & internet" or "Wi-Fi" settings.
Find the active network connection (usually labeled as Wi-Fi) and tap on it.
Tap on "Proxy" or "Advanced" settings.
Choose "Automatic" and enter the URL of the PAC file.
Save the settings and restart the emulator.
Third-Party Emulator:
If the built-in Android emulator doesn't meet your needs, you can consider using a third-party emulator that offers better proxy support:

huangapple
  • 本文由 发表于 2023年7月6日 13:05:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/76625653.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定