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

[Discussion&Suggestion]: Mux protocols #40

Open
radiumatic opened this issue Dec 11, 2024 · 5 comments
Open

[Discussion&Suggestion]: Mux protocols #40

radiumatic opened this issue Dec 11, 2024 · 5 comments

Comments

@radiumatic
Copy link

radiumatic commented Dec 11, 2024

It's pretty evident that opening a new connection for each tunneled one eats through the battery pretty fast. So Mux seems a pretty good feature.

The problem that none of the mux protocols in Xray-Core and Sing-Box handle (for some reason) is that ISPs throttle long-lived connections. Maybe a switch can be added to move to a new connection after an arbitrary amount of time? (The same is true for Hysteria and QUIC, they're throttled after a while, port hopping would help those as well)

@xiaorong61
Copy link

I think the benefit of multiplexing is to reduce handshake delay, but the CPU usage is actually increased.

@cfal
Copy link
Owner

cfal commented Mar 5, 2025

moving to a new connection would ideally be handled by the client - QUIC connections can have an idle timeout, but i am not sure a good way the server would handle force-closing a connection while it's still being used. session id/association ids eg in hysteria and tuic are connection-local; so it wouldn't be possible to continue a proxied TCP connection after the switch.

@cfal
Copy link
Owner

cfal commented Mar 5, 2025

the client would also need to support port hopping - you can listen on as many ports as you want on the server. there's no way that the server could coordinate with the client to close a port and switch to a new one when it hops, unfortunately.

@radiumatic
Copy link
Author

That's precisely what I meant. The client should use a different port on its end to communicate so the 4-way tuple changes shape. The server doesn't need to do anything.

@radiumatic
Copy link
Author

I think the benefit of multiplexing is to reduce handshake delay, but the CPU usage is actually increased.

Really?
Still, it reduces the number of samples for detection and messes up size-timing fingerprints.

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

No branches or pull requests

3 participants