mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-03 09:47:31 +03:00
Fix network monitor
This commit is contained in:
@@ -241,9 +241,9 @@ func (h *Hysteria) udpRecvLoop(conn quic.Connection) {
|
||||
}
|
||||
}
|
||||
|
||||
func (h *Hysteria) InterfaceUpdated() error {
|
||||
func (h *Hysteria) InterfaceUpdated() {
|
||||
h.Close()
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
func (h *Hysteria) Close() error {
|
||||
|
||||
@@ -129,11 +129,11 @@ func (h *Shadowsocks) NewPacketConnection(ctx context.Context, conn N.PacketConn
|
||||
return NewPacketConnection(ctx, h, conn, metadata)
|
||||
}
|
||||
|
||||
func (h *Shadowsocks) InterfaceUpdated() error {
|
||||
func (h *Shadowsocks) InterfaceUpdated() {
|
||||
if h.multiplexDialer != nil {
|
||||
h.multiplexDialer.Reset()
|
||||
}
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
func (h *Shadowsocks) Close() error {
|
||||
|
||||
@@ -174,9 +174,9 @@ func (s *SSH) connect() (*ssh.Client, error) {
|
||||
return client, nil
|
||||
}
|
||||
|
||||
func (s *SSH) InterfaceUpdated() error {
|
||||
func (s *SSH) InterfaceUpdated() {
|
||||
common.Close(s.clientConn)
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
func (s *SSH) Close() error {
|
||||
|
||||
@@ -104,11 +104,11 @@ func (h *Trojan) NewPacketConnection(ctx context.Context, conn N.PacketConn, met
|
||||
return NewPacketConnection(ctx, h, conn, metadata)
|
||||
}
|
||||
|
||||
func (h *Trojan) InterfaceUpdated() error {
|
||||
func (h *Trojan) InterfaceUpdated() {
|
||||
if h.multiplexDialer != nil {
|
||||
h.multiplexDialer.Reset()
|
||||
}
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
func (h *Trojan) Close() error {
|
||||
|
||||
@@ -138,9 +138,9 @@ func (s *URLTest) NewPacketConnection(ctx context.Context, conn N.PacketConn, me
|
||||
return NewPacketConnection(ctx, s, conn, metadata)
|
||||
}
|
||||
|
||||
func (s *URLTest) InterfaceUpdated() error {
|
||||
func (s *URLTest) InterfaceUpdated() {
|
||||
go s.group.CheckOutbounds(true)
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
type URLTestGroup struct {
|
||||
|
||||
@@ -123,11 +123,11 @@ func (h *VLESS) NewPacketConnection(ctx context.Context, conn N.PacketConn, meta
|
||||
return NewPacketConnection(ctx, h, conn, metadata)
|
||||
}
|
||||
|
||||
func (h *VLESS) InterfaceUpdated() error {
|
||||
func (h *VLESS) InterfaceUpdated() {
|
||||
if h.multiplexDialer != nil {
|
||||
h.multiplexDialer.Reset()
|
||||
}
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
func (h *VLESS) Close() error {
|
||||
|
||||
@@ -98,11 +98,11 @@ func NewVMess(ctx context.Context, router adapter.Router, logger log.ContextLogg
|
||||
return outbound, nil
|
||||
}
|
||||
|
||||
func (h *VMess) InterfaceUpdated() error {
|
||||
func (h *VMess) InterfaceUpdated() {
|
||||
if h.multiplexDialer != nil {
|
||||
h.multiplexDialer.Reset()
|
||||
}
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
func (h *VMess) Close() error {
|
||||
|
||||
@@ -186,9 +186,9 @@ func NewWireGuard(ctx context.Context, router adapter.Router, logger log.Context
|
||||
return outbound, nil
|
||||
}
|
||||
|
||||
func (w *WireGuard) InterfaceUpdated() error {
|
||||
func (w *WireGuard) InterfaceUpdated() {
|
||||
w.bind.Reset()
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
func (w *WireGuard) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) {
|
||||
|
||||
Reference in New Issue
Block a user