diff --git a/cmd/run.go b/cmd/run.go index bc3256f6f0..452db84fb2 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -4,9 +4,6 @@ import ( "context" "errors" "fmt" - "github.com/mzz2017/softwind/netproxy" - "github.com/mzz2017/softwind/pkg/fastrand" - "github.com/mzz2017/softwind/protocol/direct" "net" "net/http" "os" @@ -18,6 +15,10 @@ import ( "syscall" "time" + "github.com/mzz2017/softwind/netproxy" + "github.com/mzz2017/softwind/pkg/fastrand" + "github.com/mzz2017/softwind/protocol/direct" + "github.com/daeuniverse/dae/cmd/internal" "github.com/daeuniverse/dae/common" "github.com/daeuniverse/dae/common/subscription" diff --git a/control/control_plane.go b/control/control_plane.go index b23c45f659..b18568414a 100644 --- a/control/control_plane.go +++ b/control/control_plane.go @@ -35,6 +35,7 @@ import ( "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/net/dns/dnsmessage" "golang.org/x/sys/unix" @@ -262,6 +263,8 @@ func NewControlPlane( } // Filter out groups. + // FIXME: Ugly code here: reset grpc clients manually. + grpc.CleanGlobalClientConnectionCache() dialerSet := outbound.NewDialerSetFromLinks(option, tagToNodeList) deferFuncs = append(deferFuncs, dialerSet.Close) for _, group := range groups { diff --git a/go.mod b/go.mod index a5435d892d..9b23eae14c 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/gorilla/websocket v1.5.0 github.com/json-iterator/go v1.1.12 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 - github.com/mzz2017/softwind v0.0.0-20230617041556-c341d431c575 + github.com/mzz2017/softwind v0.0.0-20230618055635-5c79a9138694 github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd github.com/safchain/ethtool v0.0.0-20230116090318-67cc41908669 github.com/sirupsen/logrus v1.9.0 diff --git a/go.sum b/go.sum index b93281d9cc..3444b7748b 100644 --- a/go.sum +++ b/go.sum @@ -78,8 +78,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/softwind v0.0.0-20230617041556-c341d431c575 h1:SdmqtK60s2yi9qghZ0CyECRkXDOGhp2wvhFxISi1spU= -github.com/mzz2017/softwind v0.0.0-20230617041556-c341d431c575/go.mod h1:1hn+ZsP9fLm17yEx0jyqxHkIKm5u2gBXVGIrnKsE1fY= +github.com/mzz2017/softwind v0.0.0-20230618055635-5c79a9138694 h1:qLBM6+Xt8JxWM4gkMuBOOn9Xy1aAcQorH4vEB8ibHls= +github.com/mzz2017/softwind v0.0.0-20230618055635-5c79a9138694/go.mod h1:1hn+ZsP9fLm17yEx0jyqxHkIKm5u2gBXVGIrnKsE1fY= 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=