feat: add certificate and private-key to vmess listener

This commit is contained in:
wwqgtxx
2023-10-07 17:08:54 +08:00
parent 791ecfbb32
commit d8fe7a52d6
4 changed files with 32 additions and 10 deletions

View File

@ -9,8 +9,10 @@ import (
type VmessOption struct {
BaseOption
Users []VmessUser `inbound:"users"`
WsPath string `inbound:"ws-path,omitempty"`
Users []VmessUser `inbound:"users"`
WsPath string `inbound:"ws-path,omitempty"`
Certificate string `inbound:"certificate,omitempty"`
PrivateKey string `inbound:"private-key,omitempty"`
}
type VmessUser struct {
@ -47,10 +49,12 @@ func NewVmess(options *VmessOption) (*Vmess, error) {
Base: base,
config: options,
vs: LC.VmessServer{
Enable: true,
Listen: base.RawAddress(),
Users: users,
WsPath: options.WsPath,
Enable: true,
Listen: base.RawAddress(),
Users: users,
WsPath: options.WsPath,
Certificate: options.Certificate,
PrivateKey: options.PrivateKey,
},
}, nil
}