setting proxy

Hi there.
How can I set the proxy permanent?
I did this:
Code:
# setenv http_proxy http://my.proxy.server:3128
but after logout or reboot I have to set it again
How can I set this permanent?

thanks
 
FreeBSD runs squid and used as non-transparent proxy without any authentication. On another FreeBSD 6.3 machine in local network I added setenv http_proxy 192.168.100.1:3128 and setenv ftp_proxy 192.168.100.1:3128 in user/.cshrc and root/.cshrc. When I try to install any packet I get the next:

Code:
WS137# setenv http_proxy 192.168.100.1:3128 
WS137# setenv ftp_proxy 192.168.100.1:3128 
WS137# pkg_add -r nano 
Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/nano.tbz: Protocol error 
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/nano.tbz' by URL

Even adding these variables in command line does not solve the problem.

What can be the reason of it?
 
  • Thanks
Reactions: sdf
You need to use
Code:
http://192.168.100.1:3128/
not just ip address:port
 
This method also doesn't work.

Code:
WS137# setenv http_proxy http://192.168.100.1:3128  
WS137# setenv ftp_proxy http://192.168.100.1:3128  
WS137# pkg_add -r nano  
Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/nano.tbz: Not Found  
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/Latest/nano.tbz' by URL

What I can try else?
 
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release does not exit. So your settings are probably correct, the directory just doesn't exist. You could try setting the PACKAGESITE environment variable (pkg_add(1)) to one of ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/ or ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.4-release/.

Code:
The environment variable PACKAGESITE specifies an alternate location for
     pkg_add to fetch from.  This variable subverts the automatic directory
     logic that pkg_add uses when the -r option is invoked.  Thus it should be
     a complete URL to the remote package file(s).

This may or may not work. Both 6-stable and 6.4-release are newer than your OS, so your installed packages may require newer libraries. Upgrading the OS to 6.4 is recommended.
 
Back
Top