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

feat: Host-based proxy #20

Merged
merged 9 commits into from
Mar 23, 2024
Merged

feat: Host-based proxy #20

merged 9 commits into from
Mar 23, 2024

Conversation

JyJyJcr
Copy link
Collaborator

@JyJyJcr JyJyJcr commented Mar 20, 2024

Abstruct

It is a typical situation that there are multiple servers in private network and only one proxy server is accessible from public network(or the Internet).
TLS enables to deal with the situation using SNI, and is included in QUIC protocol.
In this PR, Host-based routing is implemented using SNI.

Usage

  1. List up the mapping of host names to socketaddrs in conf file.
  2. Launch server specifying the conf file path.
  3. Run client using domain(host) name in URL.

Example:

  • ./quicssh-rs.toml
[proxy]
"xxx.example.net"="192.168.0.10:22"
"yyy.example.net"="192.168.0.10:2222"
"zzz.example.net"="192.168.0.20:22"
default="192.168.0.30:22"
  • launch server
quicssh-rs server -F ./quicssh-rs.toml
  • run client
quicssh-rs client quic://xxx.example.net # -> 192.168.0.10:22
quicssh-rs client quic://yyy.example.net # -> 192.168.0.10:2222
quicssh-rs client quic://zzz.example.net # -> 192.168.0.20:22
quicssh-rs client quic://<raw ip, or other domain name> # -> 192.168.0.30:22

Cargo.toml Show resolved Hide resolved
src/server.rs Outdated Show resolved Hide resolved
src/server.rs Show resolved Hide resolved
@oowl
Copy link
Owner

oowl commented Mar 23, 2024

Thanks!

@oowl oowl merged commit ccb4b32 into oowl:master Mar 23, 2024
9 checks passed
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

Successfully merging this pull request may close these issues.

2 participants