What Happens When a Profile Refresh Fails | Raven
Frequently asked questions
- Can I import my own Clash profile and have it validated?
- Yes. Imports and refreshes are fully validated first, before anything is published.
- What happens to my connection if a refresh fails?
- Nothing. A failed download or an invalid profile never replaces the working version, so the tunnel keeps running on what you already had.
- What does Raven validate?
- The profile document and everything it references. The format is classified before parsing, rule-provider and geoip resources are fetched and size-checked, the document is parsed, and the result is compiled into a runtime — all before publication, rather than applied and then checked.
- Does Raven run its own servers?
- No. It provides no proxy servers, has no accounts, and does not upload traffic history.
- What happens if my subscription link returns an HTML error page or a base64 node list?
- Both are classified as an unsupported subscription format and refused before parsing. Empty documents, base64 URI lists and plain URI lists are rejected the same way. A single node URI can still be added as a manual node instead.
- Does a failed refresh change the policy groups I selected?
- No. The catalog is committed only after a refresh passes validation, so a failure never reaches the commit. When a refresh does succeed, your selections are carried across by group ID and re-normalized against the new profile's groups.
The short answer
Raven is an iPhone client for your own proxy nodes and Clash-compatible profile sources, and it answers this question with an ordering rule: a profile is validated in full before it is published, so a refresh that fails at any step leaves the version you already had running. Your tunnel does not change, because nothing was committed. What you get instead is a failure with a class — download, format, resource, parse or runtime compile — enough to tell "the provider's link died" apart from "a rule set this profile references is missing".
There is no App Store listing to link yet — the product page is where it lives. The rest of this page is what the check covers.
Why you are reading this
A subscription link is not a file. Providers rotate URLs, gate them behind a token that expires, and — when something has gone wrong on their side — return an HTML page with a 200 status. Your phone is perfectly happy with that response; a client that writes those bytes into the live configuration before looking at them is not, and you find out when DNS stops resolving.
There is a quieter version of the same worry. After a failed refresh, what is the tunnel actually running? Most apps make that unknowable: the source list still shows your subscription, the connection still says connected, and the only way to find out what is live is to read a log. Being able to say "this is the version from Tuesday, and here is why Tuesday's refresh was rejected" is the whole value of the feature.
What "validated before publication" actually means
A profile can be checked in two orders: apply it and then see whether it works, or check it first and publish only if it passes. Only the second order means a bad profile cannot take your connection down. The ordering is the feature; validation is only what makes the ordering possible.
Raven's refresh pipeline is short, and each step has one way to fail:
- Fetch. The document is downloaded with its
ETagandLast-Modifiedattached. A transport error or an HTTP failure ends here as a download failure, and the record is untouched. - Classify. The bytes are identified before anything tries to parse them: HTML, empty, JSON, Clash YAML, base64 URI list, plain URI list, or unrecognized.
- Resolve resources. Every
rule-providerand geoip reference the document declares is fetched and size-checked against its own budget and the total. - Import. The document is parsed into nodes, groups and rules. Parser diagnostics carry a severity and a path, so a failure points at a location rather than a file.
- Compile. The parsed profile is turned into a runtime. A profile that parses but will not compile fails here, before anything has been published.
- Commit and publish. Only now is the catalog updated and the version handed to the tunnel.
Steps 1 through 5 have one write path, and it is at the end. A failure at any of them throws before the catalog is touched. If the commit happens and the hand-off to the tunnel then fails, the previous catalog state is restored, so the source list and the running configuration never disagree.
The failures this actually catches
Each of these is a distinguishable failure with its own code in the diagnostics:
- A login page instead of a profile. Anything starting with
<!doctype html,<html,<heador<bodyis recognized as HTML. On a provider whose link has expired this is the most common outcome, and it is refused as an unsupported subscription format rather than parsed. - A node list instead of a profile. A base64 blob that decodes to
ss://,vmess://ortrojan://lines, or a plain list of such lines, is classified as a URI list and refused. A subscription in that format is not a profile; treating it as one is how clients end up with zero routing rules. - A rule set that is gone. A
rule-providerURL that 404s, returns too many bytes, or comes back unparseable fails as a resource error. Those are reported individually — transport, HTTP, too large, total too large, missing, parse invalid — rather than collapsed into "refresh failed". - A geoip database that will not load. The built-in geoip resource is checked on load and against its size budget, and a failure is named as a geoip problem, not an import problem.
- A profile that parses but will not run. Some documents survive parsing and fail when compiled into a runtime. That is caught at step 5, which is exactly why the compile is part of validation and not part of startup.
The limits are hard, not advisory
Validation happens before publication rather than at startup, and it happens in the layer that actually compiles a profile rather than in the UI. That distinction matters: a check performed by the screen can only produce a warning, while a check performed by the core refuses the document.
Two classes of failure are caught on that path. A download that fails is the obvious one. A document that parses but will not run is the one worth naming — some documents survive parsing and fail when compiled into a runtime, which is why the compile is part of validation and not part of loading.
What happens while nothing is happening
Two details decide whether "last known good" is real or just a slogan.
A refresh that comes back not modified reuses the cached document rather than replacing it — the same conditional logic applies to individual resources, which also carry their own refresh interval and are reused until that interval is due. So the common case, where the provider has not changed anything, does not churn your configuration at all.
And recovery is not a special case bolted on. On launch Raven reads the published snapshot back; if its source is no longer in the catalog, the first source that still has a cached document is used instead, and the active source is cleared only when none does. A snapshot that fails validation is discarded rather than loaded. The version the tunnel runs is always one published whole — how that version survives a tunnel reload is its own page.
What this design does not protect you from
- A valid profile with dead nodes. Validation proves the document is coherent and compilable. It cannot prove a server is reachable. If your provider rotates every node and the profile stays structurally valid, it keeps being published correctly while connecting to nothing. Reachability is a URL-test policy group's job, not validation's.
- A working config that has simply expired. Keeping the last good profile is right when the new one is broken and wrong when the old one has stopped being useful. You are trading an outage for a stale connection.
- Formats that are not imported. HTML, empty documents, base64 URI lists and plain URI lists are refused as subscription formats. A single node URI is still fine as a manual node; the refusal is about treating a node list as a routing profile.
- Plain HTTP outside a local network. Remote sources must be HTTPS; insecure HTTP is accepted only where local-network policy allows it, and credentials embedded in the URL are rejected.
- Any server-side copy. There is no fallback profile on someone else's machine. The last good version is the one cached on your device — a direct consequence of running no servers and holding no accounts, which that category split explains.
What Raven does differently
The differentiator is a single commit point with validation in front of it, applied to imports and refreshes alike. Everything else follows: resource downloads are bounded rather than trusted, failures carry codes instead of prose, the published snapshot is re-validated on the way back in, and diagnostics are structured events — code, outcome, detected format, counts, byte sizes — held on device in a bounded recent-events buffer that carries no URLs and no keys.
The honest limits are the category's own. Raven provides no proxy servers, has no accounts, and does not upload traffic history, and it is still in development: iPhone and iPad on iOS 17+, a Control Center and Lock Screen extension that needs iOS 18+, and no App Store listing yet.
The decision you can now make
Three questions, with legible answers:
- When your subscription link breaks, what do you want to happen? A gap in connectivity, or the previous configuration staying up. Raven is built for the second, and the pipeline above is what makes the promise testable.
- Do you need to know why it failed? Download, format, resource, geoip, parse and compile are separate outcomes with separate codes, recorded on your device.
- Is a client without servers the right shape for you? If you already have your own nodes, nothing here is missing. If you expected the app to supply them, it will not.
If the first question matters to you, Raven is the one to try; if it does not, a client that simply hands you a tunnel is a perfectly reasonable choice.