mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 18:08:14 -05:00
fix bug
This commit is contained in:
parent
7952d219df
commit
5cf0d7c783
@ -60,8 +60,10 @@ type VAllssNode struct {
|
|||||||
CommonNode
|
CommonNode
|
||||||
Tls int `json:"tls"`
|
Tls int `json:"tls"`
|
||||||
TlsSettings TlsSettings `json:"tls_settings"`
|
TlsSettings TlsSettings `json:"tls_settings"`
|
||||||
|
TlsSettingsBack *TlsSettings `json:"tlsSettings"`
|
||||||
Network string `json:"network"`
|
Network string `json:"network"`
|
||||||
NetworkSettings json.RawMessage `json:"network_settings"`
|
NetworkSettings json.RawMessage `json:"network_settings"`
|
||||||
|
NetworkSettingsBack json.RawMessage `json:"networkSettings"`
|
||||||
ServerName string `json:"server_name"`
|
ServerName string `json:"server_name"`
|
||||||
|
|
||||||
// vless only
|
// vless only
|
||||||
@ -137,6 +139,14 @@ func (c *Client) GetNodeInfo() (node *NodeInfo, err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("decode v2ray params error: %s", err)
|
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
|
cm = &rsp.CommonNode
|
||||||
node.VAllss = rsp
|
node.VAllss = rsp
|
||||||
node.Security = node.VAllss.Tls
|
node.Security = node.VAllss.Tls
|
||||||
|
@ -27,8 +27,10 @@ func buildInbound(option *conf.Options, nodeInfo *panel.NodeInfo, tag string) (*
|
|||||||
network = nodeInfo.VAllss.Network
|
network = nodeInfo.VAllss.Network
|
||||||
case "trojan":
|
case "trojan":
|
||||||
err = buildTrojan(option, in)
|
err = buildTrojan(option, in)
|
||||||
|
network = "tcp"
|
||||||
case "shadowsocks":
|
case "shadowsocks":
|
||||||
err = buildShadowsocks(option, nodeInfo, in)
|
err = buildShadowsocks(option, nodeInfo, in)
|
||||||
|
network = "tcp"
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unsupported node type: %s, Only support: V2ray, Trojan, Shadowsocks", nodeInfo.Type)
|
return nil, fmt.Errorf("unsupported node type: %s, Only support: V2ray, Trojan, Shadowsocks", nodeInfo.Type)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user