Fix vless tests
This commit is contained in:
@@ -69,7 +69,7 @@ func (s *Service[T]) NewConnection(ctx context.Context, conn net.Conn, metadata
|
||||
|
||||
userFlow := s.userFlow[user]
|
||||
if request.Flow != userFlow {
|
||||
return E.New("flow mismatch: expected ", userFlow, ", but got ", request.Flow)
|
||||
return E.New("flow mismatch: expected ", flowName(userFlow), ", but got ", flowName(request.Flow))
|
||||
}
|
||||
|
||||
protocolConn := conn
|
||||
@@ -94,6 +94,13 @@ func (s *Service[T]) NewConnection(ctx context.Context, conn net.Conn, metadata
|
||||
}
|
||||
}
|
||||
|
||||
func flowName(value string) string {
|
||||
if value == "" {
|
||||
return "none"
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
type serverConn struct {
|
||||
net.Conn
|
||||
responseWriter io.Writer
|
||||
|
||||
Reference in New Issue
Block a user