You are not logged in.

#1 2011-04-18 09:18:38

GNA
Member
Registered: 2011-02-15
Posts: 57

[SOLVED] pacman over wget with http proxy

Hey,
how do I configure pacman to work with a http proxy?

Example:
http proxy: proxy.hello-world.com:8888
user: iloveyou42
password: h4xx

The wget wiki (https://wiki.archlinux.org/index.php/Wget) tells me that it uses the standard environment settings. But that doesn't work... So I tried:
wget --proxy-user "proxy.hello-world.com\iloveyou42" --proxy-password "h4xx" proxy.hello-world.com:8888
and without port:
wget --proxy-user "proxy.hello-world.com\iloveyou42" --proxy-password "h4xx" proxy.hello-world.com
Dosnt work as well...

Is it possible to make this work (if possible without wget)?

Thx 4 help smile

SOLUTION:

PROXY='http://iloveyou42:h4xx@proxy.hello-world.com:8888'
    export HTTP_PROXY="$PROXY"
    export http_proxy="$PROXY"

Last edited by GNA (2011-05-12 10:07:33)

Offline

#2 2011-04-18 09:30:43

tpfkanep
Member
From: South Africa
Registered: 2009-12-15
Posts: 58

Re: [SOLVED] pacman over wget with http proxy

You have to set the environment variables each time for every terminal in which you run 'pacman' (that's how my setup works and I also use 'wget').

Offline

#3 2011-04-19 12:00:38

GNA
Member
Registered: 2011-02-15
Posts: 57

Re: [SOLVED] pacman over wget with http proxy

so i tried:
export http_proxy="http://user:password@proxy.domain:8888/"
export ftp_proxy=same as above


what was returned:
Resolving proxy.domain.de... 193.196.64.2
Connecting to proxy.domain.de|193.196.64.2|:8888... connected.
Proxy request sent, awaiting response... 403 Forbidden
2011-04-19 13:57:40 ERROR 403: Forbidden.

Offline

#4 2011-04-19 17:01:18

tpfkanep
Member
From: South Africa
Registered: 2009-12-15
Posts: 58

Re: [SOLVED] pacman over wget with http proxy

Unfortunately, I cannot assist with this further. I am using wget successfully with this advice: https://wiki.archlinux.org/index.php/Proxy_settings

Offline

#5 2011-04-20 22:29:39

xs
Member
From: San Jose, CA.
Registered: 2011-04-06
Posts: 92

Re: [SOLVED] pacman over wget with http proxy

An alterative method? Don't know if this would work but I don;t see why it wouldn't. You could try piping pacman through proxychains? you could even set it up to work with tor.


I like pie. Especially with a side of Arch.

Offline

#6 2011-04-20 22:52:43

xxxspuddy
Member
Registered: 2007-05-15
Posts: 57

Re: [SOLVED] pacman over wget with http proxy

How about setting the proxy details in your ~/.wgetrc or /etc/wgetrc file?

http://www.gnu.org/software/wget/manual … mands.html


A temporary file is just a pipe with an attitude and a will to live.

Offline

#7 2011-04-21 02:16:02

rekado
Member
From: Shanghai, China
Registered: 2009-01-13
Posts: 98
Website

Re: [SOLVED] pacman over wget with http proxy

I second xxxspuddy's post.
On my servers I've configured wget in /etc/wgetrc to always download through the proxy*. In /etc/pacman.conf you would have to specify /usr/bin/wget as the XferCommand.

____
*) actually, there are two proxies: one local proxy (cntlm) and the company ISA proxy that cntlm helps to authenticate against.

Offline

#8 2011-04-21 05:49:25

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 5,281
Website

Re: [SOLVED] pacman over wget with http proxy

You don't *have* to use wget to use a proxy with pacman. I use the following script successfully, called from my .bashrc:

if [ -n "$1" ] ; then
    HN=$1
else
    HN=`hostname -f`
fi

case $HN in
    *.archserver.org)
        PROXY=''
        ;;
    *.company.com.au)
        PROXY='http://proxy.company.com.au:3128'
        BYPASS='192.168.0.0/16,127.0.0.0/8,localhost'
        ;;
    *.fukawi2.pvt)
        PROXY='http://proxy.fukawi2.pvt:3128'
        BYPASS='192.168.0.0/16,127.0.0.0/8,localhost'
        ;;
    *)
        PROXY=''
        ;;
esac

# clean, then export the environment vars
unset HTTP_PROXY http_proxy FTP_PROXY ftp_proxy no_proxy
if [ -n "$PROXY" ] ; then
    export HTTP_PROXY="$PROXY"
    export http_proxy="$PROXY"
    export HTTPS_PROXY="$PROXY"
    export https_proxy="$PROXY"
    export FTP_PROXY="$PROXY"
    export ftp_proxy="$PROXY"
    export no_proxy="$BYPASS"
fi

Offline

#9 2011-05-12 10:06:47

GNA
Member
Registered: 2011-02-15
Posts: 57

Re: [SOLVED] pacman over wget with http proxy

thx fukawi2 smile

this works for me:

PROXY='http://iloveyou42:h4xx@proxy.hello-world.com:8888'
    export HTTP_PROXY="$PROXY"
    export http_proxy="$PROXY"

Offline

Board footer

Powered by FluxBB