Improve network reset

This commit is contained in:
世界
2026-08-30 17:41:43 +08:00
parent 3afd290278
commit e4c8b49eaf
26 changed files with 250 additions and 62 deletions
+5
View File
@@ -34,6 +34,7 @@ import (
var (
_ adapter.OutboundWithPreferredRoutes = (*Endpoint)(nil)
_ adapter.FlowOutbound = (*Endpoint)(nil)
_ adapter.InterfaceUpdateListener = (*Endpoint)(nil)
_ dialer.PacketDialerWithDestination = (*Endpoint)(nil)
_ tun.Port = (*Endpoint)(nil)
)
@@ -396,6 +397,10 @@ func (e *Endpoint) Close() error {
return err
}
func (e *Endpoint) InterfaceUpdated() {
e.client.RestartSession()
}
func (e *Endpoint) PreMatchFlow(network string, destination netip.Addr) adapter.PreMatchAction {
return adapter.PreMatchFlow
}