HTC/Android 4.4.2

I am trying to set up VPN at work, which requires me to define a proxy server. I can long-tap on the staff WiFi name and enable advanced options, which allows me to define the proxy and port – except that the Save button seems to grey-out or not depending on what I type. It seems to be validating the proxy address as I type.

My problem is that our work proxy server address contains slashes, which the validation doesn't accept. So, if I enter proxy.pac then I can save it, however, I need to enter http://xxx.com/proxy.pac

Having looked around the forums, I think this must be a fairly rare problem - I see only a few references to this field not accepting a slash (in relation to adBlock). Although this does give me some assurance that its not just me, it doesn't really seem to offer a solution - those forums seem to find either a trailing space at the end of the proxy name, or that entering the form's fields in a reverse order then enables the save button.

So my questions are:

  1. Is this a known problem? Can it be repeated elsewhere? Am I doing something stupid?

  2. Can a 3rd party app offer a solution? I've tried some, eg "Proxy Settings" but it too doesn't allow the slash, also seeming to attempt to validate the hostname setting and refusing to accept what I need to enter.

  3. Would rooting the phone help me? I see a lot of the available apps for setting proxies require that the phone has been rooted - I am reluctant to do this unless I know it will solve my problem.

  4. I am aware there is a new release of Andriod around the corner... perhaps somebody with hands-on experience can see whether this problem still exists (simply try and enter a string with a slash in it for proxy settings, if you can press enter then I'll be first in the queue to upgrade when its available for me)

Any help/comments much appreciated!


As stated by Lie Ryan's answer, the proxy.pac file is a javascript file. In the Proxy Settings on your Android, you can only enter the address, port number, and sometimes a username and password.

What you can do is either ask your SysAdmin for the Proxy Server and Port Number, or just look at the file yourself. On a system that's already on the network, navigate to the address, and see what the file contains. Below is an example for my organization (some data modified):

function FindProxyForURL(url, host)
   if (isInNet(host, "", "")) {
      return "DIRECT";
   } else {
      if (shExpMatch(url, "http:*")) 
         return "PROXY" ;
      if (shExpMatch(url, "https:*"))
         return "PROXY" ;
      if (shExpMatch(url, "ftp:*"))
         return "PROXY" ;
     return "DIRECT";

The important part is what it wants the proxy address to return; in my case, it's I can enter this into my Android, and all my data goes through my proxy. I can check my proxy logs (I use squid), and see the requests for pages going to my phone, without requiring an actual 'proxy.pac' file on my phone.


Your http://xxx.com/proxy.pac is not a proxy server, it is the address to a proxy automatic configuration (PAC) file. A PAC file contains a Javascript function that determines which proxy address to use and/or whether you're allowed to go direct when connecting to a particular URL.

ProxyDroid (requires root) claims to support proxy configuration using PAC file (I had never personally used it though).

  • Ah, thank you, this is very interesting. Now I start to understand a little more. As with many things, knowing what to search for is half the problem! I will investigate further.
    – Jamie
    Nov 19 '14 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.