QUIC proxy that allows to use QUIC to connect to an SSH server without needing to patch the client or the server.

Overview

quicssh-rs

๐Ÿ˜„ quicssh-rs is a QUIC proxy that allows to use QUIC to connect to an SSH server without needing to patch the client or the server.

quicssh-rs is quicssh rust implementation. It is based on quinn and tokio

Why use QUIC? Because SSH is vulnerable in TCP connection environments, and most SSH packets are actually small, so it is only necessary to maintain the SSH connection to use it in any network environment. QUIC is a good choice because it has good weak network optimization and an important feature called connection migration. This means that I can switch Wi-Fi networks freely when remote, ensuring a stable SSH connection.

Demo

demo-quicssh-rs.mp4

Why not mosh?

Because the architecture of mosh requires the opening of many ports to support control and data connections, which is not very user-friendly in many environments. In addition, vscode remote development does not support mosh.

Architecture

Standard SSH connection

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  bob                  โ”‚             โ”‚         wopr          โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚             โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚           ssh user@wopr           โ”‚โ”€โ”ผโ”€โ”€โ”€โ”€tcpโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ–ถโ”‚       sshd        โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚             โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

SSH Connection proxified with QUIC

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  bob                  โ”‚             โ”‚         wopr          โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚             โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ssh -o ProxyCommand "quicssh-rs    โ”‚ โ”‚             โ”‚ โ”‚       sshd        โ”‚ โ”‚
โ”‚ โ”‚ client quic://%h:4433             โ”‚ โ”‚             โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ โ”‚       user@wopr                   โ”‚ โ”‚             โ”‚           โ–ฒ           โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚             โ”‚           โ”‚           โ”‚
โ”‚                   โ”‚                   โ”‚             โ”‚           โ”‚           โ”‚
โ”‚                process                โ”‚             โ”‚  tcp to localhost:22  โ”‚
โ”‚                   โ”‚                   โ”‚             โ”‚           โ”‚           โ”‚
โ”‚                   โ–ผ                   โ”‚             โ”‚           โ”‚           โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚             โ”‚โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
โ”‚ โ”‚  quicssh-rs client wopr:4433      โ”‚โ”€โ”ผโ”€quic (udp)โ”€โ”€โ–ถโ”‚   quicssh-rs server โ”‚โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚             โ”‚โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Usage

$ quicssh-rs -h
A simple ssh server based on quic protocol

Usage: quicssh-rs [OPTIONS] <COMMAND>

Commands:
  server  Server
  client  Client
  help    Print this message or the help of the given subcommand(s)

Options:
      --log <LOG_FILE>  Location of log, Defalt if
  -h, --help            Print help
  -V, --version         Print version

Client

$ quicssh-rs client -h
Client

Usage: quicssh-rs client <URL>

Arguments:
  <URL>  Sewrver address

Options:
  -h, --help     Print help
  -V, --version  Print version

Client SSH Config

โ•ฐโ”€$ cat ~/.ssh/config
Host test
    HostName test.test
    User root
    Port 22333
    ProxyCommand /Users/ouyangjun/code/quicssh-rs/target/release/quicssh-rs client quic://%h:%p

โ•ฐโ”€$ ssh test                                                                                                                                                                  
Last login: Mon May  1 13:32:15 2023 from 127.0.0.1

Server

$ quicssh-rs server -h
Server

Usage: quicssh-rs server [OPTIONS]

Options:
  -l, --listen <LISTEN>  Address to listen on [default: 0.0.0.0:4433]
  -h, --help             Print help
  -V, --version          Print version
You might also like...
pam-send-slack-message is a program that publishes messages on slack when a linux server is accessed through ssh.

pam-send-slack-message pam-send-slack-message is a program that publishes messages on slack when the linux server is accessed through ssh. Installatio

An experimental HTTP server in Rust that supports HTTP/1.1, HTTP/2, and HTTP/3 over QUIC.

๐Ÿš€ H123 An experimental HTTP server in Rust that supports HTTP/1.1, HTTP/2, and HTTP/3 over QUIC. Warning This is an experimental project and not inte

A versatile and efficient proxy framework with nice features suitable for various use cases.

A versatile and efficient proxy framework with nice features suitable for various use cases.

Library + CLI-Tool to measure the TTFB (time to first byte) of HTTP requests. Additionally, this crate measures the times of DNS lookup, TCP connect and TLS handshake.

TTFB: CLI + Lib to Measure the TTFB of HTTP/1.1 Requests Similar to the network tab in Google Chrome or Mozilla Firefox, this crate helps you find the

๐Ÿฅง Savoury implementation of the QUIC transport protocol and HTTP/3

quiche is an implementation of the QUIC transport protocol and HTTP/3 as specified by the IETF. It provides a low level API for processing QUIC packet

Futures-based QUIC implementation in Rust

Pure-rust QUIC protocol implementation Quinn is a pure-rust, future-based implementation of the QUIC transport protocol undergoing standardization by

neqo โ€” an Implementation of QUIC written in Rust

Neqo, an Implementation of QUIC written in Rust To run test HTTP/3 programs (neqo-client and neqo-server): cargo build ./target/debug/neqo-server [::]

TCP is so widely used, however QUIC may have a better performance.

TCP is so widely used, however QUIC may have a better performance. For softwares which use protocols built on TCP, this program helps them take FULL advantage of QUIC.

MQTT over QUIC
MQTT over QUIC

MQuicTT ๐Ÿšง This is a pre-alpha project, tread carefully ๐Ÿšง A rustlang utility/library for MQTT over QUIC. QUIC allows us to send data over multiple co

Comments
  • ็ฝ‘็ปœๅˆ‡ๆขๆ—ถ้—ดๅคงไบŽ 10 ็ง’๏ผŒquicssh-rs ๆœๅŠก็ซฏ่ฏปๅ–่ถ…ๆ—ถ๏ผŒ่ฟžๆŽฅ่ขซๆ–ญๅผ€

    ็ฝ‘็ปœๅˆ‡ๆขๆ—ถ้—ดๅคงไบŽ 10 ็ง’๏ผŒquicssh-rs ๆœๅŠก็ซฏ่ฏปๅ–่ถ…ๆ—ถ๏ผŒ่ฟžๆŽฅ่ขซๆ–ญๅผ€

    ๅฆ‚ๆžœๅˆ‡ๆข็ฝ‘็ปœ๏ผŒไปŽๆ–ญๅผ€ๅˆฐๆขๅค่ฟžๆŽฅ็š„ๆ—ถ้—ดๅคงไบŽ 10 ็ง’๏ผŒๆœๅŠก็ซฏ่ถ…ๆ—ถ็›ดๆŽฅ้€€ๅ‡บ๏ผŒๅฆ‚ไธ‹๏ผš

    ERROR quicssh_rs::server - [server] reading from quic client error: connection lost
    

    ๅ› ๆญคไปฅไธ‹ๅธธ่ง็š„ๆผซๆธธ/่ฟžๆŽฅ่ฟ็งป็š„ๅœบๆ™ฏๅฐ†ไธๅฏ็”จ๏ผš

    1. ็ซ่ฝฆ็ป่ฟ‡้šง้“ๆ—ถ
    2. ไปŽๅทฅไฝๅˆฐไผš่ฎฎๅฎค
    3. ไปŽๅฎถ้‡ŒๅˆฐๅŠžๅ…ฌๅฎค ๏ผˆๆœ‰็‚น็‰ตๅผบ๏ผ‰
    4. ๅ€™่ฝฆๅฎคๅ€™่ฝฆใ€ๆฃ€็ฅจ ๏ผˆไนŸๆœ‰็‚น็‰ตๅผบ๏ผ‰
    5. ......
    opened by kings-way 1
  • SSH ๆŠฅๆ–‡ๆŸๅ๏ผŒๅˆ‡ๆขๆˆๅŠŸ็Ž‡ไฝŽ

    SSH ๆŠฅๆ–‡ๆŸๅ๏ผŒๅˆ‡ๆขๆˆๅŠŸ็Ž‡ไฝŽ

    ใ€ๆต‹่ฏ•็Žฏๅขƒ 1 ใ€‘ ๆœฌๅœฐ๏ผš็”ตไฟกๅฎฝๅธฆ๏ผŒๅŒๅ…‰็Œซไธ‹็š„ๅ‡ ไธช WiFi ่ทฏ็”ฑๅ™จ๏ผŒ่ฝฎๆตๅˆ‡ๆข๏ผ› ่ฟœ็จ‹๏ผšvps๏ผŒๅปถ่ฟŸ็บฆ 140 ms๏ผŒๅฝ“ๅ‰ไธขๅŒ…ๆƒ…ๅ†ตไธบ 0%๏ผŒ่ฟžๆŽฅๅปบ็ซ‹ๅŽๅœจ vps ไธŠๆŒ็ปญ ping 1.1.1.1

    ใ€ๆต‹่ฏ•็Žฏๅขƒ 2 ใ€‘ ๆœฌๅœฐ๏ผš่”้€š 5G ๆ‰‹ๆœบ็ƒญ็‚น๏ผŒ่ฝฎๆตๆ‰“ๅผ€ โ€œ็ฝ‘็ปœๆ•ฐๆฎโ€ ๅผ€ๅ…ณ ่ฟœ็จ‹๏ผšvps๏ผŒๅปถ่ฟŸ็บฆ 170 ๅคš ms๏ผŒๅฝ“ๅ‰ไธขๅŒ…ๆƒ…ๅ†ตไธบ 0%๏ผŒ่ฟžๆŽฅๅปบ็ซ‹ๅŽๅœจ vps ไธŠๆŒ็ปญ ping 1.1.1.1

    ไปฅไธŠไธค็ง็Žฏๅขƒๅคšๆฌกๆต‹่ฏ•๏ผŒSSH ่ฟžๆŽฅๆผซๆธธๅชๆˆๅŠŸ่ฟ‡ไธ€ๆฌก๏ผŒ็”š่‡ณๆœ‰ๆ—ถๅ€™่ฟžไธŠ ssh ๆฒกๆœ‰ไปปไฝ•ๆ“ไฝœ๏ผŒๅ‡ ็ง’ไน‹ๅŽไนŸไผš่‡ชๅŠจๆ–ญๅผ€ ๏ผ› ๆ‰‹ๆœบ็ƒญ็‚น็š„ๆต‹่ฏ•๏ผŒๅœจๅพˆ็Ÿญๆ—ถ้—ดๅ†…ๅผ€ๅ…ณๆ•ฐๆฎ๏ผŒๆœฌๆœบๆŒ็ปญ ping ๆต‹่ฏ•็กฎ่ฎค็ฝ‘็ปœๅพˆๅฟซๆขๅค๏ผŒไฝ†ๆ˜ฏ SSH ่ฟžๆŽฅ้ƒฝไผšๆ–ญๅผ€๏ผŒ้”™่ฏฏๅฆ‚ไธ‹๏ผš

    Bad packet length 3414441652.
    ssh_dispatch_run_fatal: Connection to UNKNOWN port 65535: Connection corrupted
    

    ๅœจๅฎขๆˆท็ซฏๅ‘็”Ÿ้”™่ฏฏใ€่ฟžๆŽฅๆ–ญๅผ€ไน‹ๅŽ๏ผŒๆœๅŠก็ซฏๆ‰ไผšๅ‡บ็Žฐ read error ้”™่ฏฏๅนถๅ…ณ้—ญ็›ธๅบ”่ฟžๆŽฅ

    ERROR quicssh_rs::server - [server] reading from quic client error: connection lost`
    INFO quicssh_rs::server - [server] exit client
    

    ๆ‰€ไปฅๆ˜ฏ SSH ่ฟžๆŽฅๅ…ˆๆ–ญๅผ€๏ผŒไน‹ๅŽ QUIC ่ฟžๆŽฅๆ‰ๆ–ญๅผ€๏ผŒ็Œœๆต‹ๆ˜ฏๅฆๆ˜ฏ่ฟžๆŽฅ้‡ๅปบ่ฟ‡็จ‹ไธญ๏ผŒ้”™่ฏฏๅ‘้€ไบ† buffer ไธญ็š„้ƒจๅˆ†ๆ•ฐๆฎๅฏผ่‡ด็ ดๅไบ† SSH ๆŠฅๆ–‡๏ผŸ

    opened by kings-way 1
Owner
Jun Ouyang
Boring man
Jun Ouyang
A TCP proxy using HTTP - Reach SSH behind a Nginx reverse proxy

?? TCP over HTTP ?? The Questions ?? What does it do? You can proxy TCP traffic over HTTP. A basic setup would be: [Your TCP target] <--TCP-- [Exit No

Julian 185 Dec 15, 2022
Lightweight proxy that allows redirect HTTP(S) traffic through a proxy.

Proxyswarm Proxyswarm is a lightweight proxy that allows redirect HTTP(S) traffic through a proxy. WARNING: This app isn't recomended for download lar

Jorge Alejandro Jimenez Luna 4 Apr 16, 2022
Acts as an IRC server and a nostr client. Connect with your IRC client using your nostr private key as the password.

nostr-irc Acts as an IRC server and a nostr client. Connect with your IRC client using your nostr private key as the password. Experimental code, use

null 11 Dec 26, 2022
Proxy sentry request to a sentry server using a tunnel/proxy endpoint

Sentry Tunnel This is a proxy that forwards tunneled sentry requests to the real sentry server. The implementation is based on the explanation provide

Paul FLORENCE 14 Dec 20, 2022
UDP proxy with Proxy Protocol and mmproxy support

udppp UDP proxy with Proxy Protocol and mmproxy support. Features Async Support Proxy Protocol V2 SOCKET preserve client IP addresses in L7 proxies(mm

b23r0 10 Dec 18, 2022
Web3-proxy: a fast caching and load balancing proxy for web3 (Ethereum or similar) JsonRPC servers.

web3-proxy Web3-proxy is a fast caching and load balancing proxy for web3 (Ethereum or similar) JsonRPC servers. Signed transactions (eth_sendRawTrans

null 55 Jan 8, 2023
This Intelligent Transportation Systems (ITS) MQTT client based on the JSon ETSI specification transcription provides a ready to connect project for the mobility

This Intelligent Transportation Systems (ITS) MQTT client based on the JSon ETSI specification transcription provides a ready to connect project for the mobility (connected and autonomous vehicles, road side units, vulnerable road users,...). Let's connect your device or application to our Intelligent Transport Systems (ITS) platform!

Orange 4 Nov 29, 2022
A tcp proxy server/client which exchange the data in temp files

ftcp A tcp proxy server/client which exchange the data in temp files ้€š่ฟ‡ๅœจไธดๆ—ถๆ–‡ไปถไธญไบคๆขๆ•ฐๆฎๆฅ่ฟ›่กŒTCPไปฃ็†็š„ไธ€ไธชๆœๅŠก็ซฏ/ๅฎขๆˆท็ซฏ ๅญฆๆ กๅ†…็ฝ‘ไธญๆœ‰้’ˆๅฏนๆ•™ๅญฆๆฅผ็š„้˜ฒ็ซๅข™ๅฏผ่‡ดๆ•™ๅฎค็”ต่„‘้šพไปฅไธŠ็ฝ‘๏ผˆ ไฝ†ๅญฆๆ กๅ†…ๅปบๆœ‰ๅ…ฌๅ…ฑftpๆœๅŠกๅ™จ๏ผŒๅ› ๆญคๅฐฑๆœ‰ไบ†่ฟ™ไธชๅ€Ÿ

Daile Liu 2 Feb 17, 2022
A multi-connection TCP reverse proxy server and client.

tprox A multi-connection TCP reverse proxy. The tprox server is able to proxy multiple incoming connections to the tprox client over a single TCP conn

Mohammed Ajmal Siddiqui 4 Sep 21, 2022
Imagine your SSH server only listens on an IPv6 address, and where the last 6 digits are changing every 30 seconds as a TOTP code...

tosh Imagine your SSH server only listens on an IPv6 address, and where the last 6 digits are changing every 30 seconds as a TOTP code... Inspired fro

Mark Vainomaa 409 Oct 23, 2022