Bug 1313773

Summary: [RFE] Cannot use a Proxy Auto-Configuration file with DNF
Product: [Fedora] Fedora Reporter: Richard Connon <richard>
Component: dnfAssignee: rpm-software-management
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: rawhideCC: dominik.mierzejewski, marcosfrm, orion, packaging-team-maint, tmlcoch, vmukhame
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Richard Connon 2016-03-02 10:28:26 UTC
DNF does not use system-wide proxy configuration settings and its local configuration does not support a Proxy Auto-Configuration (PAC) file.
Many environments (especially corporate networks) require the use of a PAC file to select an appropriate proxy and especially on corporate laptops it is often necessary to use a proxy in some locations but not others.

Comment 1 Honza Silhan 2016-03-14 12:26:46 UTC
Tomas, is there any workaround for this in librepo?

Comment 2 Tomas Mlcoch 2016-03-14 15:29:06 UTC
PAC files are files with a java script function which returns an address (or addresses) of available proxy servers [1]. Libcurl doesn't support PAC files [2], although some years ago, it looked that PAC is around the corner [3].

I see several options how this could be implemented for librepo/dnf:

1) Use a JavaScript interpreter and interpret the PAC files in Librepo. - This most likely an overkill.

2) Interpret the PAC before Librepo is used and just set appropriate proxy server to librepo (e.g. via env variable http_proxy, ftp_proxy, etc.)

3) Use libproxy, I've just found the library and I'm not sure if it could help here or not but I'll investigate that.


[1] https://en.wikipedia.org/wiki/Proxy_auto-config
[2] https://curl.haxx.se/docs/faq.html#Does_curl_support_Javascript_or
[3] https://curl.haxx.se/mail/archive-2002-06/0094.html

Comment 3 Tomas Mlcoch 2016-03-14 15:31:04 UTC
pacparser C library also exists, but it's not packaged for Fedora:
https://github.com/pacparser/pacparser

Comment 4 Tomas Mlcoch 2016-03-15 08:00:00 UTC
I saw yum devels were solving the same issue:
https://bugzilla.redhat.com/show_bug.cgi?id=542224#c27
They wanted to use libproxy with pacrunner plugin [1] [2], but they was waiting for pacrunner support in Network Manager.

There is a document about Network Manager and proxy support [3] - the support is not implemented yet.

[1] https://admin.fedoraproject.org/pkgdb/package/rpms/pacrunner/
[2] https://apps.fedoraproject.org/packages/libproxy-pacrunner
[3] https://wiki.gnome.org/Projects/NetworkManager/Proxies

Comment 5 Honza Silhan 2016-03-21 15:31:22 UTC
Thanks for investigation, Tomas. We will wait for Network manager to support it first.

Comment 6 Fedora Admin XMLRPC Client 2016-07-08 09:26:17 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Marcos Mello 2017-03-13 10:11:41 UTC
What is the status of this bug?

Now that NM 1.6 is released, can we have pacrunner updated to 0.10 in Fedora? And compiled with --enable-libproxy?

If I get the design right:

- pacrunner RPM (or a pacrunner-libproxy subpackage) would Obsoletes+Provides libproxy
- dnf would ask libproxy.so for proxy configuration
- pacrunner's libproxy implementation would start pacrunner daemon
- NM would notice pacrunner is running and configure it via D-Bus with WPAD proxies (and manual ones too?)


Relevant info:

https://atulhjp.wordpress.com/author/atulhjp/

https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?h=bg/pacrunner&id=9f0eeb29854c5d85e4fcc60fb15bdc1c52bd932c (not merged yet in NM 1.6 branch)

Comment 8 Marcos Mello 2017-03-13 10:16:47 UTC
pacrunner update request:

https://bugzilla.redhat.com/show_bug.cgi?id=1429122

Comment 9 Orion Poplawski 2019-02-14 17:23:03 UTC
Any progress here?