From ddf747006e3ab6171fca629a51b407234048f3cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 9 Apr 2023 15:37:06 +0800 Subject: [PATCH] Update to uuid v5 --- cmd/sing-box/cmd_generate.go | 2 +- go.mod | 1 - go.sum | 2 -- test/mux_test.go | 2 +- test/v2ray_grpc_test.go | 2 +- test/v2ray_transport_test.go | 2 +- test/v2ray_ws_test.go | 2 +- test/vless_test.go | 2 +- test/vmess_test.go | 2 +- transport/vless/client.go | 2 +- transport/vless/service.go | 2 +- 11 files changed, 9 insertions(+), 12 deletions(-) diff --git a/cmd/sing-box/cmd_generate.go b/cmd/sing-box/cmd_generate.go index fdadab77..cf00d58a 100644 --- a/cmd/sing-box/cmd_generate.go +++ b/cmd/sing-box/cmd_generate.go @@ -9,7 +9,7 @@ import ( "github.com/sagernet/sing-box/log" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" "github.com/spf13/cobra" "golang.zx2c4.com/wireguard/wgctrl/wgtypes" ) diff --git a/go.mod b/go.mod index 9c3c6a4c..af715d31 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/go-chi/chi/v5 v5.0.8 github.com/go-chi/cors v1.2.1 github.com/go-chi/render v1.0.2 - github.com/gofrs/uuid v4.4.0+incompatible github.com/gofrs/uuid/v5 v5.0.0 github.com/hashicorp/yamux v0.1.1 github.com/insomniacslk/dhcp v0.0.0-20230407062729-974c6f05fe16 diff --git a/go.sum b/go.sum index 8a4993a2..c5e46201 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,6 @@ github.com/go-chi/render v1.0.2 h1:4ER/udB0+fMWB2Jlf15RV3F4A2FDuYi/9f+lFttR/Lg= github.com/go-chi/render v1.0.2/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M= github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= diff --git a/test/mux_test.go b/test/mux_test.go index 2deceb58..32e32b76 100644 --- a/test/mux_test.go +++ b/test/mux_test.go @@ -9,7 +9,7 @@ import ( "github.com/sagernet/sing-box/option" "github.com/sagernet/sing-shadowsocks/shadowaead_2022" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" ) var muxProtocols = []mux.Protocol{ diff --git a/test/v2ray_grpc_test.go b/test/v2ray_grpc_test.go index e4c5e49b..dc87df77 100644 --- a/test/v2ray_grpc_test.go +++ b/test/v2ray_grpc_test.go @@ -8,7 +8,7 @@ import ( C "github.com/sagernet/sing-box/constant" "github.com/sagernet/sing-box/option" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" "github.com/spyzhov/ajson" "github.com/stretchr/testify/require" ) diff --git a/test/v2ray_transport_test.go b/test/v2ray_transport_test.go index 2beeec8b..124e4184 100644 --- a/test/v2ray_transport_test.go +++ b/test/v2ray_transport_test.go @@ -7,7 +7,7 @@ import ( C "github.com/sagernet/sing-box/constant" "github.com/sagernet/sing-box/option" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" "github.com/stretchr/testify/require" ) diff --git a/test/v2ray_ws_test.go b/test/v2ray_ws_test.go index c59444a3..980b4b4f 100644 --- a/test/v2ray_ws_test.go +++ b/test/v2ray_ws_test.go @@ -8,7 +8,7 @@ import ( C "github.com/sagernet/sing-box/constant" "github.com/sagernet/sing-box/option" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" "github.com/spyzhov/ajson" "github.com/stretchr/testify/require" ) diff --git a/test/vless_test.go b/test/vless_test.go index 69380d62..a5f38052 100644 --- a/test/vless_test.go +++ b/test/vless_test.go @@ -9,7 +9,7 @@ import ( "github.com/sagernet/sing-box/option" "github.com/sagernet/sing-box/transport/vless" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" "github.com/spyzhov/ajson" "github.com/stretchr/testify/require" ) diff --git a/test/vmess_test.go b/test/vmess_test.go index add05e76..d510c19a 100644 --- a/test/vmess_test.go +++ b/test/vmess_test.go @@ -8,7 +8,7 @@ import ( C "github.com/sagernet/sing-box/constant" "github.com/sagernet/sing-box/option" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" "github.com/spyzhov/ajson" "github.com/stretchr/testify/require" ) diff --git a/transport/vless/client.go b/transport/vless/client.go index dd499624..76b4ffb1 100644 --- a/transport/vless/client.go +++ b/transport/vless/client.go @@ -13,7 +13,7 @@ import ( M "github.com/sagernet/sing/common/metadata" N "github.com/sagernet/sing/common/network" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" ) type Client struct { diff --git a/transport/vless/service.go b/transport/vless/service.go index 4a00db47..e31f0ae9 100644 --- a/transport/vless/service.go +++ b/transport/vless/service.go @@ -15,7 +15,7 @@ import ( M "github.com/sagernet/sing/common/metadata" N "github.com/sagernet/sing/common/network" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" ) type Service[T comparable] struct {