1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

setting proxy

Discussion in 'Networking' started by hirohitosan, Jan 28, 2009.

  1. hirohitosan

    hirohitosan New Member

    Messages:
    279
    Likes Received:
    0
    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
     
  2. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,423
    Likes Received:
    14
    Add it to ~/.cshrc
     
  3. Trojan

    Trojan New Member

    Messages:
    25
    Likes Received:
    0
    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?
     
  4. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,672
    Likes Received:
    26
    You need to use
    Code:
    http://192.168.100.1:3128/
    not just ip address:port
     
  5. Trojan

    Trojan New Member

    Messages:
    25
    Likes Received:
    0
    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?
     
  6. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Messages:
    10,672
    Likes Received:
    26
    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.