Xray-core icon indicating copy to clipboard operation
Xray-core copied to clipboard

[Feature] SSH transport

Open HirbodBehnam opened this issue 1 year ago • 20 comments

I'm not sure why nobody has recommended this before but isn't it possible to add a SSH transport to xray? GOST had it for a while and it's source is available here. I assume that there is going to be some challenges. For example, are we going to allow SSH transport as incoming transport? In other words, are we going to allow users to run a SSH server? Or are we going to declare a custom channel for our traffic (like GOST)? Or are we going to allow port forwarding?

For the starting point, I think we should implement either of these two:

  1. SSH server and client and use custom channel to forward traffic. This probably makes the server vulnerable to active probing.
  2. SSH client only with port forwarding. This might be safer but it's harder to setup. My idea is to just forward the traffic which protocol generates to destination port. So a setup could be something like this:
VLESS + SSH <-> SSH Server <-> VLESS + Raw TCP

HirbodBehnam avatar Apr 06 '23 18:04 HirbodBehnam