diff --git a/api/apimodel.go b/api/apimodel.go index b787079ed..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 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