![]() |
|
[C#] Tcp socket with proxy - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] Tcp socket with proxy (/showthread.php?tid=4840086) |
Tcp socket with proxy - OnlyQubes - May 28, 2015 Hello fellow Hackforums members. I am looking for a way to connect to a tcp server (minecraft server in the current case) with a proxy. Is there something like HttpWebRequest.Proxy for sockets? (HttpWebRequest example below) PHP Code Example of a socket class that needs connect to a server trough a proxy: PHP Code I have heard about SOCKS5, but i'm not sure if it the right way to get sockets connect trough a proxy. * - Bulldoozer1337 - May 28, 2015 SOCKS is just a protocol for proxy. You can design your own protocol or use existing. If you can you should better develop your own protocol because SOCKS protocol is trash. SOCKS protocol RFC: ietf.org/rfc/rfc1928.txt You have to write your own code. * - phrootoo - May 28, 2015 I mean, I've never tried this before, but when you think it through it's actually somewhat complex. Http works in a completely different way to TCP. Where TCP is always connected, Http is request based rather than stream based. Sure, you remember sessions, but if you're looking to have a constant connection open to another server, then relaying messages backwards and forwards, it's definitely far from as simple as setting a proxy up. Actually, i'd be fairly interested in this project (Creating a ProxySocket system, although it would require a base server etc). * - OnlyQubes - May 28, 2015 Okey got it. Thank you very much for your answers. * - Bulldoozer1337 - May 28, 2015 (May 28, 2015 08:22 AM)phrootoo Wrote: I mean, I've never tried this before, but when you think it through it's actually somewhat complex. HTTP is a software-layer-protocol built upon TCP. HTTP connects, sends everything it needs, receives response and closes connection because it doesn't need to do anything else. * - OnlyQubes - May 28, 2015 (May 28, 2015 09:16 AM)Bulldoozer1337 Wrote: HTTP is a software-layer-protocol built upon TCP. Didn't know that, thank you for the information. :) * - phrootoo - May 29, 2015 (May 28, 2015 09:16 AM)Bulldoozer1337 Wrote: HTTP is a software-layer-protocol built upon TCP. I am aware. I realise it was written a little incorrectly, but the fact that the connection is completely different means that its just not feasible in the way that a normal proxy works. * - ༺La FLame༻ - May 29, 2015 I suggest you use an application like Proxifier for that purpose. |