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

SSH tunnel as a proxy server for a SOCKS client (equivalent of ssh -D) #607

Closed
isontheline opened this issue Apr 28, 2022 · 6 comments
Closed
Assignees
Labels
✨ enhancement New feature or request
Milestone

Comments

@isontheline
Copy link
Owner

A great addition would be allowing opening the ssh tunnel as a proxy server for a SOCKS client (equivalent of ssh -D).

It would allow users to connect to and route all traffic through their home server when abroad to access local services blocked outside the country. Basically a free VPN!

I can't see this is possible on the current version, but please let me know if I've missed something.

Many thanks,

Paul.

Originally posted by @blendexperts in #606

@isontheline isontheline self-assigned this Apr 28, 2022
@isontheline isontheline added ✨ enhancement New feature or request P2 labels Apr 28, 2022
@isontheline isontheline modified the milestone: 18 - Honeybee Apr 28, 2022
@isontheline isontheline added this to the 19 - Octopus milestone May 29, 2022
@isontheline isontheline modified the milestones: 19 - Octopus, 20 - Moon Jul 28, 2022
@rikhtehgaran
Copy link

Hi i have same problem thanks for adding this feature

@isontheline
Copy link
Owner Author

You can now enable the SOCKS server inside WebSSH.

How to do?

  1. Allow WebSSH to accept external connections : iOS Settings > WebSSH > Tunnel > Incoming Connections Strategy > Accept both local and remote connections
  2. (Optional) Enable VPN-Over-SSH (so you will be able to switch between apps on your iDevice)
  3. (Optional) Enable WebSSH Settings > Keep Device Awake (in order to don't sleep your device)
  4. Inside port forwarding use this : *:1985 replace 1985 by the SOCKS port you want to listen to (it will be your SOCKS server port for your other devices)
  5. Launch your tunnel
  6. (Optional) If you know your device IP address skip this step. Launch mashREPL and get your local IP address with this command : ifconfig
  7. On your other devices use a SOCKS configuration like this : 192.168.0.18:1985 where 192.168.0.18 is your iDevice and 1985 is your SOCKS server port

@rikhtehgaran
Copy link

I think these settings is for converting my IOS to an ssh server, and then I connect from another device to my IOS using socks. and 192.168.0.18 is the local IP of my IOS, and 1985 is the port of SOCK on my ios. am I right?
But I repeat again, I have a Linux server somewhere with an IP and port, so I ssh to my server. now I want to tunnel all traffic of ios over this ssh connection
So I put some port (4545) in port forwarding as you mentioned:
image

I put this setting in telegram, for example as socks connection but no success and it still in connection:
image

can you help me with more details if webssh support this feature?

@isontheline
Copy link
Owner Author

isontheline commented Sep 30, 2022

You're right WebSSH will act as a SOCKS proxy between telegram and your SSH server.

Please check that you allow outside connections on your Tunnel :

Allow WebSSH to accept external connections : iOS Settings > WebSSH > Tunnel > Incoming Connections Strategy > Accept both local and remote connections

Outside connections are also from within your device from other apps.

Could you try?

(Does Telegram need SOCKS or HTTP proxy?)

(Yet WebSSH won't forward full network connections, only SOCKS forward is implemented. Full VPN will be implemented later, no ETA)

@rikhtehgaran
Copy link

Hi i can find this: Allow WebSSH to accept external connections : iOS Settings > WebSSH > Tunnel > Incoming Connections Strategy > Accept both local and remote connections see here:
AAcEQvcHFU

@isontheline
Copy link
Owner Author

You need to use the latest beta release :

https://testflight.apple.com/join/QSrBK59z

The option is on the bottom when done

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
No open projects
Tunnel / VPN-Over-SSH
Awaiting triage
Development

No branches or pull requests

2 participants