RayRay

Для провайдеров

РусскийEnglish

Как RayRay загружает список серверов по ссылке, которую вы даёте пользователям, и что он понимает в ответе. Если чего-то не хватает, пишите на support@rayray.channel.

Запрос

Формат ответа

Не поддерживаются: плагины Shadowsocks (obfs, v2ray-plugin), транспорты h2 и quic, http в ссылках и sing-box (в Clash network: http работает), trojan без TLS, hysteria2 с insecure=1 или pinSHA256, ссылки tuic, wireguard, hysteria (v1) и anytls, зашифрованные списки. WireGuard, Hysteria и другие протоколы Xray работают в полном Xray JSON.

Полный JSON от панели

Если по основному адресу пришли не полные конфиги Xray (ссылки, Clash или sing-box), приложение пробует <адрес>/json, затем <адрес>/v2ray-json, с теми же заголовками и параметрами запроса. Если там полные конфиги Xray, в списке будут они: так работают балансировщики вроде «Auto». Найденный адрес запоминается: дальше приложение обновляет список по нему и берёт заголовки из его ответа. Если в этом ответе нет subscription-userinfo, приложение отдельно запрашивает основной адрес, с теми же заголовками, и берёт трафик и срок из его ответа. Если в ответе нет ни одного из заголовков ниже, остальные остаются прежними. Если он ответит 4xx или не полными конфигами, приложение вернётся к основному адресу.

Заголовки ответа

Названия заголовков — без учёта регистра.

Профиль маршрутизации

Значение заголовка routing — JSON как есть или в base64. Ключи без учёта регистра:

Если все шесть списков пусты, а GlobalProxy не false, профиль не применяется целиком, вместе с DNS и остальными ключами. Профиль включается сам для серверов этого провайдера; пользователь может выключить его на странице «Маршрутизация». Он действует на серверы из ссылок, а у серверов из полного Xray JSON остаётся их собственный routing.

Кнопка «Добавить в RayRay»

rayray://add/<ссылка> открывает окно добавления с этой ссылкой, пользователь нажимает «Добавить». Ссылку можно передать как есть или закодировать: rayray://add/https%3A%2F%2Fexample.com%2Fsub. QR-код может содержать адрес, ссылки на серверы или rayray://add/.


For providers

How RayRay downloads the server list from the link you give your users, and what it understands in the answer. If something is missing, write to support@rayray.channel.

Request

Answer format

Not supported: Shadowsocks plugins (obfs, v2ray-plugin), the h2 and quic transports, http in links and sing-box (Clash network: http works), trojan without TLS, hysteria2 with insecure=1 or pinSHA256, tuic, wireguard, hysteria (v1) and anytls links, encrypted lists. WireGuard, Hysteria and other Xray protocols work inside full Xray JSON.

Full JSON from the panel

If the main address returns anything but full Xray configs (links, Clash or sing-box), the app tries <address>/json, then <address>/v2ray-json, with the same headers and query. If either returns full Xray configs, the list uses them, so balancers such as “Auto” work. The address that worked is remembered: later updates use it and read the headers from its answer. If that answer has no subscription-userinfo, the app also requests the main address, with the same headers, and reads the traffic and expiry from its answer. If the answer has none of the headers below, the others stay as they were. If it answers 4xx or without full configs, the app goes back to the main address.

Response headers

Header names are case-insensitive.

Routing profile

The routing header holds JSON, plain or in base64. Keys are case-insensitive:

If all six lists are empty and GlobalProxy is not false, the whole profile is ignored, DNS and the other keys included. The profile turns on by itself for this provider’s servers; the user can turn it off on the “Routing” page. It applies to servers from links; servers from full Xray JSON keep their own routing.

“Add to RayRay” button

rayray://add/<link> opens the add panel with that link filled in, and the user taps “Add”. The link can go as is or percent-encoded: rayray://add/https%3A%2F%2Fexample.com%2Fsub. A QR code can hold the address, server links or a rayray://add/ link.