Networking Forums

Networking Forums > Computer Networking > Linux Networking > Proxy PAC and Tor failure

Reply
Thread Tools Display Modes

Proxy PAC and Tor failure

 
 
Olaf Petzold
Guest
Posts: n/a

 
      08-10-2006, 03:58 PM
Hi,

I'm writing a proxy config file for redirecting tor / tor hidden
services access, e.g.:

function FindProxyForURL(url, host) {

bfilter = "PROXY 127.0.0.1:8080; DIRECT";
squid = "PROXY 127.0.0.1:3128; DIRECT";
tor = "SOCKS 127.0.0.1:9050";
direkt = "DIRECT";

url = url.toLowerCase();
host = host.toLowerCase();
myIp = myIpAddress();

if (shExpMatch(host,"*:*")) {
hostport = host.split(":");
host = hostport[0].toLowerCase();
port = hostport[1].toLowerCase();
};

// onion over tor
if (shExpMatch(host,"*.onion")) {
alert("Using TOR for host " +host + " in url " +url);
return tor;
}
...
}

The Tor rule matches, setting the proxy manually inside firefox works,
but not using the pac file. I get:

Fehler: Proxy-Server nicht gefunden
Firefox wurde konfiguriert, einen Proxy-Server zu nutzen, der nicht
gefunden werden kann.

Error: Proxy-Server not found
Firefox was configured to use a proxy server which can not be located.

Something wrong with the pac script or my configuration?

Thanks
Olaf
 
Reply With Quote
 
 
 
 
Chris Davies
Guest
Posts: n/a

 
      08-11-2006, 01:41 PM
Olaf Petzold <(E-Mail Removed)> wrote:
> I'm writing a proxy config file for redirecting tor / tor hidden
> services access, e.g.:


> function FindProxyForURL(url, host) {


> tor = "SOCKS 127.0.0.1:9050";


> url = url.toLowerCase();
> host = host.toLowerCase();
> myIp = myIpAddress();


You don't need this next section; the host parameter has already had the
port number stripped

> if (shExpMatch(host,"*:*")) {
> hostport = host.split(":");
> host = hostport[0].toLowerCase();
> port = hostport[1].toLowerCase();
> };


This next section may better be served with a PAC specific function, which
also means you don't need to lowercase the host value in the first place:

if (dnsDomainIs (host, ".onion")) { alert ("TOR: " + url); return tor; }

> // onion over tor
> if (shExpMatch(host,"*.onion")) {
> alert("Using TOR for host " +host + " in url " +url);
> return tor;
> }



> The Tor rule matches, setting the proxy manually inside firefox works,
> but not using the pac file. I get:


> Error: Proxy-Server not found
> Firefox was configured to use a proxy server which can not be located.


There really is a working tor socks server on your local host at 9050?

Activate the javascript console and check the PAC-alert lines (these
are triggered from your alert() calls). Is your PAC function returning
the expected result?

Chris
 
Reply With Quote
 
Olaf Petzold
Guest
Posts: n/a

 
      08-11-2006, 03:13 PM
Thank you Chris,

>> The Tor rule matches, setting the proxy manually inside firefox works,
>> but not using the pac file. I get:

>
>> Error: Proxy-Server not found
>> Firefox was configured to use a proxy server which can not be located.

>
> There really is a working tor socks server on your local host at 9050?
>
> Activate the javascript console and check the PAC-alert lines (these
> are triggered from your alert() calls). Is your PAC function returning
> the expected result?


I'm sure tor is working, javascript console output is:

PAC-alert: TOR: http://6sxoyfb3h2nvok2d.onion/
PAC-alert: TOR: http://6sxoyfb3h2nvok2d.onion/tor/
PAC-alert: TOR:
http://6sxoyfb3h2nvok2d.onion/tor/fr...ect=startseite
....

on use with foxy-proxy. If I disable FoxyProxy I've got only (using the
pac file):

PAC-alert: TOR: http://6sxoyfb3h2nvok2d.onion/

and Firefox's error message mentioned before. Maybe FoxyProxy does a job
even if it's diabled?

Thanks
Olaf
 
Reply With Quote
 
Chris Davies
Guest
Posts: n/a

 
      08-14-2006, 01:17 PM
Olaf Petzold <(E-Mail Removed)> wrote:
> Error: Proxy-Server not found
> Firefox was configured to use a proxy server which can not be located.


> I'm sure tor is working, javascript console output is:
> PAC-alert: TOR: http://6sxoyfb3h2nvok2d.onion/
> [...]


Based on your PAC file, this looks reasonable to me, as an outsider
(I don't use TOR myself).


> If I disable FoxyProxy I've got only (using the pac file):
> PAC-alert: TOR: http://6sxoyfb3h2nvok2d.onion/
> and Firefox's error message mentioned before. Maybe FoxyProxy does a
> job even if it's disabled?


I think this shows that you need to work out how to avoid using .onion
URIs when your SOCKS proxy is disabled.

Does this help?
Chris
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
*New Proxy -- QUICK LOADING Proxy* SurfHide.us Wireless Internet 0 09-26-2008 05:50 AM
Using an outside proxy server form behind a proxy server UnaCoder Linux Networking 6 02-22-2006 07:53 PM
RDP failure DomainGuy Windows Networking 2 01-09-2006 10:01 PM
Proxy configuration - tool for identifying what proxy is being use =?Utf-8?B?Q2hyaXMgQg==?= Windows Networking 0 03-21-2005 08:31 PM
MN-700 FAILURE Hanafi Broadband Hardware 3 04-11-2004 02:19 AM



1 2 3 4 5 6 7 8 9 10 11