Autorouting¶
An extension of the routing functionality that lets you bind a profile to a remote URL source. The profile is downloaded and updated automatically on a schedule.
Difference from Routing¶
| Routing | Autorouting | |
|---|---|---|
| Data | Base64 profile passed once | URL source, the profile is downloaded from it |
| Updates | Only when the subscription is updated | Automatically on an interval (default 24h) |
sourceURL |
Not set | Set — the profile is bound to a URL |
| Indicator | None | Cloud icon in the profile list |
Link types¶
| Link format | Description |
|---|---|
://autorouting/onadd/{url} |
Downloads the profile from the URL, sets up auto-updates, and activates it |
://autorouting/add/{url} |
Downloads the profile from the URL and sets up auto-updates |
Important:
://routing/onadd/{url}is not autorouting — it is a one-time import without auto-updates. Only the://autorouting/scheme setssourceURLand enables auto-updates.
{url}is a direct link to the profile JSON file (starting withhttp://orhttps://).
Type detection¶
The type is determined by the link scheme:
://autorouting/→ autorouting (sourceURLis set, auto-updates enabled)://routing/→ routing (one-time import, nosourceURL, no auto-updates)
Examples:
://autorouting/onadd/https://example.com/profile.json → autorouting (auto-updates)
://routing/onadd/https://example.com/profile.json → routing (one-time import)
://routing/onadd/ewogICJOYW1lIjogIlRlc3QiCn0= → routing (base64)
HTTP header¶
The autorouting header contains the URL where the routing profile JSON is available:
The profile is downloaded when the subscription is updated, stored with a binding to the URL source, and updated periodically.
Subscription body¶
The autorouting string is placed in the subscription body alongside server configurations:
vless://uuid@server1:443?security=tls#Server1
vless://uuid@server2:443?security=tls#Server2
://autorouting/onadd/https://raw.githubusercontent.com/user/repo/main/profile.json
Source priority¶
When several routing sources are present, the first one found is used:
| Priority | Source | Type |
|---|---|---|
| 1 (highest) | autorouting header |
Auto-updating |
| 2 | Body — line with a URL | Auto-updating |
| 3 | routing header |
Static |
| 4 (lowest) | Body — line with base64 | Static |
GitHub URL conversion¶
Links to files in GitHub repositories are automatically converted from the "blob" format to "raw":
https://github.com/user/repo/blob/main/path/profile.json
→
https://raw.githubusercontent.com/user/repo/main/path/profile.json
This happens transparently on import and auto-update. You can use regular GitHub links — the application will substitute the correct URL itself.
Content at the URL¶
The file at the URL may contain:
1. Nested deep link:
If the content starts with incy:// — the application automatically extracts the profile data from the link. This allows hosting .deeplink files:
The application will extract the base64 data and decode the profile.
2. JSON profile (recommended):
{
"Name": "RoscomVPN",
"GlobalProxy": "true",
"RemoteDNSType": "DoH",
"RemoteDNSDomain": "https://cloudflare-dns.com/dns-query",
"RemoteDNSIP": "1.1.1.1",
"Geoipurl": "https://example.com/geoip.dat",
"Geositeurl": "https://example.com/geosite.dat",
"DirectSites": ["geosite:ru"],
"DirectIp": ["geoip:ru"],
"DomainStrategy": "IPIfNonMatch"
}
3. Base64-encoded JSON:
The application tries: nested deep link → JSON → base64 (in priority order).
The profile field structure is described in routing.md.
Auto-updates¶
Mechanism¶
- The application checks all profiles with a
sourceURLevery 30 minutes - If more than
updateIntervalhas passed since the last update (sourceLastUpdated) — the profile is re-downloaded - On update the following are preserved: the profile ID,
sourceURL,updateInterval, geo file hashes - If the geo file URLs changed after the update — the geo files are re-downloaded automatically
Update intervals¶
| Value (sec) | Display |
|---|---|
43200 |
12 hours |
86400 |
24 hours (default) |
259200 |
3 days |
604800 |
7 days |
UI management¶
Profiles with a sourceURL show a cloud icon in the list. The profile editor has an "Update source" section:
- URL — you can view and change the source URL
- Update frequency — choose the update interval
- Updated — the time of the last update
- Update now — manually update the profile
- Remove source — unbind the profile from the URL (turns it into a static one)
Updating existing profiles¶
- Profiles with the same
Nameare updated, not duplicated - When an auto-updating profile is updated, the following are preserved:
sourceURL,updateInterval, geo file hashes - If the geo file URLs (
Geoipurl,Geositeurl) changed — the geo files are re-downloaded automatically