mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
socks5: fixed a bug in target getting
This commit is contained in:
1 parent
88f09b30bc
commit
93728c6378
5 files changed
+22
-23
No files matched your search
@@ -97,10 +97,10 @@ func NewClient(uuidStr, security string, alterID int) (*Client, error) {
|
||||
case "none":
|
||||
c.security = SecurityNone
|
||||
case "":
|
||||
c.security = SecurityChacha20Poly1305
|
||||
if runtime.GOARCH == "amd64" || runtime.GOARCH == "s390x" || runtime.GOARCH == "arm64" {
|
||||
c.security = SecurityAES128GCM
|
||||
}
|
||||
c.security = SecurityChacha20Poly1305
|
||||
default:
|
||||
return nil, errors.New("unknown security type: " + security)
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ func NewVMess(s string, d proxy.Dialer) (*VMess, error) {
|
||||
query := u.Query()
|
||||
aid := query.Get("alterID")
|
||||
if aid == "" {
|
||||
aid = "0"
|
||||
aid = "1"
|
||||
}
|
||||
|
||||
alterID, err := strconv.ParseUint(aid, 10, 32)
|
||||
|
||||
Reference in new issue
Block a user