Discussion:
Indy and proxy bypass
(too old to reply)
Rafael
2008-06-09 13:54:35 UTC
Permalink
Hey guys

How can I simulate the Internet Explorer option "do not use proxy for local
addresses" when configuring proxy on indy?
I have a local server that I do not want to use proxy when accessing it but
do use proxy when accessing an internet server ... I think this option is
called proxy bypass but I am not sure ...

Rafael Colucci
Remy Lebeau (TeamB)
2008-06-09 16:50:54 UTC
Permalink
Post by Rafael
How can I simulate the Internet Explorer option "do not use
proxy for local addresses" when configuring proxy on indy?
You would have to manually enable/disable the TIdHTTP.ProxyParams for each
URL you access. It is your responsibility to determine which URLs are to be
considered "local". Obviously, "127.0.0.1" and "localhost" are local, but
there are others as well, such as the local machine name, and the machine's
actual IP address.


Gambit
Rafael
2008-06-09 17:16:26 UTC
Permalink
Hey Gambit

Ok .. I got it. Is there any way to find out if an adress is a local
address?

Rafael Colucci
Post by Remy Lebeau (TeamB)
Post by Rafael
How can I simulate the Internet Explorer option "do not use
proxy for local addresses" when configuring proxy on indy?
You would have to manually enable/disable the TIdHTTP.ProxyParams for each
URL you access. It is your responsibility to determine which URLs are to
be considered "local". Obviously, "127.0.0.1" and "localhost" are local,
but there are others as well, such as the local machine name, and the
machine's actual IP address.
Gambit
Remy Lebeau (TeamB)
2008-06-09 18:38:14 UTC
Permalink
Post by Rafael
Ok .. I got it. Is there any way to find out
if an adress is a local address?
You will have to parse the URL beforehand, extract the hostname from it, and
compare it to the local items I already mentioned earlier. You may also
have to parse the OS's HOSTS file as well to see if the hostname matches any
existing aliases that refer to any local items as well.


Gmbit
Marc Rohloff [TeamB]
2008-06-09 20:01:46 UTC
Permalink
Post by Remy Lebeau (TeamB)
You will have to parse the URL beforehand, extract the hostname from it, and
compare it to the local items I already mentioned earlier. You may also
have to parse the OS's HOSTS file as well to see if the hostname matches any
existing aliases that refer to any local items as well.
You could also consider anything without a domain (without a period)
to be local, or otherwise everything under a specific domain.
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
Remy Lebeau (TeamB)
2008-06-09 20:11:46 UTC
Permalink
Post by Marc Rohloff [TeamB]
You could also consider anything without a
domain (without a period) to be local
Accessing a server elsewhere on the same LAN via its machine name (no
period, no domain) might still require a proxy, depending on the LAN setup.


Gambit

Loading...