How do I use xbps with an authenticated proxy? what configuration do I have to do? I'm looking for an example because I've tried configuring the environment variable and nothing, I'm almost buying a service and creating a VPN server on it to be able to connect without dealing with the proxy, but I'd really like to learn how to connect to a proxy network on voidlinux xbps.

What I tried and did not succeed so far:

export HTTP_PROXY=http://user1:123@
export HTTPS_PROXY=http://user1:123@
export FTP_PROXY=http://user1:123@

I've already tried it:

 export HTTP_PROXY=http://user1:123@
 export HTTPS_PROXY=http://user1:123@
 export FTP_PROXY=http://user1:123@


export http_proxy="http://user1:123@"
export https_proxy="http://user1:123@"
export ftp_proxy="http://user1:123@"

Am I doing something wrong? do I need to restart some service so that the environment variables are recognized?

If I run the command below after configuring the environment variables, I get the following error:

perdugames@perdugames:~$ sudo xbps-install -v -S 
[*] Updating `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ...
ERROR: [reposync] failed to fetch file `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata': Connection timed out

Which makes me believe that there is some problem with libfetch, that a part of the code is shown in the link below:



But I still have not found where the error or my error is.

Note: And yes that username and password, as well as the address and ports are correct because when setting the /etc/apt/apt.conf.d/00proxy file with this data in a debian like, it works as expected.

up 1

I tried with:

export http_proxy=""
export ftp_proxy=""
export HTTP_PROXY_AUTH="basic:*:user1:123"
And it still does not work for xbps.

And it still does not work for xbps.


This might be a sudo-related issue.

Sudo commands don't automatically inherit environment variables.

You have to specifically tell sudo to do this.

Add the following line in your visudo config:

Defaults env_keep += "http_proxy https_proxy ftp_proxy"

  • you're right works now. – PerduGames May 27 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.