# freebsd-update behind a proxy



## fluca1978 (Nov 20, 2013)

Hi,

I have a machine behind an HTTP proxy with base authentication. The freebsd-update(8) program uses both fetch(1) as well as phttpget that seem to me do not support the authentication via the same environment variable http_proxy.

How can I instrument freebsd-update(8) to do the stuff authenticating against my proxy?


----------



## johnblue (Nov 29, 2013)

Two things.

Does `#freebsd-update -v debug fetch` give you any clues?

Also you did not mention how you set the environment variable.  As root, before you run `#freebsd-update fetch install` did you run this: `#setenv HTTP_PROXY [url=http://username:password@proxy-host]http://username:password@proxy-host:port[/url]`


----------



## rainer_d (Dec 10, 2013)

freebsd-update does _not_ support proxy-auth (last time I looked). I think it's a very old problem, actually: http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/153211

The update works through a proxy, you have to switch off authentication for the four freebsd-update mirrors. Also, notice the number of open PRs on freebsd-update: http://www.freebsd.org/cgi/query-pr-sum ... =&release=


----------



## Vladimir Siman (Jan 28, 2016)

I know this is replying to an old thread, but in 10.2-RELEASE it works for me if I create the following two system variables first:
(Substitute the fields "username", "password","proxy" and "port" with the appropriate values for your environment)


```
export HTTP_PROXY_AUTH="basic:*:username:password"
export HTTP_PROXY=http://proxy:port
```
Then it works perfectly:

```
freebsd-update fetch
[root@freebsd ~]# freebsd-update fetch
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 10.2-RELEASE from update5.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 90 patches.....10....20....30....40....50....60....70....80....90 done.
Applying patches... done.
```
Hope it helps  I was not able to find the information anywhere, but looking at phttpget(8) source helped me to find out how this should be set up ;-) And...`man phttpget` gives you the clue, too.


----------



## tingo (Jan 28, 2016)

Is freebsd-update(8) using fetch (3) perhaps?


----------



## SirDice (Jan 28, 2016)

tingo said:


> Is freebsd-update(8) using fetch (3) perhaps?


As far as I know, yes.


----------

