mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-08-07 06:15:15 +03:00
Fix tailscale DNS transport missing DNS-only netmap updates
This commit is contained in:
2
go.mod
2
go.mod
@@ -42,7 +42,7 @@ require (
|
|||||||
github.com/sagernet/sing-tun v0.8.12-0.20260727151122-3a09076491df
|
github.com/sagernet/sing-tun v0.8.12-0.20260727151122-3a09076491df
|
||||||
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1
|
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1
|
||||||
github.com/sagernet/smux v1.5.50-sing-box-mod.1
|
github.com/sagernet/smux v1.5.50-sing-box-mod.1
|
||||||
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.7
|
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.8
|
||||||
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20260224074747-506b7631853c
|
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20260224074747-506b7631853c
|
||||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854
|
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854
|
||||||
github.com/spf13/cobra v1.10.2
|
github.com/spf13/cobra v1.10.2
|
||||||
|
|||||||
4
go.sum
4
go.sum
@@ -254,8 +254,8 @@ github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1 h1:aSwUNYUkV
|
|||||||
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1/go.mod h1:P11scgTxMxVVQ8dlM27yNm3Cro40mD0+gHbnqrNGDuY=
|
github.com/sagernet/sing-vmess v0.2.8-0.20250909125414-3aed155119a1/go.mod h1:P11scgTxMxVVQ8dlM27yNm3Cro40mD0+gHbnqrNGDuY=
|
||||||
github.com/sagernet/smux v1.5.50-sing-box-mod.1 h1:XkJcivBC9V4wBjiGXIXZ229aZCU1hzcbp6kSkkyQ478=
|
github.com/sagernet/smux v1.5.50-sing-box-mod.1 h1:XkJcivBC9V4wBjiGXIXZ229aZCU1hzcbp6kSkkyQ478=
|
||||||
github.com/sagernet/smux v1.5.50-sing-box-mod.1/go.mod h1:NjhsCEWedJm7eFLyhuBgIEzwfhRmytrUoiLluxs5Sk8=
|
github.com/sagernet/smux v1.5.50-sing-box-mod.1/go.mod h1:NjhsCEWedJm7eFLyhuBgIEzwfhRmytrUoiLluxs5Sk8=
|
||||||
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.7 h1:8zc1Aph1+ElqF9/7aSPkO0o4vTd+AfQC+CO324mLWGg=
|
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.8 h1:vchb9moOQIxPVOLpTUo2iyZ2E2oUaBpvAh3bBPcEqIM=
|
||||||
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.7/go.mod h1:m87GAn4UcesHQF3leaPFEINZETO5za1LGn1GJdNDgNc=
|
github.com/sagernet/tailscale v1.92.4-sing-box-1.13-mod.8/go.mod h1:m87GAn4UcesHQF3leaPFEINZETO5za1LGn1GJdNDgNc=
|
||||||
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20260224074747-506b7631853c h1:f9cXNB+IOOPnR8DOLMTpr42jf7naxh5Un5Y09BBf5Cg=
|
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20260224074747-506b7631853c h1:f9cXNB+IOOPnR8DOLMTpr42jf7naxh5Un5Y09BBf5Cg=
|
||||||
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20260224074747-506b7631853c/go.mod h1:WUxgxUDZoCF2sxVmW+STSxatP02Qn3FcafTiI2BLtE0=
|
github.com/sagernet/wireguard-go v0.0.2-beta.1.0.20260224074747-506b7631853c/go.mod h1:WUxgxUDZoCF2sxVmW+STSxatP02Qn3FcafTiI2BLtE0=
|
||||||
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 h1:6uUiZcDRnZSAegryaUGwPC/Fj13JSHwiTftrXhMmYOc=
|
github.com/sagernet/ws v0.0.0-20231204124109-acfe8907c854 h1:6uUiZcDRnZSAegryaUGwPC/Fj13JSHwiTftrXhMmYOc=
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ type Endpoint struct {
|
|||||||
onReconfigHook wgengine.ReconfigListener
|
onReconfigHook wgengine.ReconfigListener
|
||||||
|
|
||||||
cfg *wgcfg.Config
|
cfg *wgcfg.Config
|
||||||
|
routerCfg *router.Config
|
||||||
dnsCfg *tsDNS.Config
|
dnsCfg *tsDNS.Config
|
||||||
routeDomains common.TypedValue[map[string]bool]
|
routeDomains common.TypedValue[map[string]bool]
|
||||||
routePrefixes atomic.Pointer[netipx.IPSet]
|
routePrefixes atomic.Pointer[netipx.IPSet]
|
||||||
@@ -799,7 +800,9 @@ func (t *Endpoint) onReconfig(cfg *wgcfg.Config, routerCfg *router.Config, dnsCf
|
|||||||
if cfg == nil || dnsCfg == nil {
|
if cfg == nil || dnsCfg == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (t.cfg != nil && reflect.DeepEqual(t.cfg, cfg)) && (t.dnsCfg != nil && reflect.DeepEqual(t.dnsCfg, dnsCfg)) {
|
if t.cfg != nil && reflect.DeepEqual(t.cfg, cfg) &&
|
||||||
|
t.routerCfg != nil && reflect.DeepEqual(t.routerCfg, routerCfg) &&
|
||||||
|
t.dnsCfg != nil && reflect.DeepEqual(t.dnsCfg, dnsCfg) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var inet4Address, inet6Address netip.Addr
|
var inet4Address, inet6Address netip.Addr
|
||||||
@@ -812,6 +815,7 @@ func (t *Endpoint) onReconfig(cfg *wgcfg.Config, routerCfg *router.Config, dnsCf
|
|||||||
}
|
}
|
||||||
t.icmpForwarder.SetLocalAddresses(inet4Address, inet6Address)
|
t.icmpForwarder.SetLocalAddresses(inet4Address, inet6Address)
|
||||||
t.cfg = cfg
|
t.cfg = cfg
|
||||||
|
t.routerCfg = routerCfg
|
||||||
t.dnsCfg = dnsCfg
|
t.dnsCfg = dnsCfg
|
||||||
|
|
||||||
routeDomains := make(map[string]bool)
|
routeDomains := make(map[string]bool)
|
||||||
|
|||||||
Reference in New Issue
Block a user