* [gentoo-user] auto proxy config (Firefox, and more)
@ 2007-09-24 16:26 Benjamin Graf
2007-09-25 21:14 ` Willie Wong
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Graf @ 2007-09-24 16:26 UTC (permalink / raw
To: gentoo-user
Hi,
I'm using my notebook in the school (via Wi-Fi + Cisco VPN) and at
home. At school I need a proxy, but not at home.
I tried this as a proxy automatic configuration file (*.pac), but it
doesn't work :
function FindProxyForURL(url, host)
{
if (myIpAddress().substring(0,7) == "192.168") {
return "DIRECT";
}
else {
if (isPlainHostName(host) ||
dnsDomainIs(host, ".he-arc.ch") ||
dnsDomainIs(host, ".eiaj.ch") ||
dnsDomainIs(host, ".heaa-ne.ch") ||
dnsDomainIs(host, ".hegne.ch") ||
dnsDomainIs(host, ".career-women.ch") ||
dnsDomainIs(host, ".ilce.ch") ||
dnsDomainIs(host, ".isnetne.ch") ||
dnsDomainIs(host, ".agf.hes.so.ch") ||
dnsDomainIs(host, ".hesap1.eif.ch") ||
host == "127.0.0.1" ||
host.substring(0,3) == "10." ||
host.substring(0,10) == "157.26.64." ||
host.substring(0,8) == "192.168." ||
host == "57.26.241.20") {
return "DIRECT";
}
else {
return "PROXY proxy.he-arc.ch:8080";
}
}
}
At school, it works correctly (it uses the proxy when it is
necessary), but not at home. I think the "myIpAddress" is maybe not
the right solution.
Does anybody have an idea how to solve my problem ? I would prefer a
more global solution (for the whole system, not only Firefox), but if
you have an idea for Firefox, I would be really happy !
Thanks
Ben
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] auto proxy config (Firefox, and more)
2007-09-24 16:26 [gentoo-user] auto proxy config (Firefox, and more) Benjamin Graf
@ 2007-09-25 21:14 ` Willie Wong
2007-09-26 15:26 ` Benjamin Graf
0 siblings, 1 reply; 4+ messages in thread
From: Willie Wong @ 2007-09-25 21:14 UTC (permalink / raw
To: gentoo-user
On Mon, Sep 24, 2007 at 06:26:43PM +0200, Penguin Lover Benjamin Graf squawked:
> I tried this as a proxy automatic configuration file (*.pac), but it
> doesn't work :
<snip>
> At school, it works correctly (it uses the proxy when it is
> necessary), but not at home. I think the "myIpAddress" is maybe not
> the right solution.
The only thing I can think of is that maybe "myIpAddress" is not
returning what you think it returns?
W
--
THE ENGLISH LANGUAGE
<<<< ladybree@ >>>>
We'll begin with box, the plural is boxes;
But the plural of ox is oxen, not oxes.
One fowl is a goose, but two are called geese,
Yet the plural of moose is never meese.
You may find a lone mouse or a whole nest of mice,
But the plural of house is houses, not hice.
If the plural of man always is men,
Why shouldn't the plural of pan be call pen?
If I speak of a foot and you show me two feet,
And I give you a boot, would a pair be called beet?
If the singular is this and the plural these,
Should a plural of kiss ever be keese?
We speak of a brother and also of brethren,
But though we say mother, we never say methren.
Then the masculine pronouns are he, his and him,
But imagine the females - she, shis and shim!
Sortir en Pantoufles: up 291 days, 19:26
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] auto proxy config (Firefox, and more)
2007-09-25 21:14 ` Willie Wong
@ 2007-09-26 15:26 ` Benjamin Graf
[not found] ` <20070927030321.GA29868@princeton.edu>
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Graf @ 2007-09-26 15:26 UTC (permalink / raw
To: gentoo-user
Thanks for the answer !
How can I see what myIpAddress() returns ? I tried it in a simple html
page (javascript) but it didn't work.
Ben
2007/9/25, Willie Wong <wwong@princeton.edu>:
> On Mon, Sep 24, 2007 at 06:26:43PM +0200, Penguin Lover Benjamin Graf squawked:
> > I tried this as a proxy automatic configuration file (*.pac), but it
> > doesn't work :
>
> <snip>
>
> > At school, it works correctly (it uses the proxy when it is
> > necessary), but not at home. I think the "myIpAddress" is maybe not
> > the right solution.
>
> The only thing I can think of is that maybe "myIpAddress" is not
> returning what you think it returns?
>
> W
>
> --
> THE ENGLISH LANGUAGE
> <<<< ladybree@ >>>>
> We'll begin with box, the plural is boxes;
> But the plural of ox is oxen, not oxes.
> One fowl is a goose, but two are called geese,
> Yet the plural of moose is never meese.
> You may find a lone mouse or a whole nest of mice,
> But the plural of house is houses, not hice.
> If the plural of man always is men,
> Why shouldn't the plural of pan be call pen?
> If I speak of a foot and you show me two feet,
> And I give you a boot, would a pair be called beet?
> If the singular is this and the plural these,
> Should a plural of kiss ever be keese?
> We speak of a brother and also of brethren,
> But though we say mother, we never say methren.
> Then the masculine pronouns are he, his and him,
> But imagine the females - she, shis and shim!
> Sortir en Pantoufles: up 291 days, 19:26
> --
> gentoo-user@gentoo.org mailing list
>
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] auto proxy config (Firefox, and more)
[not found] ` <20070927030321.GA29868@princeton.edu>
@ 2007-09-30 10:33 ` Benjamin Graf
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Graf @ 2007-09-30 10:33 UTC (permalink / raw
To: gentoo-user
Ok, I'll try with IsInNet and patience..!
Thanks !
Ben
2007/9/27, Willie Wong <wwong@princeton.edu>:
> On Wed, Sep 26, 2007 at 05:26:44PM +0200, Penguin Lover Benjamin Graf squawked:
> > Thanks for the answer !
> >
> > How can I see what myIpAddress() returns ? I tried it in a simple html
> > page (javascript) but it didn't work.
> >
>
> Not being a javascript guru, I don't really know. Just tried with
> Venkman, and it seems that myIpAddress() is not standard?! (Can anyone
> more familiar with Javascript help?)
>
> One possibility might be that you should use the IsInNet function
> instead of just grepping the substring, but I really doubt that it
> would make a difference.
>
> One thing you can do to debug it is to use the IsInNet function and
> applying a large mask (like 240.0.0.0) and go downwards to find out
> what exactly the PAC file think your IP address is. Maybe that could
> shed light on what exactly is wrong.
>
> Best,
>
> W
> --
> "`Time is an illusion. Lunchtime doubly so.'
> `Very deep,' said Arthur, `you should send that in to the
> "Reader's Digest". They've got a page for people like you.'"
>
> - Ford convincing Arthur to drink three pints in ten
> minutes at lunchtime.
> Sortir en Pantoufles: up 293 days, 1:21
> --
> gentoo-user@gentoo.org mailing list
>
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-09-30 10:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-24 16:26 [gentoo-user] auto proxy config (Firefox, and more) Benjamin Graf
2007-09-25 21:14 ` Willie Wong
2007-09-26 15:26 ` Benjamin Graf
[not found] ` <20070927030321.GA29868@princeton.edu>
2007-09-30 10:33 ` Benjamin Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox