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

It's hard to extend protocol #79

Open
drunkpig opened this issue Oct 14, 2020 · 3 comments
Open

It's hard to extend protocol #79

drunkpig opened this issue Oct 14, 2020 · 3 comments

Comments

@drunkpig
Copy link

some protocols are private and strange, so I'd like provide a method to write customer defined protocol Matcher.

@drunkpig
Copy link
Author

drunkpig commented Oct 14, 2020

besids this , cmux use first N bytes to seperate protocol, N is various。 When cmux match protocol in the order of http(use first 8 bytes) then socks5(use first byte) , the socks handler will never reached!
The reason is Matcher is blocked at http Matcher, it will never read all first 8 bytes.

@Jille
Copy link

Jille commented Jan 24, 2022

(I have little experience with cmux, but) can't you just create your own matcher by defining a func(io.Reader) bool and using that?

@munding
Copy link

munding commented Jul 16, 2022

maybe you need to Match connections in order, first socks then http

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