1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-01 11:35:23 +00:00

fix: VLESS simplified config inbound user account

This commit is contained in:
秋のかえで 2021-09-08 23:18:53 +08:00 committed by Shelikhoo
parent 33a42e05da
commit a8ff0a6371
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
3 changed files with 7 additions and 15 deletions

View File

@ -54,17 +54,10 @@ func init() {
} }
return return
}(), }(),
Decryption: "none",
} }
var dc dns.Client return common.CreateObject(ctx, fullConfig)
if err := core.RequireFeatures(ctx, func(d dns.Client) error {
dc = d
return nil
}); err != nil {
return nil, err
}
return New(ctx, fullConfig, dc)
})) }))
} }

View File

@ -17,9 +17,8 @@ import (
"github.com/v2fly/v2ray-core/v4/common/signal" "github.com/v2fly/v2ray-core/v4/common/signal"
"github.com/v2fly/v2ray-core/v4/common/task" "github.com/v2fly/v2ray-core/v4/common/task"
"github.com/v2fly/v2ray-core/v4/features/policy" "github.com/v2fly/v2ray-core/v4/features/policy"
"github.com/v2fly/v2ray-core/v4/proxy/vless" "github.com/v2fly/v2ray-core/v4/protocol/vless"
"github.com/v2fly/v2ray-core/v4/proxy/vless/encoding" "github.com/v2fly/v2ray-core/v4/protocol/vless/encoding"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/transport" "github.com/v2fly/v2ray-core/v4/transport"
"github.com/v2fly/v2ray-core/v4/transport/internet" "github.com/v2fly/v2ray-core/v4/transport/internet"
) )
@ -37,13 +36,13 @@ func init() {
Port: simplifiedClient.Port, Port: simplifiedClient.Port,
User: []*protocol.User{ User: []*protocol.User{
{ {
Account: serial.ToTypedMessage(&vmess.Account{Id: simplifiedClient.Uuid}), Account: serial.ToTypedMessage(&vless.Account{Id: simplifiedClient.Uuid, Encryption: "none"}),
}, },
}, },
}, },
}} }}
return New(ctx, fullClient) return common.CreateObject(ctx, fullClient)
})) }))
} }