Reply
Thread Tools
Posts: 4 | Thanked: 0 times | Joined on Jul 2008
#1
I set the proxy in "Connectivity settings" and it works properly in browser, maemo-mapper and application manager, but it doesn't work in command line. So how can i use the proxy in xterm?
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#2
If you by 'use proxy in xterm' mean when using e.g. curl or wget, then it will need an environment variable set. Ideally the proxy setting should be exported to the environment automatically but that doesn't seem to be the case for xterm

This works for me, when I use privoxy as integrated proxy. Replace 127.0.0.1 and/or 8118 with IP/name:port you use for your proxy:

export http_proxy=http://127.0.0.1:8118
If you need an ftp proxy as well then use the exact same (http://) value for ftp_proxy.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 

The Following User Says Thank You to TA-t3 For This Useful Post:
brendan's Avatar
Posts: 531 | Thanked: 79 times | Joined on Oct 2006 @ This side of insane, that side of genius
#3
most proxies dont support FTP directly, in that they cannot do anything but pass the traffic.

in my squid.conf i have setup an ACL with port 21 as one of the Safe_ports that are allowed to be used in a browser, and another ACL specifying that FTP is allowed as an always_direct connection. that way its never cached.
__________________
Nokia n800
OS 2008
Pharos iGPS 360-BT
ElmScan 5 BlueTooth
BlackBerry Bold (9000)
AT&T Wireless
 
Posts: 4 | Thanked: 0 times | Joined on Jul 2008
#4
Originally Posted by TA-t3 View Post
If you by 'use proxy in xterm' mean when using e.g. curl or wget, then it will need an environment variable set. Ideally the proxy setting should be exported to the environment automatically but that doesn't seem to be the case for xterm

This works for me, when I use privoxy as integrated proxy. Replace 127.0.0.1 and/or 8118 with IP/nameort you use for your proxy:

export http_proxy=http://127.0.0.1:8118
If you need an ftp proxy as well then use the exact same (http://) value for ftp_proxy.
What if I want to use apt-get?
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#5
apt-get also honours the http_proxy (and ftp_proxy) environment variables, just the same way as curl and wget.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.

Last edited by TA-t3; 2008-07-29 at 16:08.
 
Posts: 191 | Thanked: 29 times | Joined on Sep 2007 @ Ottawa
#6
Try:
export http_proxy=<URL to your proxy>
then:
apt-get ....

Craig...
__________________
N800, Think Outside Kbd, 8GB SDHC Card (OCZ, ext2), and 8GB SD Card (Patriot formatted as VFAT)
Zaurus SL-6000, IR Keyboard, 1GB SD Card
 
Posts: 4 | Thanked: 0 times | Joined on Jul 2008
#7
Thanks, it works
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:44.