From e5a2dbd9b5ec4bdb9449ebf596521db22f3fd86c Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Tue, 14 Mar 2023 21:18:09 +0800 Subject: [PATCH] Chore: update uuid to v5 --- constant/context.go | 2 +- context/conn.go | 2 +- context/dns.go | 2 +- context/packetconn.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- test/go.mod | 2 +- test/go.sum | 4 ++-- transport/vmess/user.go | 2 +- transport/vmess/vmess.go | 2 +- tunnel/statistic/tracker.go | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/constant/context.go b/constant/context.go index e641ed1..a2c77c9 100644 --- a/constant/context.go +++ b/constant/context.go @@ -3,7 +3,7 @@ package constant import ( "net" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" ) type PlainContext interface { diff --git a/context/conn.go b/context/conn.go index ee0f3a9..46cb68a 100644 --- a/context/conn.go +++ b/context/conn.go @@ -5,7 +5,7 @@ import ( C "github.com/Dreamacro/clash/constant" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" ) type ConnContext struct { diff --git a/context/dns.go b/context/dns.go index 0be4a1f..68babce 100644 --- a/context/dns.go +++ b/context/dns.go @@ -1,7 +1,7 @@ package context import ( - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" "github.com/miekg/dns" ) diff --git a/context/packetconn.go b/context/packetconn.go index 3b00514..571977a 100644 --- a/context/packetconn.go +++ b/context/packetconn.go @@ -5,7 +5,7 @@ import ( C "github.com/Dreamacro/clash/constant" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" ) type PacketConnContext struct { diff --git a/go.mod b/go.mod index 5d7122b..16be599 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ 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/gorilla/websocket v1.5.0 github.com/insomniacslk/dhcp v0.0.0-20230307103557-e252950ab961 github.com/mdlayher/netlink v1.7.2-0.20221213171556-9881fafed8c7 diff --git a/go.sum b/go.sum index e0ed84c..db3eacf 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,8 @@ github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4= github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58= 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/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/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= diff --git a/test/go.mod b/test/go.mod index c2175aa..8360f81 100644 --- a/test/go.mod +++ b/test/go.mod @@ -18,7 +18,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/gofrs/uuid v4.4.0+incompatible // indirect + github.com/gofrs/uuid/v5 v5.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/gorilla/websocket v1.5.0 // indirect diff --git a/test/go.sum b/test/go.sum index aed6f1e..338c765 100644 --- a/test/go.sum +++ b/test/go.sum @@ -14,8 +14,8 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= diff --git a/transport/vmess/user.go b/transport/vmess/user.go index c098389..091df0a 100644 --- a/transport/vmess/user.go +++ b/transport/vmess/user.go @@ -4,7 +4,7 @@ import ( "bytes" "crypto/md5" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" ) // ID cmdKey length diff --git a/transport/vmess/vmess.go b/transport/vmess/vmess.go index 3caab9f..331a0a8 100644 --- a/transport/vmess/vmess.go +++ b/transport/vmess/vmess.go @@ -6,7 +6,7 @@ import ( "net" "runtime" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" ) // Version of vmess diff --git a/tunnel/statistic/tracker.go b/tunnel/statistic/tracker.go index 1f5f1f9..3a7ccf6 100644 --- a/tunnel/statistic/tracker.go +++ b/tunnel/statistic/tracker.go @@ -6,7 +6,7 @@ import ( C "github.com/Dreamacro/clash/constant" - "github.com/gofrs/uuid" + "github.com/gofrs/uuid/v5" "go.uber.org/atomic" )