Bug: GetServerConfig never applies the IP strategy (global default or per-server override) — the node agent always receives an empty IpStrategy
Summary
Setting a server's IP strategy (either the global Node.IPStrategy in ppanel.yaml, or a per-server override via server_config_overrides.ip_strategy, e.g. prefer_ipv6) appears to save and display correctly in the admin panel, but has no effect on the actual running node — the value never reaches ppanel-node.
Root cause
There are two separate server-facing endpoints that both read server_config_overrides / global IPStrategy, but only one of them is actually wired up correctly:
-
internal/module/network/internal/serverapi/queryServerProtocolConfigLogic.go (used by the admin panel to display/query the effective override) correctly calls nodeconfig.GlobalValues() + nodeconfig.ApplyOverride() and includes the resolved IPStrategy in its response (queryServerProtocolConfigLogic.go:76-93). This is why the setting looks correct when viewed/edited in the panel.
-
internal/module/network/internal/serverapi/getServerConfigLogic.go — the endpoint the node agent (ppanel-node) actually polls to fetch its live config — does not import the nodeconfig package at all, never calls GlobalValues/ApplyOverride, and never references IPStrategy anywhere in the file (confirmed via full-file review, 256 lines). Neither the per-server override nor even the plain global Node.IPStrategy default is included in the response this handler builds.
As a result, ppanel-node always receives an empty string for IpStrategy in GetServerConfig's response, regardless of what is configured in the panel (global or per-node override).
Repro
- Create a per-server config override with
ip_strategy = "prefer_ipv6" for any node/protocol (or set the global Node.IPStrategy in ppanel.yaml).
- Confirm via the admin panel (or the
QueryServerProtocolConfig-backed endpoint) that the override shows prefer_ipv6 correctly.
- Inspect the actual payload returned by
GetServerConfig (the endpoint the node polls) for that same server/protocol — the ip_strategy field is empty/absent.
- Node continues to prefer IPv4 for outbound traffic regardless of the configured strategy.
Suggested fix
getServerConfigLogic.go should resolve the effective IPStrategy the same way queryServerProtocolConfigLogic.go does — i.e. call nodeconfig.GlobalValues(config.Node) and nodeconfig.ApplyOverride(&values, override) for the relevant server, then populate the IpStrategy field on the response sent to the node (mirroring queryServerProtocolConfigLogic.go:93).
Note
Even with this fixed on the panel side, ppanel-node's own handling of IpStrategy has additional gaps that prevent it from actually affecting proxied traffic — filed separately at perfect-panel/ppanel-node.
Environment
Found while running a self-hosted ppanel-server instance (latest main as of 2026-08-09) together with ppanel-node. No sensitive data included above; happy to provide more repro detail if useful.
Bug:
GetServerConfignever applies the IP strategy (global default or per-server override) — the node agent always receives an emptyIpStrategySummary
Setting a server's IP strategy (either the global
Node.IPStrategyinppanel.yaml, or a per-server override viaserver_config_overrides.ip_strategy, e.g.prefer_ipv6) appears to save and display correctly in the admin panel, but has no effect on the actual running node — the value never reachesppanel-node.Root cause
There are two separate server-facing endpoints that both read
server_config_overrides/ globalIPStrategy, but only one of them is actually wired up correctly:internal/module/network/internal/serverapi/queryServerProtocolConfigLogic.go(used by the admin panel to display/query the effective override) correctly callsnodeconfig.GlobalValues()+nodeconfig.ApplyOverride()and includes the resolvedIPStrategyin its response (queryServerProtocolConfigLogic.go:76-93). This is why the setting looks correct when viewed/edited in the panel.internal/module/network/internal/serverapi/getServerConfigLogic.go— the endpoint the node agent (ppanel-node) actually polls to fetch its live config — does not import thenodeconfigpackage at all, never callsGlobalValues/ApplyOverride, and never referencesIPStrategyanywhere in the file (confirmed via full-file review, 256 lines). Neither the per-server override nor even the plain globalNode.IPStrategydefault is included in the response this handler builds.As a result,
ppanel-nodealways receives an empty string forIpStrategyinGetServerConfig's response, regardless of what is configured in the panel (global or per-node override).Repro
ip_strategy = "prefer_ipv6"for any node/protocol (or set the globalNode.IPStrategyinppanel.yaml).QueryServerProtocolConfig-backed endpoint) that the override showsprefer_ipv6correctly.GetServerConfig(the endpoint the node polls) for that same server/protocol — theip_strategyfield is empty/absent.Suggested fix
getServerConfigLogic.goshould resolve the effectiveIPStrategythe same wayqueryServerProtocolConfigLogic.godoes — i.e. callnodeconfig.GlobalValues(config.Node)andnodeconfig.ApplyOverride(&values, override)for the relevant server, then populate theIpStrategyfield on the response sent to the node (mirroringqueryServerProtocolConfigLogic.go:93).Note
Even with this fixed on the panel side,
ppanel-node's own handling ofIpStrategyhas additional gaps that prevent it from actually affecting proxied traffic — filed separately at perfect-panel/ppanel-node.Environment
Found while running a self-hosted ppanel-server instance (latest
mainas of 2026-08-09) together withppanel-node. No sensitive data included above; happy to provide more repro detail if useful.