[Proxy Resource] External Proxy Resources
This section defines external proxy server list resources, supporting loading configurations from local file paths or remote HTTP/HTTPS URLs for inclusion in [Proxy Group] policy groups.
Syntax Declaration
External proxy resources are declared using standard INI configuration lines:
name = source, [options...]Component breakdown:
name: Unique identifier for the resource, referenced by theincludesoption in[Proxy Group]policy groups.source: Positional source address argument, which must be declared as the first parameter. Supports local relative paths, absolute paths, or remote HTTP/HTTPS URLs. If the address contains commas or equals signs, it must be enclosed in double quotes.[options...]: Key-value options (key=value) for configuring update intervals and other control parameters.
Field Reference
source(Local path or HTTP/HTTPS URL, positional argument, required) Resource acquisition source, declared as the first positional parameter in the configuration line. Supports local relative paths, absolute paths, or remote HTTP/HTTPS URLs; relative paths are resolved against the directory containing the configuration profile. If the address contains commas or equals signs, it must be enclosed in double quotes.iniRemoteNodes = "https://subscribe.example.com/api/v1/client/subscribe?token=<TOKEN>" LocalNodes = ./nodes/local_nodes.confupdate-interval(Integer, unit: seconds, default 86400) Scheduled fetch and automatic refresh interval for remote resources (key-value option); defaults to86400seconds when unset, while setting<= 0(such as0or-1) disables scheduled and background auto-updates (a missing local cache is still fetched once, and manual refreshes are unaffected).iniupdate-interval=86400format(Enum:ringorsurge, defaultring) Specifies the parsing format for the external proxy resource (key-value option, case-insensitive). Defaults toring(native Ring syntax); set tosurgeto enable read-only Surge proxy compatibility. Unrecognizedformatvalues or other unknown key-value options do not fail validation; the system falls back toringand preserves the original entries.iniformat=surgeCustom extension options (String key-value pairs, default empty string) Key-value options (
key=value) other thanupdate-intervalandformatare preserved verbatim in declaration order into the resource model's extension parameter string (comma-joined) for extended attributes.
Loading and Update Mechanism
- Asynchronous Download & Local Caching: Remote resources are fetched asynchronously and written to a local cache during configuration loading; upon subsequent launches, valid local cache is prioritized to avoid blocking startup.
- Update Failure Handling: If remote requests fail during scheduled updates or reloads, the system continues using the existing cached nodes.
- Dynamic Policy Group Integration: When a policy group declares
includes=ResourceName, proxy servers defined in the external resource are merged into that group's candidate pool, participating in health checks and routing decisions.
Surge Proxy Compatibility
- Activation: Set
format=surgeto enable. Supports both plain Surge proxy lists and the[Proxy]section of full Surge configurations. Remote HTTP/HTTPS fetches include aSurgeidentifier in the requestUser-Agent. - Scope: Provided for best-effort transition only; full support is not guaranteed. Unsupported protocols or malformed entries are safely skipped.
- Recommendation: Use native Ring format or Sub-Store for long-term usage.
Configuration Examples
Basic Configuration
[Proxy Resource]
# 1. Remote HTTP/HTTPS node resource (auto-refreshed every 24 hours)
GlobalNodes = "https://subscribe.example.com/api/v1/client/subscribe?token=<TOKEN>", update-interval=86400
# 2. Backup remote node resource (auto-refreshed every 12 hours)
BackupNodes = "https://backup.example.com/profiles/nodes.conf", update-interval=43200
# 3. Local file node resource (relative path)
LocalNodes = ./nodes/local_nodes.conf
[Proxy Group]
# Auto speed-test group referencing remote node resource
AutoTest = url-test, includes=GlobalNodes, check-interval=300, tolerance=1
# Failover group falling back to backup resource on primary failure
FallbackGroup = fallback, ProxyA, includes=BackupNodes, check-interval=60
# Manual select group including both remote and local node resources
ManualSelect = select, DIRECT, includes=[GlobalNodes, LocalNodes]