Skip to content

IdoBn/skcos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skcos

We are building a reverse socks server so the name should obviously be socks backwards ;)

rev <<< socks

Network Diagram

+--------+                            +--------+
|        |                            |        |
|        |       +-----+              |        |
| socks  | ------| nat |---------->   | relay  |
| client |       +-----+              | server |
|        |                            |        |
+--------+                            +--------+
                                          ||
                                          ||
                                          ||
                                      +--------+      +--------------+
                                      |  nat   |      |  another pc  |
                                      +--------+      +--------------+
                                          ||        /
                                          ||       /
                                          ||      /
                                          \/     /
                                      +--------+/
                                      |        |
                                      | reverse|
                                      | socks  | 
                                      | server |
                                      |        |
                                      +--------+

Goal

The goal is to allow the socks client (can be a browser or proxychains) to browse through the reverse socks server

Usage

first make sure you run the relay-agent the reverse-socks-server will connect ot it so it needs to be running.

cargo run --bin relay-agent

Then run the reverse-socks-server

cargo run --bin reverse-socks-server

Finally you can hookup your browser or proxychains to the relay agent and that is it.

The tests that will be done to prove that this works fully are:

  • proxychains + curl
  • chrome
  • firefox
  • proxychains + nmap

Flow

  1. socks client connects to the relay server
  2. relay server listens ahead of time to a connection from the socks server.
  3. relay server connects the new (incomming socks client connection) to the previously held socks server connection. 3.1. the two new sockets are somehow mapped together...
  4. socks server initiates a new connection to the relay server as soon as it gets data to it's previous connection. this way we can handle multiple connections at once.
  5. data is passed between the two sockets until one of them disconnects

Todo

  • Clean up code after I've properly learned rust.
  • Disconnect dangling sessions (to reproduce this do a simple curl + proxychains and see what happens)

About

Reverse Socks Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages