How to set Proxy Auto Config (PAC) file in sdcard of Android

扶醉桌前 提交于 2019-12-23 12:37:29

问题


Excuse me? I pushed the file 'proxy.pac' to sdcard using this command:

 adb push C:\Users\zuokang.li\Documents\proxy.pac /sdcard/ 

I try to set proxy auto config in android. So I set pac url "file:///sdcard/proxy.pac".But it cannot work.

I don't know whether it is set right. Can you help me ? Thanks!


回答1:


I experienced the same issue with my android phone, and searching for a solution I noted that the only one is to access to a web server for getting the .pac file (as Roy explains). But I wanted the solution (all about this) locally in my phone.

I installed a thin web server in my phone called SimpleHttpServer from Google Play and proceed as you do to set the .pac file using the URL provided by the web server (previously, I created a directory, located the .pac file inside it and pointed the web server root folder to that directory).

Additionally, I installed Simple Text Editor for .pac file edition and everything works as expected.




回答2:


Apparently Android doesn’t accept setting a local PAC file (127.0.0.1 doesn't seem to work either) and may even cause browser crashes for an invalid proxy port (-1). Therefore either

  • Use http://some_host/proxy.pac and store the file on some host, or
  • Use Firefox for Android and the exact same settings you used above (verified) - see https://www.topbug.net/blog/2015/03/02/configure-proxy-using-pac-files-on-firefox-for-android/ for info.



回答3:


For use a PAC file in Android you can use Drony, looks ugly, but works! Even if you need authentication.

https://play.google.com/store/apps/details?id=org.sandroproxy.drony



来源:https://stackoverflow.com/questions/29691220/how-to-set-proxy-auto-config-pac-file-in-sdcard-of-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!