TCPClient and Proxies

  • Thread starter Thread starter Wal Turner
  • Start date Start date
W

Wal Turner

This has been discussed in a prior thread but there was no solution
proposed. Also, using WebRequest is not viable since we need a keep-alive
connection. Can anyone provide any information on using the TCPClient class
(or other) via proxies and whether or not this is possible?

Regards

Wwal
 
Hi Wal:

Are you talking about the HTTP/1.1, Keep-Alive header? The default
setting for the KeepAlive property of an HttpWebReqeust instance is
true.
 
Hi Wal,

What is exaclty what you wanna do?

If you know there is a proxy then you have to connect to the proxy, then it
depend of the proxy implementation how to manage the connection, I haven't
done nothing with a proxy but I do remember from several years ago that you
had to compile telnet, ftp, etc to be able to use socks5 (under linux) cause
at the least the establishment of the connection should be different.

I advise you check the documentation of the proxy you plan to support.

Cheers,
 
Thanks for your replies.
Scott we are not using Http at all - we're connecting to a TCPListener.
Basically it appears that TCPClient and TCPListener don't work when over a
socks proxy. I found this product online

http://www.etive.com/software/dotEtiveSocket/

and I am looking for a cheaper solution (read free) :D

I'm suprised this doesnt pop up all the time or hasnt been handled by .NET
seeming as many corporations run via a proxy and involve applications that
arent just web requests. Also Scott when I mentioned 'keep-alive' i just
meant streaming, sorry about that.
 
Wal:

Ok, it makes sense now :) Sorry I cannot give you any insight on the
proxy issue.

--s
 
Hi Wal,

the communication between your app and the socks server need to follow
some protocol. So, your app needs in a very specific way to tell the
socks server that it needs to connects to a given IP, on a given port,
to provide username and password, etc. You can read here about socks 5
protocol, so you can implement your own connection classes:

http://www.faqs.org/rfcs/rfc1928.html

Or, a simple googleing shows this paid class (49$) :
http://www.juriksoft.net/prog_proxy.html

and this free:
http://www.codeproject.com/csharp/ZaSocks5Proxy.asp

Hope that helps
Sunny
 
Back
Top