Просмотр исходного кода

Use strings.ToLower for TUN protocol check to match LoadWithID behavior

Co-authored-by: RPRX <[email protected]>
copilot-swe-agent[bot] 5 месяцев назад
Родитель
Сommit
b5d070b169
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      infra/conf/xray.go

+ 1 - 1
infra/conf/xray.go

@@ -131,7 +131,7 @@ func (c *InboundDetourConfig) Build() (*core.InboundHandlerConfig, error) {
 	receiverSettings := &proxyman.ReceiverConfig{}
 
 	// TUN inbound doesn't need port configuration as it uses network interface instead
-	if c.Protocol == "tun" {
+	if strings.ToLower(c.Protocol) == "tun" {
 		// Skip port validation for TUN
 	} else if c.ListenOn == nil {
 		// Listen on anyip, must set PortList