Subcon¶
Subcon is a subscription converter server that renders Clash and Surge configs
from local profiles or remote subscriptions. Conversion is driven by schema/
and conf/, so you can tune behavior without recompiling.
Why Subcon
- Schema-driven mapping keeps protocol support consistent.
- Profiles and rules live on disk for quick iteration.
- A single
/subendpoint delivers target-specific output.
Web UI¶
Subcon includes an embedded control panel at / for managing profiles, rules,
schema mappings, and runtime control actions.
- Login uses the server URL and
common.api_access_token. - API access is same-origin only (CSRF-protected).
- Credentials are stored in the browser for convenience and can be cleared via Logout.
Request flow¶
graph LR
A[Profiles or remote URL] --> B[Schema registry]
B --> C[Optional inserts and node prefs]
C --> D[Target renderer]
D --> E[Clash or Surge output]
Support matrix¶
| Software | Import | Export | Notes |
|---|---|---|---|
| Clash | Yes | Yes | Import expects Clash profile YAML. |
| Surge | No | Yes | VLESS not supported. |
Quick start¶
Security note
To prevent abuse and ensure security, remote subscription url requests are restricted by network.allowed_domain.
Request parameters¶
| Name | Required | Description |
|---|---|---|
target |
yes | clash or surge. |
url |
no | Remote subscription URL. |
token |
no | Matches common.api_access_token to include inserts. |
Where configs come from
conf/base/provides base templates.conf/snippets/defines proxy groups and rulesets.conf/profiles/supplies local proxy lists.schema/maps protocols to each target.
Project layout¶
conf/- runtime configuration, profiles, and rules.schema/- protocol schemas and target mapping.src/- server and renderer implementation.docs/- documentation sources.