Index: head/etc/freebsd-update.conf =================================================================== --- head/etc/freebsd-update.conf (revision 294205) +++ head/etc/freebsd-update.conf (working copy) @@ -11,6 +11,9 @@ # performance. ServerName update.FreeBSD.org +# HTTP_PROXY, can be overwritten with setenv on the command line +# HttpProxy proxy.your.domain:proxy_port + # Components of the base system which should be kept updated. Components src world kernel Index: head/usr.sbin/freebsd-update/freebsd-update.sh =================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh (revision 294205) +++ head/usr.sbin/freebsd-update/freebsd-update.sh (working copy) @@ -93,7 +93,8 @@ CONFIGOPTIONS="KEYPRINT WORKDIR SERVERNAME MAILTO ALLOWADD ALLOWDELETE KEEPMODIFIEDMETADATA COMPONENTS IGNOREPATHS UPDATEIFUNMODIFIED BASEDIR VERBOSELEVEL TARGETRELEASE STRICTCOMPONENTS MERGECHANGES - IDSIGNOREPATHS BACKUPKERNEL BACKUPKERNELDIR BACKUPKERNELSYMBOLFILES" + IDSIGNOREPATHS BACKUPKERNEL BACKUPKERNELDIR BACKUPKERNELSYMBOLFILES + HTTPPROXY" # Set all the configuration options to "". nullconfig () { @@ -269,6 +270,17 @@ fi } +# Proxy, allow overwrite via setenv +config_HttpProxy () { + if [ -n "${HTTP_PROXY}${http_proxy}" ]; then + return 0 + elif [ -z ${HttpProxy} ]; then + export HTTP_PROXY=$1 + else + return 1 + fi +} + # When fetching upgrades, should we assume the user wants exactly the # components listed in COMPONENTS, rather than trying to guess based on # what's currently installed?