How to setup universal proxy settings for fedora 35?

BLUF: numerous articles online say to add proxy definitions to a system file and save it. none explain how to actually edit it or how to save it because that’s too basic to explain, hence all these articles were useless to me.

Background: I’m using pdanet on my android smartphone to uncap tethering on my smartphone. The app creates its own network and requires devices wanting to use the hotspot to use proxy settings.
I enter the proxy settings into the GUI interface under Fedora’s Settings, the result is that my web browsers connect fine to the internet(Opera and Firefox)…
…However, Steam is always in offline mode, and so is Discord. Moreover, the network icon in the upper right corner still has the question mark on it(even though browsers connect fine).

Where I’m at:
with all the articles online on how to do this:

I paste the first line they put into terminal and I click enter, which opens up a folder, which seems to be read only. navigating and editing that “text file” is NOT like editing a .txt file. sometimes the cursor is inserting, sometimes it’s posting gibberish even when you click enter, it’s just not clear on where you’re supposed to paste the steps that they mention, and when I struggle and finally paste them successfully in the file, I have no way to save the file. and closing terminal warns that a process will be killed, which when I do loses all the settings that I typed in.

sorry for being a noob, it’s extremely disheartening how many articles there are online on how to do this, and none truly give the “how to make a peanut butter and jelly sandwich” version of how to get it done.

Unfortunately there is no universal proxy setting in Linux distributions like there is in Windows/macOS/etc. There are various environment variables that can be used (HTTP_PROXY/http_proxy {yes case is different}), some applications require the proxy to be configured directly in their UI or configuration files, still others only support command-line options to specify proxies.

Setting it in the GNOME preferences should work for applications which make use of GNOME settings, but not all applications will do that.

1 Like

There are a couple of ways.

The traditional way

Generally, you want to export all_proxy (lower case) in your bash profile (~/.bash_profile), assuming you’re using the default shell. If you want a permanent thing for everything you launch as your user. If you want this permanent and globally for all users, then you’ll want to create a .sh file in /etc/profile.d/ to export the variable there.

Some things to note:

  • Adding it to those files won’t take effect until your next login.
  • You can export it in a terminal (ie, gnome-terminal) and try launching apps from there in order to test.
  • Some older or 3rd party apps use http_proxy and https_proxy instead. Some even older apps use ALL_PROXY, HTTP_PROXY, or HTTPS_PROXY. You might not need to set these, but if you’re finding inconsistencies, you can set these as well. You are absolutely correct that this is a pain. Most recent apps have standardized around all_proxy just fine, but some notably popular proprietary 3rd party apps still use the older ways.
  • DNS won’t automatically follow, so if DNS records are only available inside the network you are proxying, they might not resolve for most applications. Firefox is an exception to this, so if things work in Firefox but not elsewhere, it’s probably DNS.

The Gnome way

Go to Settings->Network and scroll to the bottom and Network proxy is there:

Setup your proxy here. Most likely, you’ll have either an HTTPS or SOCKS proxy. There is also an option for auto-discovery, if you’re on a corporate network that requires it. Firefox and others will generally respect this by default.

1 Like

Thanks guys. Yes I have set the proxy fine in the GNOME settings, and that allows my web browsers to work(clearly they use GNOME settings like you mentioned)…
…I will try Scott’s “Traditional Way” and document my progress with screenshots if I face problems.

1 Like

Can you tell me exactly what to write in the /etc/profile.d/ directory?

Also, when I open my ~/.bash_profile I can’t find all_proxy to export it.
bash profile is:


Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc

User specific environment and startup programs


The top two answers here mention to add snippets to a file, which I can do, but I’m not sure whether to save it to the end of the file, the middle, or where…

When you add to a file such as .bash_profile it usually is added at the end of the file. You usually only have to make sure it is not inside an if-then statement or a function that is already defined in that file, so it realistically could be almost anywhere within the file.

The reasoning for putting it at the end is so you can easily see what you have added in case something needs changed later.