An ultra-simple Plasma widget that allows you to toggle proxy with a simple click. You can easily configure the host and ports inside the widget settings window.
- Runs a bundled bash script that sets the standard proxy environment
variables (
HTTP_PROXY,HTTPS_PROXY,FTP_PROXY,ALL_PROXY,SOCKS_PROXY,NO_PROXYand their lowercase forms). - Propagates them to the systemd user session (
systemctl --user import-environment) and the D-Bus activation environment (dbus-update-activation-environment --systemd), so newly launched processes pick the proxy up. - Optionally (settings checkbox) drives the GNOME proxy stack via
gsettings, which lets browsers apply the proxy dynamically without a restart.
A cool feature that adds the seamlessness of GNOME's proxy handling to KDE! When toggled, any browser (both Chromium and Firefox-based ones) can inherit proxy settings without needing to quit and restart the entire browser session.
Note: The following demo is a simple HTML file that detects ip address changes in ifconfig.me. It turns green for ipv4 (my proxy) and red for ipv6 (my home ip address). Thus it acts as a demo that dynamic proxy is working!
Demo.webm
gsettingsanddconfmust be installed on your system- Set the
XDG_CURRENT_DESKTOP=GNOMEenvironment variable for your browser
NOTE: This setup is not needed for some Chromium-based browsers like Brave and Chrome because they already ship with the necessary defaults. Therefore, check whether everything is working with your browser first and only proceed if it does not.
Replace your.browser.folder and your.browser.name appropriately:
- Download libdconfsettings.so and copy it to
~/.var/app/your.browser.folder/data/gio/modules/(make these folders if not present) - Copy and run the following command:
flatpak override --user \
--filesystem=xdg-run/dconf \
--filesystem=~/.config/dconf:ro \
--talk-name=ca.desrt.dconf \
--env=GSETTINGS_BACKEND=dconf \
--env=DCONF_USER_CONFIG_DIR=.config/dconf \
--env=GIO_EXTRA_MODULES=$HOME/.var/app/your.browser.folder/data/gio/modules \
your.browser.name
- Native package (.deb/.rpm/etc..)
Add the following line in front of Exec= inside the firefox.desktop file:
env -u http_proxy -u https_proxy -u HTTP_PROXY -u HTTPS_PROXY -u no_proxy -u NO_PROXY
- Flatpak
- Follow the flatpak-specific instructions above
- Run the following command:
flatpak override --user \
--unset-env=http_proxy --unset-env=https_proxy --unset-env=ftp_proxy \
--unset-env=socks_proxy --unset-env=all_proxy --unset-env=no_proxy \
--unset-env=HTTP_PROXY --unset-env=HTTPS_PROXY --unset-env=FTP_PROXY \
--unset-env=SOCKS_PROXY --unset-env=ALL_PROXY --unset-env=NO_PROXY \
org.mozilla.firefox
- Almost all of the credits go to HimDek's Plasma Overview Widget for serving as this project's template.