Skip to content

GetServerConfig never applies IPStrategy override (global or per-server) — node always gets empty ip_strategy #248

Description

@cold-sword

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

  1. Create a per-server config override with ip_strategy = "prefer_ipv6" for any node/protocol (or set the global Node.IPStrategy in ppanel.yaml).
  2. Confirm via the admin panel (or the QueryServerProtocolConfig-backed endpoint) that the override shows prefer_ipv6 correctly.
  3. Inspect the actual payload returned by GetServerConfig (the endpoint the node polls) for that same server/protocol — the ip_strategy field is empty/absent.
  4. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions