Re: Trouble with SOCKS proxies using NSStream
Re: Trouble with SOCKS proxies using NSStream
- Subject: Re: Trouble with SOCKS proxies using NSStream
- From: Jeremy Wyld <email@hidden>
- Date: Sun, 16 Jan 2005 17:07:22 -0800
On Jan 16, 2005, at 3:46 PM, Samuel Tesla wrote:
That makes sense.
However, I'm not connecting to localhost when this happens, hence my
confusion. I'm trying to connect to a remote host, and I'm trying to
use a remote proxy, and its still not working.
Okay, I got confused then. It would only ignore it if the far end host
is one of those.
Although, this does raise the question of why it ignores the proxy
settings. Wouldn't that really be something we'd want to allow the
application to decide? I know that I can think up some really good
reasons to run a proxy on the localhost and use it to connect to
services on the localhost.
No this is not something that should be left up to the application. It
is more often not the case that you want to proxy to localhost through
localhost. Final results in the case where the proxy to localhost
through localhost will more than likely be the same anyhow. I can
think of more security reasons as why localhost should not be sent
through a proxy and it's better to fault in that direction.
Also, should I expect this behaviour if the host the stream is set up
to connect to is remote but the proxy is on localhost?
No, proxy through localhost should be just fine. There are many people
that use this today with Safari going through SOCKS on localhost.
jeremy
Thanks, again, for the help.
Samuel
On Jan 16, 2005, at 3:36 PM, email@hidden wrote:
localhost, 127.0.0.1, and ::1 are automatically bypassed for proxies.
When you called
SetProperty, it successfully set the value. This is why it returns
TRUE.
CFSocketStream knows that it should bypass the proxy when connecting
to
these host values
though. It actually does this part up front, so as to not pay the
price
at connect or to hold on
to memory that's not needed. You are trying to pull the value back
out,
but it really wasn't
saved, so you're getting NULL.
I believed I changed the behavior in Tiger to go ahead and return
FALSE
in the case where it
didn't get set instead of returning this false positive.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden