mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
fix bug
This commit is contained in:
@@ -58,11 +58,13 @@ type BaseConfig struct {
|
||||
// VAllssNode is vmess and vless node info
|
||||
type VAllssNode struct {
|
||||
CommonNode
|
||||
Tls int `json:"tls"`
|
||||
TlsSettings TlsSettings `json:"tls_settings"`
|
||||
Network string `json:"network"`
|
||||
NetworkSettings json.RawMessage `json:"network_settings"`
|
||||
ServerName string `json:"server_name"`
|
||||
Tls int `json:"tls"`
|
||||
TlsSettings TlsSettings `json:"tls_settings"`
|
||||
TlsSettingsBack *TlsSettings `json:"tlsSettings"`
|
||||
Network string `json:"network"`
|
||||
NetworkSettings json.RawMessage `json:"network_settings"`
|
||||
NetworkSettingsBack json.RawMessage `json:"networkSettings"`
|
||||
ServerName string `json:"server_name"`
|
||||
|
||||
// vless only
|
||||
Flow string `json:"flow"`
|
||||
@@ -137,6 +139,14 @@ func (c *Client) GetNodeInfo() (node *NodeInfo, err error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("decode v2ray params error: %s", err)
|
||||
}
|
||||
if len(rsp.NetworkSettingsBack) > 0 {
|
||||
rsp.NetworkSettings = rsp.NetworkSettingsBack
|
||||
rsp.NetworkSettingsBack = nil
|
||||
}
|
||||
if rsp.TlsSettingsBack != nil {
|
||||
rsp.TlsSettings = *rsp.TlsSettingsBack
|
||||
rsp.TlsSettingsBack = nil
|
||||
}
|
||||
cm = &rsp.CommonNode
|
||||
node.VAllss = rsp
|
||||
node.Security = node.VAllss.Tls
|
||||
|
||||
Reference in New Issue
Block a user