Improve bridge

This commit is contained in:
世界
2026-08-30 17:41:42 +08:00
parent 1e2f1d04da
commit 97bbf2a9a4
21 changed files with 276 additions and 191 deletions
+5 -2
View File
@@ -158,8 +158,11 @@ func (h *Outbound) ListenPacket(ctx context.Context, destination M.Socksaddr) (n
return conn, nil
}
func (h *Outbound) SupportsFlow(network string) bool {
return network == N.NetworkICMP && h.icmpPort != nil
func (h *Outbound) PreMatchFlow(network string, destination netip.Addr) adapter.PreMatchAction {
if network == N.NetworkICMP && h.icmpPort != nil {
return adapter.PreMatchFlow
}
return adapter.PreMatchContinue
}
func (h *Outbound) PortAddresses() (netip.Addr, netip.Addr) {