maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   How to use proxy in xterm? (https://talk.maemo.org/showthread.php?t=22386)

credos 2008-07-29 11:01

How to use proxy in xterm?
 
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?

TA-t3 2008-07-29 11:45

Re: How to use proxy in xterm?
 
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.

brendan 2008-07-29 12:02

Re: How to use proxy in xterm?
 
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.

credos 2008-07-29 14:23

Re: How to use proxy in xterm?
 
Quote:

Originally Posted by TA-t3 (Post 208145)
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.

What if I want to use apt-get?

TA-t3 2008-07-29 14:37

Re: How to use proxy in xterm?
 
apt-get also honours the http_proxy (and ftp_proxy) environment variables, just the same way as curl and wget.

cvmiller 2008-07-29 16:02

Re: How to use proxy in xterm?
 
Try:
export http_proxy=<URL to your proxy>
then:
apt-get ....

Craig...

credos 2008-07-30 03:01

Re: How to use proxy in xterm?
 
Thanks, it works :)


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

vBulletin® Version 3.8.8