You are not logged in.
Hi everyone,
I'm trying to go through a proxy with my ArchLinux, and in order to do this I run this script :
#!/bin/bash
# set utc proxy
export http_proxy=http://proxyweb.utc.fr:3128
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export no_proxy="localhost,127.0.0.1,greta,localaddress,.localdomain.com"
But when I want, for example, to launch a "sudo pacman -S something", I can't go through the proxy. Do you have any idea why this isn't working ?
Thanks in advance.
Last edited by nugetchar (2014-09-22 13:17:55)
Offline
Don't run it, source it.
This silver ladybug at line 28...
Offline
I'm sorry, I do not understand what you mean by "source it" ? I wrote it into my ~/.bashrc but it still does not work, which is strange because a "echo $http_proxy" gives me the right output...
Offline
But when I want, for example, to launch a "sudo pacman -S something", I can't go through the proxy. Do you have any idea why this isn't working ?
sudo changes your environment, and maintains a whitelist of what it allows to "leak" through to the new user session. You can use the -E flag to preserve the environment, or you can specifically whitelist variables in sudoers with the env_keep directive.
Offline
Thank you, it works !
But there is still a little problem : I cannot use yaourt with "sudo -E yaourt -S something". How could I fix it ?
Thanks
Offline
Nevermind, I put the line "Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy" which, combined with the export in the bashrc, allow me to go through the proxy even with the yaourt command.
Thanks for your help !
Offline