@@ -465,20 +465,6 @@ func (r *policyRuleSet) persistApprovalRule(verdict, dest string, port int) bool
465465 return true
466466}
467467
468- // persistAlwaysAllow writes an allow rule for dest:port from an ask->Always
469- // Allow approval and swaps in a recompiled engine. Thin wrapper around
470- // persistApprovalRule for call-site readability.
471- func (r * policyRuleSet ) persistAlwaysAllow (dest string , port int ) bool {
472- return r .persistApprovalRule ("allow" , dest , port )
473- }
474-
475- // persistAlwaysDeny writes a deny rule for dest:port from an ask->Always
476- // Deny approval and swaps in a recompiled engine. Thin wrapper around
477- // persistApprovalRule for call-site readability.
478- func (r * policyRuleSet ) persistAlwaysDeny (dest string , port int ) bool {
479- return r .persistApprovalRule ("deny" , dest , port )
480- }
481-
482468// buildPersistFunc returns a closure that persists a new allow/deny rule
483469// via the SOCKS5 rule set's store and swaps in a recompiled engine. It
484470// mirrors the always-allow/always-deny handling in Allow() so per-request
@@ -1430,14 +1416,6 @@ func (s *Server) sniPolicyCheckBeforeDial(ctx context.Context, request *socks5.R
14301416 }
14311417}
14321418
1433- // sniSaveRule persists an allow or deny rule from an SNI-based approval.
1434- // Returns true only when the rule was successfully written to the store AND
1435- // a recompiled engine was swapped in. Callers use the return value to
1436- // decide whether to attach a per-request checker as a safety net.
1437- func (s * Server ) sniSaveRule (verdict , dest string , port int ) bool {
1438- return s .rules .persistApprovalRule (verdict , dest , port )
1439- }
1440-
14411419// then dispatches datagrams to the DNSInterceptor (port 53) or UDPRelay
14421420// (all other ports). The handler blocks until the TCP control connection
14431421// closes, at which point all UDP sessions are cleaned up.
0 commit comments