Re: remote ssh to machine how display firefox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Dec 7, 2007 7:53 AM, Jon Stanley <jonstanley@xxxxxxxxx> wrote:

> Or better yet use ssh -d <some local port> and set your local SOCKS
> proxy to localhost:<that port> in your browser.

Yes, the SOCKS proxy method is indeed handy and you can redirect only
selected URLs fairly easily.  In my case, there are web sites I can
access only from work computers and I need to get to them from home
but do not want to redirect all traffic through work.

Here is a brief howto.

ssh -D 1080 <my work IP>

In firefox, Go to Edit -> Preferences -> Advanced -> Network -> Settings

In the Connection Settings box, select "Automatic proxy configuration
URL:" and enter:

   file:///path/to/proxylist.pac

The proxylist.pac file may look like this:

function FindProxyForURL(url, host)
{
        // Proxy direct connections to these hosts
        if (
                shExpMatch(url, "http://www.jbc.com/*";) ||
                shExpMatch(url, "*.sgmjournals.org/*") ||
                shExpMatch(url, "http://www.ncbi.nih.gov/*";)
        ) {
                return "SOCKS localhost:1080; DIRECT";
        }
// Otherwise go directly
        else return "DIRECT";
}

For more details on the pac file and auto config, see

http://en.wikipedia.org/wiki/Proxy_auto-config

Akemi
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux