On this page
If a module worked with your old profile but reports unknown policy after a switch, note the error line and the name of the active profile. Start with the policy named in the rule. A latency test can wait.
Tell a missing policy from an unavailable proxy
This guide covers module rules in Surge Mac and Surge iOS. A module can refer to a proxy policy or policy group defined in the active profile, or to a built-in policy. A module cannot create a missing entry in [Proxy] or [Proxy Group].
If Surge loads the profile and the request details show the expected policy group, inspect that group and its selected proxy. If the request never appears in Surge, start by checking whether Surge captures it. Use the steps below when the profile parser explicitly reports unknown policy.
Find the policy name the module passes to the rule
Save copies of the original profile and module. Check whether the error started after enabling a module, switching profiles, or updating a managed profile. Disable one suspect module at a time and reload the original profile. If that clears the error, record the module and error line before changing any other rules.
Find the corresponding [Rule] line in the module. A typical domain rule specifies the type, the target, and the policy, sometimes followed by options. Compare the full policy name with [Proxy] and [Proxy Group] in the active profile. Look for group names that were left behind when you switched profiles.
If the policy field uses a module parameter, check the value saved for that installed module and the default declared by the module. The official manual documents parameter tables for Mac 5.5.0+. If your interface offers an editable parameter, point it to an existing policy and keep the original match criteria.
Choose a fix based on where the module and profile came from
For a local module, replace the invalid reference in a copy with a policy that serves the same purpose in the active profile. For a remote module with parameters, adjust your own parameter value first. If a read-only module hard-codes a missing policy, keep it disabled and contact the maintainer, or use a local copy from a trusted source if its terms permit it.
If you need a new policy group, define it in an editable main profile and confirm it contains a working proxy. If you cannot edit the relevant section of a managed profile, keep the original subscription and test in a regular profile copy. Changes in that copy do not write back to the remote managed profile.
A profile can load with every rule set to DIRECT and still route traffic incorrectly. Direct connections, proxies, and rejection have different effects. If you cannot establish which policy belongs in the rule, leave the module disabled to preserve the original routing.
Check the rule, policy group, and route with fresh requests
Enable just the repaired module and confirm that the active profile loads without an unknown policy error. If you are in Global Proxy or Direct mode, switch to rule-based routing for the test. Module rules are inserted above existing rules, so check that requests outside the module's intended scope still follow their original rules.
Close the previous test connection and make a fresh browser request to a public domain you can access. Open Dashboard on Surge Mac or Recent Requests on Surge iOS. Open the test request details, confirm the actual rule and policy, and verify that the page loads. Test an unrelated domain to check the scope of the change.
If a request matches a different rule, check whether the module is enabled, the outbound mode, and rule priority. If it matches the right policy and still fails, inspect the request details and check the active member of the policy group. If there is no request record, check the system proxy or Enhanced Mode on Mac, or VPN status on iOS.
Verification checklist
- The module refers to a policy that exists in the active profile and serves the intended purpose
- The active profile reloads without an unknown policy error
- Fresh requests to target and unrelated domains are logged and behave as expected
- After updating or switching profiles, recheck the module parameter and make one fresh request
Restore the original profile if you cannot confirm the policy
Disable the module you tested and restore the original profile and outbound mode. If you used a regular copy, switch back to the original managed profile and keep the copy for comparison. Wait until the original profile loads and normal browsing works before investigating any remaining modules.
If the error returns after a managed profile update, give the profile or module maintainer a redacted comparison of the policy names, module name, and error line from before and after the update. Remove subscription URLs, account credentials, and proxy addresses before sharing. If the policy group still has no working members, leave the module disabled and check the subscription or proxies separately.
