0

It is a corporate network with proxy. The proxy URL is a proxy file... The only way to use apt install or apt updatE on my fresh desktop Ubuntu 18 LTS (installed by pendrive without internet) is using a client-proxy defined by the following PAC file at its address http://pac._proxyDomain_/proxy.pac:

myip = myIpAddress();

function FindProxyForURL(url, host)
{
        if (isPlainHostName(host))
        return "DIRECT";

         // Bypass Local Network
     if (isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0")
        || isInNet(dnsResolve(host), "etc", "etc")
        || ...
         || isInNet(dnsResolve(host), "etc", "etc"))
         return "DIRECT";

         // Bypass Local IP
     if ( isInNet(dnsResolve(host), "etc", "etc")
         || isInNet(dnsResolve(host), "etc", "etc")
         || isInNet(dnsResolve(host), "etc", "etc"))
         return "DIRECT";

         // Bypass URL
     if ((host == "domain1")  
         || (host == "domain2")
        || (host == "etc")
         || (host == "etc"))
         return "DIRECT";

         // Bypass Domain
     if (shExpMatch(url, "*.domain")
      || shExpMatch(url, "*.etc")
      || shExpMatch(url, "*.etc"))
         return "DIRECT";

         //Encaminha todo o trafego que restante para o PROXY CORPORATIVO
         return "PROXY _IP_:8080; DIRECT";
}

How to install and use UBUNTU with PAC proxy?

When using install wizard there are no option to upload PAC file.


Note: supposing that "PAC file" is "Proxy Auto-Configuration"... And in the past there are no direct solution but in nowadays (2019!) there are solutions... A summary of the question is "where is the modern solution?".



Notes for alternative solutions:

If there are no Linux solution (!!??) for automatic use of PAC file, an solution is to reconnect computer by different proxy options (no proxy or with proxy in the same network connection), so a easy way to:

  1. configure the proxy for use with terminal (to run apt update, wget, etc.)
  2. configure the proxy for browser
  3. avoiod "cached proxy" conflict and other problems when use more tham one connection.

Links checked for clues:

1 Answers1

0

You don't need a PAC file. The purpose of the PAC is to have different proxy configurations for different hostnames/domains. Assuming your installing over the internet, use the actual proxy server that you need to use. In the case of this PAC file, _IP_:8080

rtaft
  • 1,825
  • Thanks (!), good clues, near solution: there are many options, how to run the BIG PAC javascript and obtain the answer for "my proxy is...??" – Peter Krauss Jul 29 '19 at 18:11
  • It's been a while since i have dealt with these, but I thought you could download the automatic proxy config just by browsing to http://proxy, though that could have been the network I was on. There is always Wireshark if you have full access to that network. – rtaft Jul 29 '19 at 19:41
  • Hi @rtaft, even Wireshark "is a network analysis tool and packet analyzer" (ref), so it is also not a solution for my problem: I need plug-and-play Internet access... There exist a solution? How to configure internal Linux http_proxy exporters and passwords? I need simple plug-and-play Internet for all my machine, from browser to terminal apt update. – Peter Krauss Jul 29 '19 at 19:56
  • Do you have a copy of the actual pac file? – rtaft Jul 30 '19 at 00:26
  • Hi @rtaft. Yes, I have the proxy.pac but is available only in the internal network... Need permission to show to public... (The "etc" "etc" on my script is not good?) What you need? perhaps some lines and IPs I can show. – Peter Krauss Jul 30 '19 at 00:36