gobetween icon indicating copy to clipboard operation
gobetween copied to clipboard

Fails to Detect SNI with Xray

Open HenryPorternew opened this issue 5 months ago • 4 comments

I’m trying to route TLS traffic from an Xray/XTLS proxy/VPN based on its SNI. When Xray is set to use the Chrome fingerprint, GoBetween can’t detect the SNI — it gives an empty SNI: No matching SNI [] found I initially thought this was an Xray problem, but other SNI-based proxies can detect it correctly. I should note that this only happens when using the Chrome fingerprint. I tested other fingerprints, and they worked fine.

HenryPorternew avatar Aug 14 '25 18:08 HenryPorternew

Please show your full command line string. Your error looks like "-c" was omitted at all.

yyyar avatar Aug 14 '25 19:08 yyyar

sorry that was my bad its belong to other app . there was sni issue for go between i report this by mistake . will edit for that sorry again

HenryPorternew avatar Aug 14 '25 23:08 HenryPorternew

Seems it's problem in our SNI extraction implementation. It may be that in this case TLS ClientHello is split in several TLS records or TCP segments, so we do not receive it fully in one Read. I've tried to fix that.

@HenryPorternew it would be helpful if you could make a build from a fix-sni-extraction-#342 branch and check if it fixes the issue.

@illarion could you please review fix-sni-extraction-#342 as you've the author of the sni sniffer.

yyyar avatar Aug 16 '25 14:08 yyyar

ok i did buid fix-sni-extraction-#342 branch and test . it seems fixed the problem as you can see in screen shot before and after fix . now reads sni fully . thanks

Image

HenryPorternew avatar Aug 16 '25 16:08 HenryPorternew