1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 09:50:43 +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

@ -25,7 +25,7 @@ message Config {
repeated Fallback fallbacks = 3;
}
message SimplifiedConfig{
message SimplifiedConfig {
option (v2ray.core.common.protoext.message_opt).type = "inbound";
option (v2ray.core.common.protoext.message_opt).short_name = "vless";

View File

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

View File

@ -17,9 +17,8 @@ import (
"github.com/v2fly/v2ray-core/v4/common/signal"
"github.com/v2fly/v2ray-core/v4/common/task"
"github.com/v2fly/v2ray-core/v4/features/policy"
"github.com/v2fly/v2ray-core/v4/proxy/vless"
"github.com/v2fly/v2ray-core/v4/proxy/vless/encoding"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/protocol/vless"
"github.com/v2fly/v2ray-core/v4/protocol/vless/encoding"
"github.com/v2fly/v2ray-core/v4/transport"
"github.com/v2fly/v2ray-core/v4/transport/internet"
)
@ -37,13 +36,13 @@ func init() {
Port: simplifiedClient.Port,
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)
}))
}