From 4787648839f6a3d7b0f01716866df533c6549bd7 Mon Sep 17 00:00:00 2001 From: dev0 Date: Thu, 17 Jul 2025 01:05:58 +1000 Subject: [PATCH] report privateIP --- api/apimodel.go | 2 +- api/fac/fac.go | 3 +-- config.yaml | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/apimodel.go b/api/apimodel.go index 32237d4cf..176f6f10a 100644 --- a/api/apimodel.go +++ b/api/apimodel.go @@ -47,6 +47,7 @@ type Config struct { DeviceLimit int `mapstructure:"DeviceLimit"` RuleListPath string `mapstructure:"RuleListPath"` DisableCustomConfig bool `mapstructure:"DisableCustomConfig"` + PrivateIP string `mapstructure:"PrivateIP"` } // NodeStatus Node status @@ -104,7 +105,6 @@ type NodeInfo struct { func (n *NodeInfo) Tag(listenIP string, port uint32) string { return fmt.Sprintf("%s_%s_%d", n.NodeType, listenIP, port) - } type UserInfo struct { diff --git a/api/fac/fac.go b/api/fac/fac.go index 5ea81c3bb..49b514d75 100644 --- a/api/fac/fac.go +++ b/api/fac/fac.go @@ -61,8 +61,7 @@ func New(apiConfig *api.Config) *APIClient { client.SetBaseURL(apiConfig.APIHost) // Create Key for each requests client.SetQueryParam("key", apiConfig.Key) - // Add support for muKey - client.SetQueryParam("muKey", apiConfig.Key) + client.SetQueryParam("private_ip", apiConfig.PrivateIP) // Read local rule list localRuleList := readLocalRuleList(apiConfig.RuleListPath) diff --git a/config.yaml b/config.yaml index 644d639f5..57d0b128c 100644 --- a/config.yaml +++ b/config.yaml @@ -17,6 +17,7 @@ Nodes: NodeID: test-node-westus-01.dev.slow-access.work NodeType: Shadowsocks-Plugin # Node type: V2ray, Trojan, Shadowsocks, Shadowsocks-Plugin Timeout: 30 # Timeout for the api request + PrivateIP: "192.168.1.100" ControllerConfig: ListenIP: 0.0.0.0 # local listen address SendIP: 0.0.0.0 # outbound interface ip