Profiles

Reference for the RCX profile format: keys, defaults, inheritance, bindings and limits.

On this page

Document

A profile is one YAML mapping; unknown keys are errors. The app calls a profile a behaviour.

bypass-de.rcx.yaml
rcx: 1
title: Germany first
description: Prefers servers that exit in Germany and open the test page.
level: advanced
pool: { exclude: 'type = http' }
tags:
  premium: 'name ~ /premium|vip/i'
checks:
  page: { http: 'https://example.com/', expect: [200] }
prefer:
  - { label: German exit, when: 'exit.country = DE and passes(page)' }
  - { label: Premium, when: 'tag(premium) and not dead' }
  - { label: Any working, when: 'not dead', last-resort: true }
rank: { by: latency, tolerance: 40 }
switch: { improve: true, feel: calm, max-per-hour: 1 }
stranded: direct
energy: balanced

Keys

KeyTypeDefaultDescription
rcxinteger1Format version; above 1 is rejected.
titlestringthe idDisplay name.
descriptionstring—One-line summary in choosers.
levelsimple | advancedsimpleHow much the editor exposes.
extendsprofile id—Base profile; see Inheritance.
pool{include, exclude}all membersServer conditions that narrow the members.
tagsmap name → server condition—Named server sets for tag(name).
checksmap id → check—Requests for passes(id) and fails(id).
preferlist of tiersone step Working (not dead)Ordered server tiers.
rank.bylatency | stabilitylatencyScore formula; see Score.
rank.toleranceinteger ms0Bonus for the current server.
switch.feelcalm | balanced | eagerbalancedPreset for the switch fields.
switch.improvebooleanfalseSwitch to a faster server in the same tier.
switch.dwelldurationpresetMinimum time between improvement switches.
switch.min-gain-msintegerpresetMinimum gain in milliseconds.
switch.min-gain-pctintegerpresetMinimum gain as a percentage of the current score.
switch.confirmintegerpresetFresh samples the candidate must win in a row.
switch.max-per-hourintegerpresetImprovement switches per hour.
strandedhold | direct | group:<name>holdAction when no member is eligible.
energyeco | balanced | precisebalancedProbe budget; see Budgets.
network.diagnosemap name → diagnostic—Direct probes for network conditions.
network.kindslist of kind rules—Network kinds; first match wins.
onmap kind → layer—Changes on one network kind.
direct-splitnetwork condition—When direct split may activate.
egress-verify.echolist of URLstwo built-in servicesExit-country echo services.
egress-verify.agree0–32 (0 means 2)Distinct agreeing sources required.
l10nmap language → map source → text—Translations of the profile's own strings.

Durations use Go syntax (90s, 1h30m) and cannot be negative. See Feel presets.

Pool

include and exclude are server conditions. A member is kept unless include is false or exclude is true, so an unknown fact neither admits nor removes it. Non-servers (DIRECT, REJECT and similar) are never eligible.

Tiers

The app shows the tiers as the Server order; each tier is a step, and a last-resort tier is the Fallback.

yaml
# fragment
prefer:
  - { label: Fast home, when: 'country = NL and latency < 80ms' }
  - { label: Any, when: 'not dead' }
  - { label: Fallback, when: 'not dead', last-resort: true }
FieldTypeDescription
labelstringShown in the app; empty shows as Tier N, N being the position.
whenserver conditionMembers for which it is true join the tier.
last-resortbooleanThe tier yields to every other tier, wherever it is listed.

A member joins the first tier whose condition is true. Selection moves to the next tier only when every server in a tier is excluded or dead.

Checks

yaml
# fragment
checks:
  web: { http: 'https://example.com/generate_204', expect: [204] }
  port: { tcp: 'example.net:443', optional: true }
  hello: { tls: '203.0.113.7:443', sni: example.org }
FieldTypeDescription
httpURLHEAD request through the server; redirects are not followed.
tcphost:portTCP connect through the server.
tlshost:portTLS handshake through the server; the certificate is not verified.
snistringServer name for tls; defaults to the host when it is a name.
expectlist of 100–599http only; without it any response passes.
optionalbooleanA failure is soft: passes(id) and fails(id) both stay false.

Exactly one of http, tcp or tls is required. A check runs only when a condition uses it, as an extra on a successful probe. A host outside the provider's domain and the built-in endpoints needs consent when the profile comes from a provider; see Consent.

Network

yaml
# fragment
network:
  diagnose:
    home: { tcp: ['77.88.8.8:443', '77.88.8.1:443'] }
    foreign: { tls: ['1.1.1.1:443'] }
  kinds:
    - { kind: portal, when: network.portal, pause: true }
    - { kind: whitelist, when: 'home ok and foreign fail' }

A diagnostic is a named list of http URLs or tcp/tls host:port targets, probed directly through the DIRECT outbound. <name> ok holds when any target answered; <name> fail holds when every target was tried and none answered.

Kind fieldTypeDescription
kindname[a-z0-9-], 1–24 characters.
whennetwork conditionRecognizes the kind.
pausebooleanHold the current server and stop checks on this kind.

Recognition rules are in Network kinds.

Per-network changes

yaml
# fragment
on:
  whitelist:
    prefer:
      - { label: Bypass node, when: 'tag(bypass) and not dead' }
    switch: { feel: eager }

on.<kind> may set pool, prefer, rank, switch, stranded and energy. The kind must be declared in network.kinds, or compiling fails with the profile declares no network kind <kind>. The layer merges over the profile like a child in Inheritance; the user's binding applies after it.

Direct split

direct-split is a network condition. While it is true and the user enabled Direct sites through this group, connections matched by an explicit DIRECT rule go through the group. Exceptions and states: Direct split.

Translations

yaml
# fragment
l10n:
  ru: { Germany first: Сначала Германия, German exit: Выход в Германии }

Keys are the profile's own source strings: title, description and tier labels. The app shows the user's language, else the source text. Language tags are 2–3 lowercase letters, optionally followed by a region of 2–8 letters or digits (ru, zh-CN).

Inheritance

extends names a base profile; chains go at most 4 levels deep and cannot loop.

KeyMerge rule
Scalars (title, level, rank.by, stranded, energy, …)The child wins when set; rank.tolerance: 0 cannot override.
poolNarrows: includes joined with and, excludes with or.
tags, checks, network.diagnose, l10nMerged per key; l10n per language and string.
preferReplaced when the child has any tier.
switchA child feel resets the other fields to that preset (improve is kept); explicit fields then override.
onMerged per kind; a child's on.<kind> replaces the parent's.
network.kinds, egress-verify.echoReplaced whole.
egress-verify.agreeThe child wins when set.

Errors: extends itself, extends more than 4 levels deep, profile <id> not found.

Bindings

A binding attaches a profile to one select group. The subscription writes it as rcx: on the group; the app keeps the user's binding per subscription.

yaml
# fragment
proxy-groups:
  - name: Proxy
    type: select
    proxies: [NL 1, NL 2, DE 1]
    rcx:
      profiles: [fast, builtin/stable]
      default: fast
      pool: { exclude: 'name ~ /test/' }
      chips:
        - { label: Netherlands, include: 'country = NL' }
KeyTypeDescription
profileslist of idsProfiles offered for the group.
defaultidUsed when profile is empty or missing.
profileidThe chosen profile.
pool{include, exclude}Narrows the profile's pool.
preferlist of tiersReplaces the profile's order for this group.
feelfeelResets the switch fields to that preset.
energyenergyOverrides the profile's energy.
chipslist of {label, include}, at most 12One-tap pools under Choose from; invalid chips are dropped.

The user's binding replaces profile, pool, feel and energy, replaces prefer when non-empty, and adds its chips to the provider's. A subscription cannot turn on direct split. The profile id resolves in order: profile, default, builtin/simple; a missing profile is reported as profile.missing. Scenario programs apply on top; see Programs. Where the profile's own on.<kind> sets prefer for the current network kind, that order wins over both.

Limits

ItemLimit
Document64 KiB
Tiers16
Tags32
Checks8
Diagnostics8, each with 1–4 targets
Network kinds, on entries8 each
Echo services4, http(s) URLs
extends depth4
Chips12
l10n16 languages, 64 strings each, 1–160 characters per string
Condition2048 characters; see Limits

Searches every section: providers and RCX