Краткий справочник текущей persisted и runtime семантики OneXray.
Config Types и Tags#
| Identifier | Значение |
|---|---|
CoreConfigType.outbound |
Локальный или subscription Outbound. |
CoreConfigType.profile |
Xray Profile в Dart; persisted wire value остается "setting". |
CoreConfigType.full |
Full Config в Home Local. |
CoreConfigType.raw |
Raw Json в Home Local. |
Simple |
Встроенный profile id -1. |
proxy |
Runtime final proxy exit. |
chainProxy |
Runtime relay tag Home node при Final Outbound. |
direct |
Freedom direct outbound. |
tunIn |
Runtime TUN inbound. |
pingIn |
Runtime HTTP ping inbound. |
Home Routing Modes#
| Mode | Нужен узел | Transformation |
|---|---|---|
rule |
Да | Сохраняет DNS, routing и outbound structure после composition. |
global |
Да | Удаляет DNS/routing; оставляет proxy и recursive dialerProxy dependencies. |
direct |
Нет | Удаляет DNS/routing; оставляет direct и очищает его dialerProxy. |
Смена при активном соединении перезапускает Core.
Import Classification#
| Input | Result |
|---|---|
Trimmed text начинается с https:// |
Каждая валидная HTTPS-строка становится subscription entry. |
| Другой поддерживаемый текст | libXray возвращает Outbound models. |
Fragment задает имя, но не сохраняется в URL. Extensions: txt, json, yaml, yml, png, jpg, jpeg. Обычный import не создает Raw Json, Full Config, Xray Profile или GeoData.
Simple Profile Defaults#
| Field | Default |
|---|---|
routing.domainStrategy |
IpIfNonMatch |
routing.directSet |
CN |
routing.appleDirect |
true |
routing.localDirect |
true |
routing.enableIPRule |
true |
routing.localDns |
true |
routing.blockAds |
false |
enableLog |
false |
fakeDns |
false |
finalOutboundId |
null |
| Default DNS | tcp://<TUN IPv4 DNS>, tag defaultDns, через proxy |
Региональный local DNS: CN 223.5.5.5, IR 5.200.200.200, RU 9.9.9.9, Other 8.8.8.8. Он используется только для соответствующих direct domains при включенном Local DNS.
Block Ads добавляет встроенное правило рекламных доменов в block.
DNS и FakeDNS#
| IPv6 | Strategy | FakeDNS pools |
|---|---|---|
| Включен | UseIP |
IPv4 198.18.0.0/15 и IPv6 fc00::/18 |
| Выключен | UseIPv4 |
Только IPv4 |
Первый DNS Server нового custom Profile/Full Config равен TUN IPv4 DNS. Full Config управляет outbounds, routing, dns, но не FakeDNS.
Runtime Composition#
| Stored type | Rule-mode Final Config |
|---|---|
| Outbound | Profile + Home Outbound proxy, при необходимости Final Outbound через chainProxy. |
| Full Config | Profile base + Full Config outbounds/routing/dns; Profile FakeDNS/inbounds/log/metrics сохраняются. |
| Raw Json | Raw body с переписанными inbounds, DNS strategy, logs, metrics, env и route fields. |
Release runtime inbounds: tunIn и pingIn. Пользовательские Raw Json inbounds удаляются при validation, Real Ping, save и startup.
Runtime-Owned Fields#
- случайные
pingInи metrics ports; env.xray.location.assetиenv.xray.location.cert;- mobile
env.xray.tun.fd; - Windows/Linux TUN gateway, DNS, routes и outbound interface;
- access/error paths или отключение logs в macOS System Extension;
- optional policy/stats/metrics.
Routing Rule Fields#
domain, ip, port, sourcePort, localPort, network, sourceIP, localIP,
inboundTag, protocol, attrs, process, outboundTag, ruleTagprocess записывается только на Windows и Linux.
Raw Json Validation#
Raw Json должен быть JSON object с непустым name. Manual validation заменяет inbounds на pingIn, удаляет metrics, применяет runtime env и вызывает Xray config test. Обычный import Outbound/share content этот test не запускает.
Backup v3#
manifest.json
core_configs.json
subscriptions.json
geo_data.json
dat/Manifest содержит version 3 и creation time. Local configs/GeoData восстанавливаются из архива, subscription nodes загружаются снова по восстановленным URL.