How to properly end a proxy connection?

Hello. I use pdanet on android to get unlimited hotspot (very few carriers in the United States offer unlimited hotspot). Pdanet accomplishes this by setting a proxy. To connect, I connect to the Pdanet hotspot and set my proxy a few different ways, but usually I add these lines to the end of ~/.config/fish/

export http_proxy="http://user:\\@"
export ftp_proxy="ftp://user:\\@"
export rsync_proxy="rsync://user:\\@"
export no_proxy="localhost,,,::1,*.local"
export HTTP_PROXY="http://user:\\@"
export FTP_PROXY="ftp://user:\\@"
export RSYNC_PROXY="rsync://user:\\@"
export NO_PROXY="localhost,,,::1,*.local"
export https_proxy="http://user:\\@"
export HTTPS_PROXY="http://user:\\@"

and then restart fish with,

source ~/.config/fish/

It can also be set with export commands like this:

export http_proxy=
export https_proxy=

and so on.

I've been doing this for many months and it's been working great, but recently I've been running into problems removing the proxy when I need to. It gets removed for some things, but I'm unable to use pamac-aur because it's still trying to run through the proxy. Tonight, it's apparently the same for yay and makepkg as well or, I should say for git because git is unable to clone from the AUR.

╭─[email protected] in ~/.work took 3s
 ╰─λ pamac install cuda-7.5
Warning: cuda-7.5 is only available from AUR
Checking cuda-7.5 dependencies...
Checking gcc5 dependencies...
Resolving dependencies...
Checking inter-conflicts...

To build (2):
  gcc5      5.5.0-3     AUR
  cuda-7.5  7.5.18-5    AUR

Edit build files : [e] 
Apply transaction ? [e/y/N] y

Cloning gcc5 build files...
fatal: unable to access '': Failed to connect to port 8000 after 128822 ms: Connection timed out
Error: Failed to build gcc5

 ╭─[email protected] in ~/.work took 2m16s
[🔴] × cd ~/build

 ╭─[email protected] in ~/build took 1ms
 ╰─λ git clone
Cloning into 'cuda-7.5'...
fatal: unable to access '': Failed to connect to port 8000 after 128422 ms: Connection timed out

 ╭─[email protected] in ~/build took 2m8s
[🔴] × yay -S cuda-7.5
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:2]  gcc5-5.5.0-3  cuda-7.5-7.5.18-5

:: (0/2) Downloaded PKGBUILD: gcc5
:: (0/2) Downloaded PKGBUILD: cuda-7.5
 -> error fetching gcc5: Cloning into 'gcc5'...
fatal: unable to access '': Failed to connect to port 8000 after 129286 ms: Connection timed out 
         context: exit status 128

error fetching cuda-7.5: Cloning into 'cuda-7.5'...
fatal: unable to access '': Failed to connect to port 8000 after 129286 ms: Connection timed out 
         context: exit status 128

 ╭─[email protected] in ~/build took 2m15s
[🔴] × speedtest
Retrieving configuration...
Testing from T-Mobile USA (
Retrieving server list...
Selecting best server based on ping...
Hosted by DediPath (Dallas, TX) [0.76 km]: 49.911 ms
Testing download speed................................................................................
Download: 2.96 Mbit/s
Testing upload speed......................................................................................................
Upload: 19.54 Mbit/s

 ╭─[email protected] in ~/build took 24s
 ╰─λ echo $http_proxy

 ╭─[email protected] in ~/build 

The way I am attempting to disable the proxy is the same as I've always done it, by removing the export lines from and the restarting it. I have lately just been commenting out the lines like this:

#export http_proxy="http://user:\\@"
#export ftp_proxy="ftp://user:\\@"
#export rsync_proxy="rsync://user:\\@"
#export no_proxy="localhost,,,::1,*.local"
#export HTTP_PROXY="http://user:\\@"
#export FTP_PROXY="ftp://user:\\@"
#export RSYNC_PROXY="rsync://user:\\@"
#export NO_PROXY="localhost,,,::1,*.local"
#export https_proxy="http://user:\\@"
#export HTTPS_PROXY="http://user:\\@"

Now to set the proxy address is always instant, but to remove the proxy I must log out and back in for the proxy to actually be removed. Tonight I've even tried rebooting and all my pkg manager helpers are still trying to use the proxy.....

Can anyone please tell me why?

Here is my inxi:

╭─[email protected] in ~/.work took 9m16s
[🔴] × garuda-inxi
  Kernel: 5.16.14-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=dfacdddb-42b3-448d-ba1f-7b7b8c8f1f0c rw [email protected]
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
  Desktop: KDE Plasma 5.24.3 tk: Qt 5.15.3 info: latte-dock wm: kwin_x11
    vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
  Type: Laptop System: LENOVO product: 427639U v: ThinkPad W520
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 427639U serial: <superuser required> UEFI: LENOVO
    v: 8BET62WW (1.42 ) date: 07/26/2013
  ID-1: BAT0 charge: 36.0 Wh (100.0%) condition: 36.0/93.2 Wh (38.7%)
    volts: 12.8 min: 11.1 model: SANYO 42T4799 type: Li-ion serial: <filter>
    status: Full
  Info: model: Intel Core i7-2820QM bits: 64 type: MT MCP arch: Sandy Bridge
    family: 6 model-id: 0x2A (42) stepping: 7 microcode: 0x2F
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 1027 high: 1531 min/max: 800/3400 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 957 2: 1472 3: 797
    4: 797 5: 1531 6: 971 7: 900 8: 798 bogomips: 36680
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics
    vendor: Lenovo driver: i915 v: kernel ports: active: LVDS-1 empty: VGA-1
    bus-ID: 00:02.0 chip-ID: 8086:0126 class-ID: 0300
  Device-2: NVIDIA GF108GLM [Quadro 1000M] vendor: Lenovo driver: nvidia
    v: 390.147 alternate: nouveau,nvidia_drm pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 link-max: lanes: 16 ports: active: none
    empty: DP-1, DP-2, DP-3, LVDS-2, VGA-2 bus-ID: 01:00.0 chip-ID: 10de:0dfa
    class-ID: 0300
  Device-3: Chicony Lenovo Integrated Camera (0.3MP) type: USB
    driver: uvcvideo bus-ID: 1-1.6:5 chip-ID: 04f2:b217 class-ID: 0e02
  Display: x11 server: X.Org v: compositor: kwin_x11 driver: X:
    loaded: modesetting failed: nvidia gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
    s-diag: 582mm (22.9")
  Monitor-1: LVDS-1 model: Lenovo built: 2009 res: 1920x1080 hz: 60
    dpi: 142 gamma: 1.2 size: 344x193mm (13.5x7.6") diag: 394mm (15.5")
    ratio: 16:9 modes: 1920x1080
  OpenGL: renderer: N/A v: N/A direct render: N/A
  Device-1: Intel 6 Series/C200 Series Family High Definition Audio
    vendor: Lenovo ThinkPad T520 driver: snd_hda_intel v: kernel
    bus-ID: 00:1b.0 chip-ID: 8086:1c20 class-ID: 0403
  Device-2: NVIDIA GF108 High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    link-max: lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:0bea class-ID: 0403
  Sound Server-1: ALSA v: k5.16.14-zen1-1-zen running: yes
  Sound Server-2: PulseAudio v: 15.0 running: no
  Sound Server-3: PipeWire v: 0.3.48 running: yes
  Device-1: Intel 82579LM Gigabit Network vendor: Lenovo ThinkPad T520
    driver: e1000e v: kernel port: 6080 bus-ID: 00:19.0 chip-ID: 8086:1502
    class-ID: 0200
  IF: enp0s25 state: down mac: <filter>
  Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0
    chip-ID: 8086:0085 class-ID: 0280
  IF: wlp3s0 state: down mac: <filter>
  IF-ID-1: enp0s26u1u2 state: unknown speed: -1 duplex: half mac: <filter>
  Device-1: Motorola PCS moto g power (2022) type: USB driver: rndis_host
    v: kernel bus-ID: 1-1.2:7 chip-ID: 22b8:2e25 class-ID: 0a00
    serial: <filter>
  Device-2: Broadcom BCM2045B (BDC-2.1) type: USB driver: btusb v: 0.8
    bus-ID: 1-1.4:4 chip-ID: 0a5c:217f class-ID: fe01 serial: <filter>
  Report: ID: hci0 rfk-id: 2 state: up address: <filter>
  Local Storage: total: 582.24 GiB used: 254.22 GiB (43.7%)
  ID-1: /dev/mmcblk0 maj-min: 179:0 model: SD size: 116.48 GiB block-size:
    physical: 512 B logical: 512 B type: SSD serial: <filter> scheme: GPT
  SMART Message: Unknown smartctl error. Unable to generate data.
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital
    model: WD5000LPCX-75VHAT1 size: 465.76 GiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 1A05 scheme: GPT
  ID-1: / raw-size: 64 GiB size: 64 GiB (100.00%) used: 8.53 GiB (13.3%)
    fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 100 MiB size: 98.4 MiB (98.42%)
    used: 562 KiB (0.6%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 401.66 GiB size: 401.66 GiB (100.00%)
    used: 245.68 GiB (61.2%) fs: btrfs dev: /dev/sda3 maj-min: 8:3
  ID-4: /var/log raw-size: 64 GiB size: 64 GiB (100.00%)
    used: 8.53 GiB (13.3%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  ID-5: /var/tmp raw-size: 64 GiB size: 64 GiB (100.00%)
    used: 8.53 GiB (13.3%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 23.36 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
  System Temperatures: cpu: 43.0 C mobo: N/A
  Fan Speeds (RPM): cpu: 2509
  Processes: 284 Uptime: 44m wakeups: 1 Memory: 23.36 GiB
  used: 3.12 GiB (13.4%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1242 lib: 306 Shell: fish
  v: 3.3.1 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.13
Garuda (2.5.6-2):
  System install date:     2022-03-16
  Last full system update: 2022-03-16
  Is partially upgraded:   Yes
  Relevant software:       NetworkManager
  Windows dual boot:       No/Undetected
  Snapshots:               Snapper
  Failed units:

Thanks so much for any help or insight....

You are setting environment variables and exporting them.

Anything that is launched from that shell will get those environment variables and keep them until they finish running.

Your primary problem is probably this:

That doesn't restart fish. It just processes that file. When you are adding variables, that works fine.

Commenting something out won't remove it. You probably need to unset it. I am not a fish expert but I think in fish you use set -e to unset an environment variable.


Doing so, likely violates your terms of service with your carrier. You would be best to ask for advice on side-stepping legal agreements elsewhere.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.