# updating src via proxy ?



## mgp (Nov 18, 2008)

Hi,
I was wondering if there is any way to update src via proxy ?

with ports it's easy ,I'm just using portsnap which uses fetch to obtain ports via HTTP and it's easy to setup proxy for fetch

do you have any idea how to update src ? 

thank you

regards,
mgp


----------



## sbe (Nov 18, 2008)

1)cd /usr/ports/net/prtunnel
make install clean

2)prtunnel -t http -H myproxy.myfirm.com -P 3128 -D 5999 cvsup.FreeBSD.org 5999

3)vi supfile:
...
*default host=127.0.0.1

4)csup supfile

5)killall -9 prtunnel


----------



## none (Nov 18, 2008)

prtunnel accepts user and pass ?

really great to know this software !!!

none


----------



## DutchDaemon (Nov 19, 2008)

Not every proxy will allow connections to ports like 5999 (e.g. a restrictive Safe_Ports setting in Squid config).


----------



## bsddaemon (Nov 19, 2008)

none said:
			
		

> prtunnel accepts user and pass ?
> 
> really great to know this software !!!
> 
> none



Im not sure about prtunnel but I have been using *httptunnel* and it does support proxy authentication, so you may wanna check it out:

*www/httptunnel*

By the look of the command, the syntax is almost identical


----------



## mgp (Nov 19, 2008)

thanks a lot guys!
prtunnel worked


----------



## vivek (Nov 19, 2008)

What's wrong with http_proxy variable ? Something like as follows should work under bash:

```
export http_proxy=http://user:password@proxy.server.i.p:port/
```
Why install additional software?


----------



## mgp (Nov 19, 2008)

because csup doesn't use fetch and this variable is used by fetch


----------



## none (Nov 19, 2008)

mgp said:
			
		

> because csup doesn't use fetch and this variable is used by fetch



I do confirm that. here at work it doesn't go and that's final. I used to csup at home and put it in a pendrive or in my home apache ...

even the svn repo from freebsd.org couldn't pass through the proxy 

none


----------



## vivek (Nov 20, 2008)

mgp said:
			
		

> because csup doesn't use fetch and this variable is used by fetch



Actually portsnap man page recommends using http_proxy to save bandwidth on both ends. However, csup only works with proxy if either: 


> csup can be used through a SOCKS proxy server with the standard runsocks command.  Your csup executable needs to be dynamically-linked with the system libraries for runsocks to work properly.


Or using ssh forward

```
ssh -f -x -L 5999:localhost:5999 serverhost sleep 60
```

Or any one of the above methods


----------



## none (Jan 28, 2009)

TCP_DENIED/403 1409 CONNECT cvsup2.freebsd.org:5999 - NONE/- text/html

is what I get from my proxy 

anyone has another way ?
will svn do the trick ?

thanks,

none


----------



## pablo (Jan 28, 2009)

By default SQUID deni method CONNECT to ports other than 443. So, if you have acces to squid.conf, try to extend your list of SSL_ports:

```
acl SSL_ports port 5999
```


----------

