fix/chore: update submodule outbound to fix panic in some edge cases (#503)

This commit is contained in:
mzz 2024-04-24 02:22:50 +08:00 committed by GitHub
parent b5ebd4f8cb
commit f26ac49d9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 55 additions and 59 deletions

View File

@ -20,9 +20,9 @@ import (
"syscall"
"time"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pkg/fastrand"
"github.com/daeuniverse/softwind/protocol/direct"
"github.com/daeuniverse/outbound/netproxy"
"github.com/daeuniverse/outbound/pkg/fastrand"
"github.com/daeuniverse/outbound/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/daeuniverse/softwind/common"
"github.com/daeuniverse/outbound/common"
)
// CompactBitList allows your units to be of arbitrary bit size.

View File

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

View File

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

View File

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

View File

@ -22,7 +22,7 @@ import (
"time"
"unsafe"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/outbound/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/daeuniverse/softwind/protocol/direct"
"github.com/daeuniverse/outbound/protocol/direct"
)
var (

View File

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

View File

@ -7,7 +7,7 @@ package dialer
import (
D "github.com/daeuniverse/outbound/dialer"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/outbound/netproxy"
)
func NewBlockDialer(option *GlobalOption, dialCallback func()) (netproxy.Dialer, *Property) {

View File

@ -24,10 +24,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/pool"
"github.com/daeuniverse/softwind/protocol/direct"
"github.com/daeuniverse/outbound/netproxy"
"github.com/daeuniverse/outbound/pkg/fastrand"
"github.com/daeuniverse/outbound/pool"
"github.com/daeuniverse/outbound/protocol/direct"
dnsmessage "github.com/miekg/dns"
"github.com/sirupsen/logrus"
)

View File

@ -12,7 +12,7 @@ import (
"time"
D "github.com/daeuniverse/outbound/dialer"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/outbound/netproxy"
"github.com/sirupsen/logrus"
)

View File

@ -7,7 +7,7 @@ package dialer
import (
D "github.com/daeuniverse/outbound/dialer"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/outbound/netproxy"
)
func NewDirectDialer(option *GlobalOption, fullcone bool) (netproxy.Dialer, *Property) {

View File

@ -7,7 +7,7 @@ package dialer
import (
D "github.com/daeuniverse/outbound/dialer"
"github.com/daeuniverse/softwind/protocol/direct"
"github.com/daeuniverse/outbound/protocol/direct"
)
func NewFromLink(gOption *GlobalOption, iOption InstanceOption, link string, subscriptionTag string) (*Dialer, error) {

View File

@ -13,7 +13,7 @@ import (
"github.com/daeuniverse/dae/common/consts"
"github.com/daeuniverse/dae/component/outbound/dialer"
_ "github.com/daeuniverse/outbound/dialer"
"github.com/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/outbound/netproxy"
"github.com/sirupsen/logrus"
)

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/daeuniverse/softwind/pkg/fastrand"
"github.com/daeuniverse/outbound/pkg/fastrand"
)
const (

View File

@ -14,13 +14,13 @@ import (
_ "github.com/daeuniverse/outbound/dialer/trojan"
_ "github.com/daeuniverse/outbound/dialer/tuic"
_ "github.com/daeuniverse/outbound/dialer/v2ray"
_ "github.com/daeuniverse/outbound/protocol/juicity"
_ "github.com/daeuniverse/outbound/protocol/shadowsocks"
_ "github.com/daeuniverse/outbound/protocol/trojanc"
_ "github.com/daeuniverse/outbound/protocol/tuic"
_ "github.com/daeuniverse/outbound/protocol/vless"
_ "github.com/daeuniverse/outbound/protocol/vmess"
_ "github.com/daeuniverse/outbound/transport/simpleobfs"
_ "github.com/daeuniverse/outbound/transport/tls"
_ "github.com/daeuniverse/outbound/transport/ws"
_ "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

@ -13,7 +13,7 @@ import (
"io"
"github.com/daeuniverse/dae/common"
"github.com/daeuniverse/softwind/pool"
"github.com/daeuniverse/outbound/pool"
"golang.org/x/crypto/hkdf"
)

View File

@ -9,10 +9,11 @@ package quicutils
import (
"encoding/binary"
"github.com/daeuniverse/softwind/pool"
"golang.org/x/crypto/hkdf"
"hash"
"io"
"github.com/daeuniverse/outbound/pool"
"golang.org/x/crypto/hkdf"
)
// HkdfExpandLabelFromPool HKDF expands a label.

View File

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

View File

@ -12,8 +12,8 @@ import (
"time"
"github.com/daeuniverse/dae/component/sniffing/internal/quicutils"
"github.com/daeuniverse/softwind/pool"
"github.com/daeuniverse/softwind/pool/bytes"
"github.com/daeuniverse/outbound/pool"
"github.com/daeuniverse/outbound/pool/bytes"
)
type Sniffer struct {

View File

@ -7,10 +7,11 @@ package sniffing
import (
"fmt"
"github.com/daeuniverse/dae/common"
"testing"
"github.com/daeuniverse/softwind/pkg/fastrand"
"github.com/daeuniverse/dae/common"
"github.com/daeuniverse/outbound/pkg/fastrand"
)
var (

View File

@ -34,10 +34,10 @@ import (
"github.com/daeuniverse/dae/pkg/config_parser"
internal "github.com/daeuniverse/dae/pkg/ebpf_internal"
D "github.com/daeuniverse/outbound/dialer"
"github.com/daeuniverse/softwind/pool"
"github.com/daeuniverse/softwind/protocol/direct"
"github.com/daeuniverse/softwind/transport/grpc"
"github.com/daeuniverse/softwind/transport/meek"
"github.com/daeuniverse/outbound/pool"
"github.com/daeuniverse/outbound/protocol/direct"
"github.com/daeuniverse/outbound/transport/grpc"
"github.com/daeuniverse/outbound/transport/meek"
dnsmessage "github.com/miekg/dns"
"github.com/mohae/deepcopy"
"github.com/sirupsen/logrus"

View File

@ -25,9 +25,9 @@ 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"
"github.com/daeuniverse/outbound/netproxy"
"github.com/daeuniverse/outbound/pkg/fastrand"
"github.com/daeuniverse/outbound/pool"
dnsmessage "github.com/miekg/dns"
"github.com/mohae/deepcopy"
"github.com/sirupsen/logrus"

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/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pkg/zeroalloc/io"
"github.com/daeuniverse/outbound/netproxy"
"github.com/daeuniverse/outbound/pkg/zeroalloc/io"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)

View File

@ -16,7 +16,7 @@ import (
ob "github.com/daeuniverse/dae/component/outbound"
"github.com/daeuniverse/dae/component/outbound/dialer"
"github.com/daeuniverse/dae/component/sniffing"
"github.com/daeuniverse/softwind/pool"
"github.com/daeuniverse/outbound/pool"
dnsmessage "github.com/miekg/dns"
"github.com/sirupsen/logrus"
)

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/daeuniverse/softwind/netproxy"
"github.com/daeuniverse/softwind/pool"
"github.com/daeuniverse/outbound/netproxy"
"github.com/daeuniverse/outbound/pool"
)
type UdpHandler func(data []byte, from netip.AddrPort) error

5
go.mod
View File

@ -10,8 +10,7 @@ require (
github.com/bits-and-blooms/bloom/v3 v3.5.0
github.com/cilium/ebpf v0.12.3
github.com/daeuniverse/dae-config-dist/go/dae_config v0.0.0-20230604120805-1c27619b592d
github.com/daeuniverse/outbound v0.0.0-20240413032918-078e65ce9409
github.com/daeuniverse/softwind v0.0.0-20240413031314-0049ada6ee9d
github.com/daeuniverse/outbound v0.0.0-20240423150318-97fdbb427e02
github.com/fsnotify/fsnotify v1.7.0
github.com/json-iterator/go v1.1.12
github.com/miekg/dns v1.1.55
@ -74,8 +73,6 @@ require (
google.golang.org/grpc v1.57.0 // indirect
)
// replace github.com/daeuniverse/softwind => ../softwind
// replace github.com/daeuniverse/outbound => ../outbound
// replace github.com/daeuniverse/quic-go => ../quic-go

9
go.sum
View File

@ -15,12 +15,10 @@ github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBS
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/outbound v0.0.0-20240413032918-078e65ce9409 h1:A08H+3cGMreCiAYGq965rP2XoKXgvPKoR9I09/lDW7s=
github.com/daeuniverse/outbound v0.0.0-20240413032918-078e65ce9409/go.mod h1:+incQmNwLG/JkkBymqMz/SnxRGWcSCSjy80CAjVj4v0=
github.com/daeuniverse/outbound v0.0.0-20240423150318-97fdbb427e02 h1:RvfDfy4c67zHoHos8OyxrpzUqGjnBf/EyfLt3AXehEg=
github.com/daeuniverse/outbound v0.0.0-20240423150318-97fdbb427e02/go.mod h1:UDGbEWJWcLVHanbq6NCK9kszBCBcIbrF4FT8v+XcU/I=
github.com/daeuniverse/quic-go v0.0.0-20240413031024-943f218e0810 h1:YtEYouFaNrg9sV9vf3UabvKShKn6sD0QaCdOxCwaF3g=
github.com/daeuniverse/quic-go v0.0.0-20240413031024-943f218e0810/go.mod h1:61o2uZUGLrlv1i+oO2rx9sVX0vbf8cHzdSHt7h6lMnM=
github.com/daeuniverse/softwind v0.0.0-20240413031314-0049ada6ee9d h1:1Tj48+Vv5W4XIyG0X2JWzzRBo13ll6csThKzFGCbT1o=
github.com/daeuniverse/softwind v0.0.0-20240413031314-0049ada6ee9d/go.mod h1:xhBh5EiYniZRA0qRRy0PvjRd1TeHMXR8M6k0beD7sv4=
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=
@ -139,9 +137,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg=
github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
github.com/v2rayA/ahocorasick-domain v0.0.0-20231231085011-99ceb8ef3208 h1:s/K1ome/+rTDictkqGhqLuAleUymyWnvgNWARjblS9U=

View File

@ -16,7 +16,7 @@ import (
"github.com/daeuniverse/dae/common"
"github.com/daeuniverse/dae/common/bitlist"
"github.com/daeuniverse/softwind/pool"
"github.com/daeuniverse/outbound/pool"
)
var ValidCidrChars = NewValidChars([]byte{'0', '1'})