mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 09:58:14 -05:00
fix bug
This commit is contained in:
parent
7952d219df
commit
5cf0d7c783
@ -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
|
||||
|
@ -27,8 +27,10 @@ func buildInbound(option *conf.Options, nodeInfo *panel.NodeInfo, tag string) (*
|
||||
network = nodeInfo.VAllss.Network
|
||||
case "trojan":
|
||||
err = buildTrojan(option, in)
|
||||
network = "tcp"
|
||||
case "shadowsocks":
|
||||
err = buildShadowsocks(option, nodeInfo, in)
|
||||
network = "tcp"
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported node type: %s, Only support: V2ray, Trojan, Shadowsocks", nodeInfo.Type)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user