mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
fix get node info,fix trojan builder
This commit is contained in:
@@ -133,7 +133,7 @@ func (c *Controller) nodeInfoMonitor() (err error) {
|
||||
var nodeInfoChanged = false
|
||||
// If nodeInfo changed
|
||||
if newNodeInfo != nil {
|
||||
if !reflect.DeepEqual(c.nodeInfo, newNodeInfo) {
|
||||
if c.nodeInfo.SS == nil || !reflect.DeepEqual(c.nodeInfo.SS, newNodeInfo.SS) {
|
||||
// Remove old tag
|
||||
oldtag := c.Tag
|
||||
err := c.removeOldTag(oldtag)
|
||||
|
||||
@@ -65,7 +65,7 @@ func InboundBuilder(config *Config, nodeInfo *api.NodeInfo, tag string) (*core.I
|
||||
nodeInfo.V2ray.Inbounds[0].PortList = &conf.PortList{
|
||||
Range: []conf.PortRange{{From: uint32(nodeInfo.Trojan.LocalPort), To: uint32(nodeInfo.Trojan.LocalPort)}},
|
||||
}
|
||||
t := conf.TransportProtocol(nodeInfo.SS.TransportProtocol)
|
||||
t := conf.TransportProtocol(nodeInfo.Trojan.TransportProtocol)
|
||||
nodeInfo.V2ray.Inbounds[0].StreamSetting = &conf.StreamConfig{Network: &t}
|
||||
} else if nodeInfo.NodeType == "Shadowsocks" {
|
||||
defer func() {
|
||||
|
||||
@@ -77,7 +77,7 @@ func (c *Controller) buildTrojanUsers(userInfo *[]api.UserInfo) (users []*protoc
|
||||
users = make([]*protocol.User, len(*userInfo))
|
||||
for i, user := range *userInfo {
|
||||
trojanAccount := &trojan.Account{
|
||||
Password: user.V2rayUser.Uuid,
|
||||
Password: user.TrojanUser.Password,
|
||||
Flow: "xtls-rprx-direct",
|
||||
}
|
||||
users[i] = &protocol.User{
|
||||
@@ -91,7 +91,7 @@ func (c *Controller) buildTrojanUsers(userInfo *[]api.UserInfo) (users []*protoc
|
||||
|
||||
func (c *Controller) buildTrojanUser(userInfo *api.UserInfo) (user *protocol.User) {
|
||||
trojanAccount := &trojan.Account{
|
||||
Password: userInfo.V2rayUser.Uuid,
|
||||
Password: userInfo.TrojanUser.Password,
|
||||
Flow: "xtls-rprx-direct",
|
||||
}
|
||||
user = &protocol.User{
|
||||
|
||||
Reference in New Issue
Block a user