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

Allow to use peers as socks5 proxy server #102

Open
pymq opened this issue Jun 18, 2023 · 0 comments
Open

Allow to use peers as socks5 proxy server #102

pymq opened this issue Jun 18, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@pymq
Copy link
Member

pymq commented Jun 18, 2023

Sometimes it's necessary to access the internet from another IP address. This can be used to bypass firewalls or government restrictions. This feature allows you to use your known peers to be socks5 proxy server for you (from their permission, of course).

More technically:

  • each peer can allow known peer to use themselves as proxy server. This means that there will be new configuration for each peer like Allow to use my device as socks5 proxy server. This configuration should be accessible from the GUI and also be in peer status protocol here
  • somewhere in GUI there should be switch to use one particular peer as socks5 proxy. In system tray it can be a new submenu with list of available peers and a checkbox to use one of them. For interface and cli I don't have any good ideas, probably we can show information about currently used peer in Status section and add button for each peer to set them as proxy
  • each peer binds to something like 127.0.0.66:1080 which is intended to be a socks5 proxy endpoint. Something like this. On each connect there should be opened new stream to p2p protocol (below) that should be handled with bidirectional io.Copy until io.EOF
  • each peer provides new p2p protocol like this. This protocol handler should first check access (that remote peer can use local peer as socks5 proxy) and then "proxy" incoming stream like this. It probably should be synchronous inside StreamHandler

cc: @GrigoryKrasnochub

@pymq pymq added the enhancement New feature or request label Jun 18, 2023
@pymq pymq self-assigned this Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant