Skip to content

Commit d1cb52a

Browse files
committed
fix(policy): use engine default verdict for QUIC instead of hardcoded deny
EvaluateQUICDetailed was hardcoded to return Deny as the default verdict, ignoring the engine's configured default. When default is "ask", QUIC traffic to unmatched destinations was silently dropped instead of triggering approval. Now uses e.Default so QUIC respects the same default as TCP.
1 parent 28dfdf9 commit d1cb52a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

internal/policy/engine.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,5 +767,9 @@ func (e *Engine) EvaluateQUICDetailed(dest string, port int) (Verdict, MatchSour
767767
if matchRulesStrictProto(e.compiled.askRules, dest, port, protoNameUDP) {
768768
return Ask, RuleMatch
769769
}
770-
return Deny, DefaultVerdict
770+
// Use the engine's configured default verdict. Unscoped rules (no
771+
// protocol filter) are NOT matched for QUIC because they are
772+
// TCP-scoped by convention and should not inadvertently allow or
773+
// deny UDP/QUIC traffic.
774+
return e.Default, DefaultVerdict
771775
}

internal/proxy/server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,6 @@ func (s *Server) handleAssociate(_ context.Context, writer io.Writer, request *s
15561556
log.Printf("[UDP] invalid datagram from %s: %v", srcAddr, parseErr)
15571557
continue
15581558
}
1559-
15601559
// DNS interception: port 53 traffic goes to the DNS interceptor.
15611560
if port == 53 && s.dnsInterceptor != nil {
15621561
resp, dnsErr := s.dnsInterceptor.HandleQuery(payload)

0 commit comments

Comments
 (0)