mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
As substring to match in VLESS fallbacks SNI shunt
This commit is contained in:
parent
f13ac3cb55
commit
f0efc0cfde
1 changed files with 7 additions and 7 deletions
|
@ -226,14 +226,14 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection i
|
|||
}
|
||||
|
||||
if len(napfb) > 1 || napfb[""] == nil {
|
||||
if napfb[name] == nil {
|
||||
generic := "*"
|
||||
if index := strings.IndexByte(name, '.'); index != -1 {
|
||||
generic += name[index:]
|
||||
}
|
||||
if napfb[generic] != nil {
|
||||
name = generic
|
||||
if name != "" && napfb[name] == nil {
|
||||
match := ""
|
||||
for n := range napfb {
|
||||
if n != "" && strings.Contains(name, n) && len(n) > len(match) {
|
||||
match = n
|
||||
}
|
||||
}
|
||||
name = match
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue