diff --git a/go.mod b/go.mod index 64fcd4ee..4412914b 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/sagernet/netlink v0.0.0-20260814022025-64455d367bbf github.com/sagernet/nftables v0.3.0-mod.4 github.com/sagernet/quic-go v0.61.0-sing-box-mod.13 - github.com/sagernet/sing v0.9.7-0.20261108133214-eabb991488a1 + github.com/sagernet/sing v0.9.7-0.20261109133139-696c1ba41424 github.com/sagernet/sing-cloudflared v0.1.4-0.20261108120326-83391fb7b139 github.com/sagernet/sing-mux v0.3.10-0.20261108133243-f49bcb152037 github.com/sagernet/sing-openconnect v0.1.1-0.20261108131605-6489e9ae397e diff --git a/go.sum b/go.sum index a8957299..93845383 100644 --- a/go.sum +++ b/go.sum @@ -318,8 +318,8 @@ github.com/sagernet/nftables v0.3.0-mod.4 h1:vnOtcDYeSXv2e5RoRuGH0lrpttQFJ8iC4IC github.com/sagernet/nftables v0.3.0-mod.4/go.mod h1:8kslHG4VvYNihcco+i6uxIX7qbT8A56T0y5q7U44ZaQ= github.com/sagernet/quic-go v0.61.0-sing-box-mod.13 h1:M9x7qOY/eHXqnFMS/6sVeVee174I/FFqVvjpoFpMleA= github.com/sagernet/quic-go v0.61.0-sing-box-mod.13/go.mod h1:hmLC8GJPp+BrpBgrgJnacvI4fZGIhasuy1ROJJ8GR4E= -github.com/sagernet/sing v0.9.7-0.20261108133214-eabb991488a1 h1:ROA7uhp1JD0Sz9safiwcAgjbR/i0PXGmDMjEG0iNsio= -github.com/sagernet/sing v0.9.7-0.20261108133214-eabb991488a1/go.mod h1:K3Owt3xPhHugvlnlPPxZJ/exXdaJfEPOTNorGk4AXjo= +github.com/sagernet/sing v0.9.7-0.20261109133139-696c1ba41424 h1:SWY2WZu9KeUxuCq1aD6aG7bLF1o3pjwmqRI+d1IhUTs= +github.com/sagernet/sing v0.9.7-0.20261109133139-696c1ba41424/go.mod h1:K3Owt3xPhHugvlnlPPxZJ/exXdaJfEPOTNorGk4AXjo= github.com/sagernet/sing-cloudflared v0.1.4-0.20261108120326-83391fb7b139 h1:jVPI9UHsgvNivQLcd4thzFnxxchuwwfiLyp5qhs42n4= github.com/sagernet/sing-cloudflared v0.1.4-0.20261108120326-83391fb7b139/go.mod h1:XEqEDYRCAYLaoPjZ1ifVWJg5iWAJHL2gOAXe/PM28Cg= github.com/sagernet/sing-mux v0.3.10-0.20261108133243-f49bcb152037 h1:Gvr0sA1X7ABOQf5wAUFbJzTEd3Vh4172G2wo6cw8MRc= diff --git a/protocol/direct/outbound.go b/protocol/direct/outbound.go index 19960a85..3b3d7525 100644 --- a/protocol/direct/outbound.go +++ b/protocol/direct/outbound.go @@ -125,7 +125,12 @@ func (h *Outbound) fetchMyAddresses() { continue } found = true - myAddresses = append(myAddresses, myInterface.Addresses...) + for _, prefix := range myInterface.Addresses { + if prefix.Addr().Is6() && prefix.Addr().IsLinkLocalUnicast() { + prefix = netip.PrefixFrom(prefix.Addr(), prefix.Addr().BitLen()) + } + myAddresses = append(myAddresses, prefix) + } } if !found { return