mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-08 14:13:22 +00:00
Use internal uuid package instead of external google/uuid
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
1
go.mod
1
go.mod
@@ -8,7 +8,6 @@ require (
|
||||
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344
|
||||
github.com/golang/mock v1.7.0-rc.1
|
||||
github.com/google/go-cmp v0.7.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/gorilla/websocket v1.5.3
|
||||
github.com/miekg/dns v1.1.72
|
||||
github.com/pelletier/go-toml v1.9.5
|
||||
|
||||
@@ -12,11 +12,11 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/errors"
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
"github.com/xtls/xray-core/common/signal/done"
|
||||
"github.com/xtls/xray-core/common/uuid"
|
||||
"github.com/xtls/xray-core/transport/internet"
|
||||
"github.com/xtls/xray-core/transport/internet/stat"
|
||||
)
|
||||
@@ -148,7 +148,7 @@ func ParseFileName(name string) (sessionID string, direction string, seq int64,
|
||||
sessionID = strings.Join(parts[:5], "-")
|
||||
|
||||
// Validate it's a UUID
|
||||
if _, err := uuid.Parse(sessionID); err != nil {
|
||||
if _, err := uuid.ParseString(sessionID); err != nil {
|
||||
return "", "", 0, false
|
||||
}
|
||||
|
||||
@@ -397,7 +397,8 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
|
||||
}
|
||||
|
||||
// Generate a new session ID for this connection
|
||||
sessionID := uuid.New().String()
|
||||
newUUID := uuid.New()
|
||||
sessionID := newUUID.String()
|
||||
|
||||
errors.LogInfo(ctx, fmt.Sprintf("XDRIVE client dialing with session %s to folder %s", sessionID, config.RemoteFolder))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user