Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Suppport for Reverse Socks #11

Open
jkMason opened this issue Dec 30, 2021 · 2 comments
Open

Feature Request: Suppport for Reverse Socks #11

jkMason opened this issue Dec 30, 2021 · 2 comments

Comments

@jkMason
Copy link

jkMason commented Dec 30, 2021

Any chance on supporting a reverse socks proxy mode similar to Chisel? This would allow for more flexible proxy support in the case of strict egress filtering.

@enthus1ast
Copy link
Owner

enthus1ast commented Feb 20, 2022

hi @jkMason yes i have considered it (and also build some unpublished demo code). But did not find a good solution yet.
Do you know of a standard protocol implementation that does something like this?

I'm not against adding a custom protocol (when its a reasonable amount of work) but would prefer a standard.

I could have a look how Chisel does it, though.

@jkMason
Copy link
Author

jkMason commented Feb 24, 2022

It looks like there isn't a standard protocol implementation of the reverse portion of a reverse socks proxy (like there is with a standard socks proxy). That being said, I think the easiest way to implement a reverse mode would be to serialize Socks Requests and Socks Responses using something like Protobuf and send this data over a socket.

Hope the following diagram helps illustrate this:

                Standard SOCKS Proxy

+----------+        +----------+        +----------+ 
| SOCKS    |        | SOCKS    |        | Remote   |
| Client   | -----> | Server   | -----> | Resource |
|          |        |          |        |          |
+----------+        +----------+        +----------+ 


                                    Reverse SOCKS Proxy
                
+----------+        +----------+                         +----------+        +----------+
| SOCKS    |        | SOCKS    |    socket connection    | SOCKS    |        | Remote   |
| Client   | -----> | Server/  | <---------------------  | Server/  | -----> | Resource |
|          |        | Listener |                         | Client   |        |          |
+----------+        +----------+                         +----------+        +----------+ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants