fix: bad ipversion selection caused by #251 (#257)

* fix: bad ipversion selection caused by #251

* chore: upgrade softwind
This commit is contained in:
mzz 2023-08-05 18:18:21 +08:00 committed by GitHub
parent 4d615205c0
commit a6382423a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 110 additions and 93 deletions

View File

@ -15,9 +15,9 @@ import (
"syscall"
"time"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/mzz2017/softwind/protocol/direct"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pkg/fastrand"
"github.com/daeuniverse/softwind/protocol/direct"
"gopkg.in/natefinch/lumberjack.v2"
"github.com/daeuniverse/dae/cmd/internal"

View File

@ -10,7 +10,7 @@ import (
"math/bits"
"github.com/daeuniverse/dae/pkg/anybuffer"
"github.com/mzz2017/softwind/common"
"github.com/daeuniverse/softwind/common"
)
// CompactBitList allows your units to be of arbitrary bit size.

View File

@ -16,10 +16,10 @@ import (
"time"
"github.com/daeuniverse/dae/common/consts"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pkg/fastrand"
"github.com/daeuniverse/softwind/pool"
dnsmessage "github.com/miekg/dns"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/mzz2017/softwind/pool"
)
var (

View File

@ -12,8 +12,8 @@ import (
"net/netip"
"sync"
"github.com/daeuniverse/softwind/netproxy"
dnsmessage "github.com/miekg/dns"
"github.com/mzz2017/softwind/netproxy"
"github.com/sirupsen/logrus"
)

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/mzz2017/softwind/protocol/direct"
"github.com/daeuniverse/softwind/protocol/direct"
)
func TestResolveIp46(t *testing.T) {

View File

@ -22,7 +22,7 @@ import (
"time"
"unsafe"
"github.com/mzz2017/softwind/netproxy"
"github.com/daeuniverse/softwind/netproxy"
internal "github.com/daeuniverse/dae/pkg/ebpf_internal"
dnsmessage "github.com/miekg/dns"

View File

@ -16,7 +16,7 @@ import (
"github.com/daeuniverse/dae/common/consts"
"github.com/daeuniverse/dae/common/netutils"
"github.com/mzz2017/softwind/protocol/direct"
"github.com/daeuniverse/softwind/protocol/direct"
)
var (

View File

@ -13,7 +13,7 @@ import (
"time"
"github.com/daeuniverse/dae/common/consts"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/daeuniverse/softwind/pkg/fastrand"
"github.com/sirupsen/logrus"
)

View File

@ -9,7 +9,7 @@ import (
"fmt"
"net"
"github.com/mzz2017/softwind/netproxy"
"github.com/daeuniverse/softwind/netproxy"
)
type blockDialer struct {

View File

@ -25,10 +25,10 @@ import (
"github.com/daeuniverse/dae/common/consts"
"github.com/daeuniverse/dae/common/netutils"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pkg/fastrand"
"github.com/daeuniverse/softwind/protocol/direct"
dnsmessage "github.com/miekg/dns"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/mzz2017/softwind/protocol/direct"
"github.com/sirupsen/logrus"
)
@ -96,6 +96,13 @@ func (d *Dialer) mustGetCollection(typ *NetworkType) *collection {
return d.collections[5]
}
case consts.L4ProtoStr_UDP:
// UDP share the DNS check result.
switch typ.IpVersion {
case consts.IpVersionStr_4:
return d.collections[2]
case consts.IpVersionStr_6:
return d.collections[3]
}
}
}
panic("invalid param")

View File

@ -6,7 +6,7 @@ import (
"sync"
"time"
"github.com/mzz2017/softwind/netproxy"
"github.com/daeuniverse/softwind/netproxy"
"github.com/sirupsen/logrus"
)

View File

@ -1,8 +1,8 @@
package dialer
import (
"github.com/mzz2017/softwind/netproxy"
softwindDirect "github.com/mzz2017/softwind/protocol/direct"
"github.com/daeuniverse/softwind/netproxy"
softwindDirect "github.com/daeuniverse/softwind/protocol/direct"
)
func NewDirectDialer(option *GlobalOption, fullcone bool) (netproxy.Dialer, *Property) {

View File

@ -8,8 +8,8 @@ import (
"github.com/daeuniverse/dae/common"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/protocol/http"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/protocol/http"
)
func init() {

View File

@ -12,8 +12,8 @@ import (
"github.com/daeuniverse/dae/common"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/protocol"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/protocol"
)
func init() {

View File

@ -11,8 +11,8 @@ import (
"strings"
"github.com/daeuniverse/dae/common"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/protocol/direct"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/protocol/direct"
)
type FromLinkCreator func(gOption *GlobalOption, nextDialer netproxy.Dialer, link string) (dialer netproxy.Dialer, property *Property, err error)

View File

@ -11,9 +11,9 @@ import (
"github.com/daeuniverse/dae/common"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/dae/component/outbound/transport/simpleobfs"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/protocol"
"github.com/mzz2017/softwind/protocol/shadowsocks"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/protocol"
"github.com/daeuniverse/softwind/protocol/shadowsocks"
)
func init() {

View File

@ -10,11 +10,11 @@ import (
"github.com/daeuniverse/dae/common"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/protocol"
"github.com/mzz2017/softwind/protocol/shadowsocks_stream"
"github.com/mzz2017/softwind/transport/shadowsocksr/obfs"
"github.com/mzz2017/softwind/transport/shadowsocksr/proto"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/protocol"
"github.com/daeuniverse/softwind/protocol/shadowsocks_stream"
"github.com/daeuniverse/softwind/transport/shadowsocksr/obfs"
"github.com/daeuniverse/softwind/transport/shadowsocksr/proto"
)
func init() {

View File

@ -8,8 +8,8 @@ import (
"strconv"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/protocol/socks5"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/protocol/socks5"
)
func init() {

View File

@ -13,8 +13,8 @@ import (
"github.com/daeuniverse/dae/common/netutils"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/softwind/protocol/direct"
dnsmessage "github.com/miekg/dns"
"github.com/mzz2017/softwind/protocol/direct"
"github.com/sirupsen/logrus"
)

View File

@ -12,9 +12,9 @@ import (
"github.com/daeuniverse/dae/common"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/dae/component/outbound/transport/ws"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/protocol"
"github.com/mzz2017/softwind/transport/grpc"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/protocol"
"github.com/daeuniverse/softwind/transport/grpc"
)
func init() {

View File

@ -10,8 +10,8 @@ import (
"github.com/daeuniverse/dae/common"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/protocol"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/protocol"
)
func init() {

View File

@ -12,12 +12,12 @@ import (
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/dae/component/outbound/transport/tls"
"github.com/daeuniverse/dae/component/outbound/transport/ws"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/protocol"
"github.com/daeuniverse/softwind/protocol/direct"
"github.com/daeuniverse/softwind/protocol/http"
"github.com/daeuniverse/softwind/transport/grpc"
jsoniter "github.com/json-iterator/go"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/protocol"
"github.com/mzz2017/softwind/protocol/direct"
"github.com/mzz2017/softwind/protocol/http"
"github.com/mzz2017/softwind/transport/grpc"
)
func init() {

View File

@ -12,7 +12,7 @@ import (
"github.com/daeuniverse/dae/common/consts"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/mzz2017/softwind/netproxy"
"github.com/daeuniverse/softwind/netproxy"
"github.com/sirupsen/logrus"
)
@ -210,6 +210,13 @@ func (d *DialerGroup) MustGetAliveDialerSet(typ *dialer.NetworkType) *dialer.Ali
return d.aliveDialerSets[5]
}
case consts.L4ProtoStr_UDP:
// UDP share the DNS check result.
switch typ.IpVersion {
case consts.IpVersionStr_4:
return d.aliveDialerSets[2]
case consts.IpVersionStr_6:
return d.aliveDialerSets[3]
}
}
}
panic("invalid param")
@ -228,10 +235,13 @@ func (g *DialerGroup) Select(networkType *dialer.NetworkType, strictIpVersion bo
}
if errors.Is(err, NoAliveDialerError) && len(g.Dialers) == 1 {
// There is only one dialer in this group. Just choose it instead of return error.
return g._select(networkType, &DialerSelectionPolicy{
if d, _, err = g._select(networkType, &DialerSelectionPolicy{
Policy: consts.DialerSelectionPolicy_Fixed,
FixedIndex: 0,
})
}); err != nil {
return nil, 0, err
}
return d, dialer.Timeout, nil
}
return nil, latency, err
}

View File

@ -12,7 +12,7 @@ import (
"github.com/daeuniverse/dae/common/consts"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/dae/pkg/logger"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/daeuniverse/softwind/pkg/fastrand"
)
const (

View File

@ -17,10 +17,10 @@ import (
_ "github.com/daeuniverse/dae/component/outbound/transport/simpleobfs"
_ "github.com/daeuniverse/dae/component/outbound/transport/tls"
_ "github.com/daeuniverse/dae/component/outbound/transport/ws"
_ "github.com/mzz2017/softwind/protocol/juicity"
_ "github.com/mzz2017/softwind/protocol/shadowsocks"
_ "github.com/mzz2017/softwind/protocol/trojanc"
_ "github.com/mzz2017/softwind/protocol/tuic"
_ "github.com/mzz2017/softwind/protocol/vless"
_ "github.com/mzz2017/softwind/protocol/vmess"
_ "github.com/daeuniverse/softwind/protocol/juicity"
_ "github.com/daeuniverse/softwind/protocol/shadowsocks"
_ "github.com/daeuniverse/softwind/protocol/trojanc"
_ "github.com/daeuniverse/softwind/protocol/tuic"
_ "github.com/daeuniverse/softwind/protocol/vless"
_ "github.com/daeuniverse/softwind/protocol/vmess"
)

View File

@ -6,9 +6,9 @@ import (
"bytes"
"encoding/base64"
"fmt"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/mzz2017/softwind/pool"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pkg/fastrand"
"github.com/daeuniverse/softwind/pool"
"io"
"net/http"
"strings"

View File

@ -7,7 +7,7 @@ import (
"strings"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/mzz2017/softwind/netproxy"
"github.com/daeuniverse/softwind/netproxy"
)
type ObfsType int

View File

@ -5,8 +5,8 @@ package simpleobfs
import (
"bytes"
"encoding/binary"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pkg/fastrand"
"io"
"sync"
"time"

View File

@ -8,7 +8,7 @@ import (
"strings"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/mzz2017/softwind/netproxy"
"github.com/daeuniverse/softwind/netproxy"
utls "github.com/refraction-networking/utls"
)

View File

@ -10,8 +10,8 @@ import (
"strings"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/softwind/netproxy"
"github.com/gorilla/websocket"
"github.com/mzz2017/softwind/netproxy"
)
// Ws is a base Ws struct

View File

@ -11,7 +11,7 @@ import (
"crypto/sha256"
"encoding/binary"
"github.com/daeuniverse/dae/common"
"github.com/mzz2017/softwind/pool"
"github.com/daeuniverse/softwind/pool"
"golang.org/x/crypto/hkdf"
"io"
)

View File

@ -4,7 +4,7 @@ package quicutils
import (
"encoding/binary"
"github.com/mzz2017/softwind/pool"
"github.com/daeuniverse/softwind/pool"
"golang.org/x/crypto/hkdf"
"hash"
"io"

View File

@ -7,7 +7,7 @@ package quicutils
import (
"fmt"
"github.com/mzz2017/softwind/pool"
"github.com/daeuniverse/softwind/pool"
"io/fs"
"sort"
)

View File

@ -10,7 +10,7 @@ import (
"io/fs"
"github.com/daeuniverse/dae/component/sniffing/internal/quicutils"
"github.com/mzz2017/softwind/pool"
"github.com/daeuniverse/softwind/pool"
)
const (

View File

@ -10,7 +10,7 @@ import (
"github.com/daeuniverse/dae/common"
"testing"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/daeuniverse/softwind/pkg/fastrand"
)
var (

View File

@ -32,11 +32,11 @@ import (
"github.com/daeuniverse/dae/config"
"github.com/daeuniverse/dae/pkg/config_parser"
internal "github.com/daeuniverse/dae/pkg/ebpf_internal"
"github.com/daeuniverse/softwind/pool"
"github.com/daeuniverse/softwind/protocol/direct"
"github.com/daeuniverse/softwind/transport/grpc"
dnsmessage "github.com/miekg/dns"
"github.com/mohae/deepcopy"
"github.com/mzz2017/softwind/pool"
"github.com/mzz2017/softwind/protocol/direct"
"github.com/mzz2017/softwind/transport/grpc"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)

View File

@ -25,11 +25,11 @@ import (
"github.com/daeuniverse/dae/component/dns"
"github.com/daeuniverse/dae/component/outbound"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pkg/fastrand"
"github.com/daeuniverse/softwind/pool"
dnsmessage "github.com/miekg/dns"
"github.com/mohae/deepcopy"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/pkg/fastrand"
"github.com/mzz2017/softwind/pool"
"github.com/sirupsen/logrus"
)
@ -543,7 +543,7 @@ func (c *DnsController) dialSend(invokingDepth int, req *udpRequest, data []byte
networkType := &dialer.NetworkType{
L4Proto: dialArgument.l4proto,
IpVersion: dialArgument.ipversion,
IsDns: true, // UDP relies on DNS check result.
IsDns: true,
}
// Dial and send.

View File

@ -17,8 +17,8 @@ import (
"github.com/daeuniverse/dae/common/consts"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/dae/component/sniffing"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/pkg/zeroalloc/io"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pkg/zeroalloc/io"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)

View File

@ -21,8 +21,8 @@ import (
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/dae/component/sniffing"
internal "github.com/daeuniverse/dae/pkg/ebpf_internal"
"github.com/daeuniverse/softwind/pkg/zeroalloc/buffer"
dnsmessage "github.com/miekg/dns"
"github.com/mzz2017/softwind/pkg/zeroalloc/buffer"
"github.com/sirupsen/logrus"
)
@ -175,7 +175,7 @@ func (c *ControlPlane) handlePkt(lConn *net.UDPConn, data []byte, src, pktDst, r
networkType := &dialer.NetworkType{
L4Proto: consts.L4ProtoStr_UDP,
IpVersion: consts.IpVersionFromAddr(realDst.Addr()),
IsDns: true, // UDP relies on DNS check result.
IsDns: false,
}
// Get outbound.
outboundIndex := consts.OutboundIndex(routingResult.Outbound)

View File

@ -15,8 +15,8 @@ import (
"github.com/daeuniverse/dae/common/consts"
"github.com/daeuniverse/dae/component/outbound"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/mzz2017/softwind/netproxy"
"github.com/mzz2017/softwind/pool"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pool"
)
type UdpHandler func(data []byte, from netip.AddrPort) error

8
go.mod
View File

@ -8,11 +8,11 @@ require (
github.com/bits-and-blooms/bloom/v3 v3.5.0
github.com/cilium/ebpf v0.11.0
github.com/daeuniverse/dae-config-dist/go/dae_config v0.0.0-20230604120805-1c27619b592d
github.com/daeuniverse/softwind v0.0.0-20230805041143-2db4e28c8922
github.com/gorilla/websocket v1.5.0
github.com/json-iterator/go v1.1.12
github.com/miekg/dns v1.1.55
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/mzz2017/softwind v0.0.0-20230803152605-5f1f6bc06934
github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd
github.com/safchain/ethtool v0.3.0
github.com/sirupsen/logrus v1.9.3
@ -34,9 +34,9 @@ require (
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/mzz2017/quic-go v0.0.0-20230731153658-2aabc7c97220 // indirect
github.com/mzz2017/quic-go v0.0.0-20230805032040-5e9a02f54eac // indirect
github.com/onsi/ginkgo/v2 v2.11.0 // indirect
github.com/quic-go/qtls-go1-20 v0.3.0 // indirect
github.com/quic-go/qtls-go1-20 v0.3.1 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/tools v0.11.0 // indirect
@ -70,7 +70,7 @@ require (
google.golang.org/grpc v1.56.2 // indirect
)
// replace github.com/mzz2017/softwind => ../softwind
// replace github.com/daeuniverse/softwind => ../softwind
// replace github.com/metacubex/quic-go => ../quic-go

12
go.sum
View File

@ -13,6 +13,8 @@ github.com/cilium/ebpf v0.11.0/go.mod h1:WE7CZAnqOL2RouJ4f1uyNhqr2P4CCvXFIqdRDUg
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/daeuniverse/dae-config-dist/go/dae_config v0.0.0-20230604120805-1c27619b592d h1:hnC39MjR7xt5kZjrKlef7DXKFDkiX8MIcDXYC/6Jf9Q=
github.com/daeuniverse/dae-config-dist/go/dae_config v0.0.0-20230604120805-1c27619b592d/go.mod h1:VGWGgv7pCP5WGyHGUyb9+nq/gW0yBm+i/GfCNATOJ1M=
github.com/daeuniverse/softwind v0.0.0-20230805041143-2db4e28c8922 h1:TQkiCTLMY82prw7vfGqOtSCWOuX9MvnCa3g6ufvPgxg=
github.com/daeuniverse/softwind v0.0.0-20230805041143-2db4e28c8922/go.mod h1:hL69hHFjobbgKxTJ5cknnuZT1DCglxdl30uJ3dS8nco=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@ -89,10 +91,8 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/mzz2017/disk-bloom v1.0.1 h1:rEF9MiXd9qMW3ibRpqcerLXULoTgRlM21yqqJl1B90M=
github.com/mzz2017/disk-bloom v1.0.1/go.mod h1:JLHETtUu44Z6iBmsqzkOtFlRvXSlKnxjwiBRDapizDI=
github.com/mzz2017/quic-go v0.0.0-20230731153658-2aabc7c97220 h1:StI6iNucfDVrm54yhrHL0Dr1vKC1nBqkok2Itkypvdk=
github.com/mzz2017/quic-go v0.0.0-20230731153658-2aabc7c97220/go.mod h1:+8o4sdYYZCkNfMGiP3oKstpdHeSDFJy84A68evIzhw4=
github.com/mzz2017/softwind v0.0.0-20230803152605-5f1f6bc06934 h1:IAaVbSfNiYP/TuJ4n686SeAwcs+PMvKdzJM5R4Y1rhM=
github.com/mzz2017/softwind v0.0.0-20230803152605-5f1f6bc06934/go.mod h1:TopiWHnL2ty4V4AkNM1nNVdbLlASWdQqploagf4tcKc=
github.com/mzz2017/quic-go v0.0.0-20230805032040-5e9a02f54eac h1:luSUVeRYonUjk7Pxx8zViDj9Vpf42DZmfR/CbQcXKt0=
github.com/mzz2017/quic-go v0.0.0-20230805032040-5e9a02f54eac/go.mod h1:DBA25b2LoPhrfSzOPE8KcDOicysx00qvvnqe0BpA8DQ=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
@ -109,8 +109,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y
github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/quic-go/qtls-go1-20 v0.3.0 h1:NrCXmDl8BddZwO67vlvEpBTwT89bJfKYygxv4HQvuDk=
github.com/quic-go/qtls-go1-20 v0.3.0/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
github.com/quic-go/qtls-go1-20 v0.3.1 h1:O4BLOM3hwfVF3AcktIylQXyl7Yi2iBNVy5QsV+ySxbg=
github.com/quic-go/qtls-go1-20 v0.3.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k=
github.com/refraction-networking/utls v1.3.2 h1:o+AkWB57mkcoW36ET7uJ002CpBWHu0KPxi6vzxvPnv8=
github.com/refraction-networking/utls v1.3.2/go.mod h1:fmoaOww2bxzzEpIKOebIsnBvjQpqP7L2vcm/9KUfm/E=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=

View File

@ -5,7 +5,7 @@ package trie
import (
"fmt"
"github.com/mzz2017/softwind/pkg/zeroalloc/buffer"
"github.com/daeuniverse/softwind/pkg/zeroalloc/buffer"
"math/bits"
"net/netip"
"sort"