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:
- configure the proxy for use with terminal (to run
apt update
,wget
, etc.) - configure the proxy for browser
- avoiod "cached proxy" conflict and other problems when use more tham one connection.
Links checked for clues:
Best Answer
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