Page 7 of 7 FirstFirst ... 567
Results 61 to 66 of 66

Thread: Socks V4

  1. #61
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default

    Alright for those of you reading this thread and have no clue what Socks is and what it is used for, I have found this article on socks. It explains it very well without going into protocol details.

    http://www.clipcode.org/messaging/socks.html

    well it does go into protocol details but that is after it explain what socks is about.
    Last edited by leoandru; May 2, 2005 at 07:34 AM.

  2. #62
    Join Date
    Jun 2004
    Posts
    296
    Rep Power
    0

    Default

    does all this socks research help you with your bit torrent c# client?

  3. #63
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default

    Well yea the client has to support socks proxying so I have to know the client side of the socks protocol. Also its an introduction to the network programming in C# for me. That would prevent a lot of fiddling through documentation later, I'll have most of the aspects of net programming in my head by then.

    While I'm on the topic I made modifications to the code this weekend, The socks proxy can now be installed as a service on a windows machine. There is also improved performance with the introduction of thread pools for client request. I'll post the code later when im done testing today. I will also post the instructions on how to install this the socks as a windows service. Now I need to implement socks version 5.
    Last edited by leoandru; May 9, 2005 at 05:53 PM.

  4. #64
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default

    This is an updated version of the socks proxy. It has improved performance via Thread pooling. I wanted to add an object pool for objects that handle the tunneling for client server interaction. The project is no longer a single file it is split in 3 files:

    SharpSocks.cs -> The main project file
    SocksV4Handler -> A class that specifically handles version 4 of the socks
    TcpStreamTunnel.cs -> A clss that relays data between a client and it server.

    There is a visual studio solution project file and a sharpdevelop combine in the directory.
    Now as i mentioned earlier this can now be installed as a services on windows to do that you need to do some compiling from the command line so u have to get your enviroments variables set and get your hands dirty compiling code. The following line will make a service executable from the project files.

    Code:
    csc /t:winexe /d:Service /out:socks.exe SharpSocks.cs SocksV4Handler.cs TcpStreamTunnel.cs
    when that is done you can install the service using the commandline

    Code:
    installutil socks.exe
    to start the service:

    Code:
    net start SharpSocks
    Thats it you have a socks server running whenever your machine start.
    to uninstall the service type:

    Code:
    installutil /u socks.exe
    .

    Have fun!

  5. #65
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default

    Now some us work in companys that use socks proxy as firewalls and you may ask how can you get around that firewall. Well it would be easy to modified this proxy to do proxy chaining. Given that the socks firewall is permissive you can create a socks client that connects to socks firewall, have the firewall initiate a connection to an external socks and then have the external socks connect to the actual server, voila you can surf sites or use apps (like instant messengers) that were blocked by ur company.
    You would use the socks server running on your local machine as the proxy for you local clients. let me illustrate a little.

    browser/app/im --> connects to local socks (ur personal socks)
    --> connects to socks firewall --> connects to exteral socks --> connects to server.

    Hope that illustartion worked.

    Now remember that that the socks firewall would have to be permissive, else thatwould not work. Also you will need an external socks for this to work, its like hosting a websever on ur home machine on a c@w network. we all know how to do that so I'll skip the tutorial.
    I'm thinking that a gui will be need for such a client as it will have to be configured to chain 2 or more socks proxy.

    Anyways I intend to do that but i'll get back to it later. Got other stuff to go attend to. --> BitShark here i come.

  6. #66
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    Hey Leo, how about starting a thread on the classes in the Framework, like the socks program. It does not have to be specific to C#.
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •