Fedora Linux Support Community & Resources Center
  #1  
Old 29th March 2017, 06:44 PM
lemgruber Offline
Registered User
 
Join Date: Mar 2017
Location: Brazil
Posts: 2
windows_7chrome
Mult proxy configuration

Hello, I'm a starter in the linux World.

I'm trying to configure a connection with a proxy to use the YUM at my job, but in my Fedora OS I don't have the YUM.CONF, I just have a YUM.REPOS.D .

How can I configure the proxy in this repository?
Reply With Quote
  #2  
Old 29th March 2017, 08:24 PM
SteveGYBE Offline
Registered User
 
Join Date: Jun 2007
Location: Lytham St Annes, Lancashire, UK
Posts: 675
linuxfedorafirefox
Re: Mult proxy configuration

Over the past couple of years, Fedora has replaced YUM with a re-written and tidied-up version ( ) called DNF. DNF's configuration file is /etc/dnf/dnf.conf, but the options are largely the same as were used in yum.conf.

You can check the commands as there is a manual page for this configuration file - enter "man dnf.conf" - but these are the lines that you are probably interested in
Quote:
proxy string

URL of a proxy server to connect through. If none is specified then direct connection is used (the default).

proxy_username string

The username to use for connecting to the proxy server. Empty by default.

proxy_password string

The password to use for connecting to the proxy server. Empty by default.
If I remember, the above are unchanged from yum.conf.
Reply With Quote
  #3  
Old 29th March 2017, 09:20 PM
lemgruber Offline
Registered User
 
Join Date: Mar 2017
Location: Brazil
Posts: 2
linuxfedorafirefox
Re: Mult proxy configuration

Quote:
Originally Posted by SteveGYBE View Post
Over the past couple of years, Fedora has replaced YUM with a re-written and tidied-up version ( ) called DNF. DNF's configuration file is /etc/dnf/dnf.conf, but the options are largely the same as were used in yum.conf.

You can check the commands as there is a manual page for this configuration file - enter "man dnf.conf" - but these are the lines that you are probably interested inIf I remember, the above are unchanged from yum.conf.
Great!!! I`ts working now, thank you very much!

But, I`m thinking if i can do a custon "script" inside this dnf.conf, to disable this proxy when I use my laptop at home.

I searched the are something like this:

Quote:
if (isInNet(myIpAddress(), "192.168.1.0", "255.255.255.0") ||
isInNet(myIpAddress(), "192.168.2.0", "255.255.255.0"))
{
return "PROXY proxy1.university.edu:8080; PROXY proxy2.university.edu:8080; DIRECT";
}
else
{
return "DIRECT";
}
can I use something like this?
Reply With Quote
  #4  
Old 29th March 2017, 10:04 PM
SteveGYBE Offline
Registered User
 
Join Date: Jun 2007
Location: Lytham St Annes, Lancashire, UK
Posts: 675
linuxfedorafirefox
Re: Mult proxy configuration

I don't think so - the dnf.conf file looks like it merely provides custom values for variables used by DNF.

You could try creating two template files, e.g. dnf.conf.DIRECT and dnf.conf.PROXY and then using an external script to copy the required file over the the existing dnf.conf as required (using the "-f" flag to ensure that the command does not wait for you to type "y" to confirm the copy!) For example
Code:
/usr/bin/cp -f /etc/dnf/dnf.conf.DIRECT /etc/dnf/dnf.conf
You could then see if you could add your script the "Startup Applications" which are run when logging into the desktop. A good place to put such a script would be under "/usr/local/bin" as this has all the SELinux labels and permissions already set to allow file execution and is accessible to all users!

Last edited by SteveGYBE; 29th March 2017 at 10:08 PM. Reason: Add SELinux considerations
Reply With Quote
Reply

Tags
configuration, mult, proxy

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
using yum through automatic proxy configuration url todd987345 Using Fedora 0 10th July 2012 02:12 AM
Proxy configuration in KDE teox78 Using Fedora 0 26th January 2010 08:24 AM
Proxy Configuration??? pinguim Installation, Upgrades and Live Media 1 22nd June 2009 06:43 PM


Current GMT-time: 20:31 (Sunday, 28-05-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat