Skip to content

docs: клиентский профиль маршрутизации HAPP и его переопределение - #21

Open
tony-adamson wants to merge 1 commit into
howdeploy:mainfrom
tony-adamson:docs/happ-client-routing
Open

docs: клиентский профиль маршрутизации HAPP и его переопределение#21
tony-adamson wants to merge 1 commit into
howdeploy:mainfrom
tony-adamson:docs/happ-client-routing

Conversation

@tony-adamson

Copy link
Copy Markdown

Проблема

Подписка отдаёт клиенту HAPP профиль маршрутизации в заголовке routing:, и управляемый профиль по
умолчанию заворачивает в туннель всё, кроме приватных диапазонов IPv4. Дефолт разумный, но у него
есть следствие, с которым сталкивается почти каждый, кто ставит Xrayebator под Россию: Ozon, банки,
Госуслуги и ВК видят зарубежный адрес VPS и отвечают заглушкой.

Механизм, который это меняет, — .happ_routing.json — упомянут в документации ровно одной строкой в
описании архитектуры: без схемы, без примера и без объяснения, чем он отличается от серверного
Bypass routing. Разбираться пришлось по коду subhttp.sh.

Что в PR

Раздел «Профиль маршрутизации клиента HAPP» в docs/configuration.md и переводы в docs/ru/ и
docs/zh-CN/:

  • чем клиентский профиль отличается от Bypass routing: bypass меняет то, куда запрос отправляет
    сервер, а клиент всё равно заворачивает его в туннель, поэтому адресат видит адрес VPS; на
    ноде без каскада общий outbound и так direct, и bypass там не меняет ничего;
  • переменные HAPP_ROUTING_ENABLED и HAPP_ROUTING_JSON_FILE;
  • семантика GlobalProxy в обе стороны;
  • полный рабочий пример раздельной маршрутизации;
  • три грабли, на которые легко наступить: Telegram матчится по IP, а не по доменам, и список сетей
    надо брать с core.telegram.org, а не по памяти; LastUpdated обязан расти, иначе HAPP не
    переимпортирует профиль; ссылки на geo-базы привязаны к подписчику.

Только документация, код не тронут.


🤖 Generated with Claude Code

https://claude.ai/code/session_0121QZ51XSKaiKcRrtoVQTDg

The subscription endpoint ships a client-side routing profile in the routing:
response header, and the managed default tunnels everything. The override file
that changes it was mentioned in one line of the architecture docs, without a
schema, an example, or the difference from server-side bypass routing.

Bypass routing only changes where the server sends a request; the client still
tunnels it, so a Russian site keeps seeing the VPS address. On a node without a
cascade the catch-all outbound is already direct, so bypass cannot help there.
Split routing is only reachable through the client profile, which made this the
most common thing operators had to rediscover on their own.

Adds a Configuration section in en/ru/zh-CN covering the two environment
variables, GlobalProxy semantics, a complete split-tunnel example, and the three
mistakes that are easy to make: Telegram matching by IP rather than domain,
LastUpdated needing to grow, and geo database URLs being per-subscriber.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0121QZ51XSKaiKcRrtoVQTDg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant