feat: support H2C and QUICv2 sniffing - #3036
Conversation
|
Thank you for your contribution; however, there are some implementation issues: Regarding As for the HTTP component, why use an unsafe function like |
|
I still fail to see the purpose of |
|
Issues requiring fixes:
|
|
Thanks for the review! While working on this, I noticed a few things that could be cleaned up - they're unrelated to the H2C/QUICv2 sniffing changes, but I figured I'd raise them since I'm already touching this code:
func (bs *BaseSniffer) Protocol() string {
return strings.ToLower(bs.protocol.String())
}
What do you think? |
|
This PR has already accomplished what it was supposed to; the remaining refactoring is not necessary. |
When I was looking into the mihomo code, I discovered that the sniffer doesn't support HTTP/2 or QUICv2, so I decided to submit this PR. Since the existing HTTP sniffer didn't have a clean structure to extend, I rewrote it from scratch.
Changes: