Skip to content

Commit

Permalink
fix/chore: update submodule outbound to fix panic in some edge cases (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 authored Apr 23, 2024
1 parent b5ebd4f commit f26ac49
Show file tree
Hide file tree
Showing 29 changed files with 55 additions and 59 deletions.
6 changes: 3 additions & 3 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion common/bitlist/bitlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions common/netutils/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion common/netutils/ip46.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion common/netutils/ip46_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

"github.com/daeuniverse/softwind/protocol/direct"
"github.com/daeuniverse/outbound/protocol/direct"
)

func TestResolveIp46(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion component/dns/upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion component/outbound/dialer/alive_dialer_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion component/outbound/dialer/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions component/outbound/dialer/connectivity_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion component/outbound/dialer/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion component/outbound/dialer/direct.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion component/outbound/dialer/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion component/outbound/dialer_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion component/outbound/dialer_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
12 changes: 6 additions & 6 deletions component/outbound/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
2 changes: 1 addition & 1 deletion component/sniffing/internal/quicutils/cipher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
5 changes: 3 additions & 2 deletions component/sniffing/internal/quicutils/hkdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion component/sniffing/quic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions component/sniffing/sniffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions component/sniffing/sniffing_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
8 changes: 4 additions & 4 deletions control/control_plane.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions control/dns_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions control/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion control/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions control/udp_endpoint_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 3 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion pkg/trie/trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
Expand Down

0 comments on commit f26ac49

Please sign in to comment.