mcp-xray-pilot 0.10.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,8 +10,9 @@
10
10
  A Model Context Protocol (MCP) server that gives an LLM offline access to the
11
11
  official **xray-core** documentation, plus deep structural validation,
12
12
  best-practice lint, a protocol/transport/security compatibility matrix, a
13
- geosite/geoip catalogue, an alternative-stack suggester and a multi-config
14
- merge helper.
13
+ **full v2fly geosite catalogue (~1500 categories)**, an alternative-stack
14
+ suggester, REALITY keypair / shortId generators, a live SNI target validator,
15
+ a curated SNI suggester per exit-country and a multi-config merge helper.
15
16
 
16
17
  ## What it does
17
18
 
@@ -34,7 +35,12 @@ merge helper.
34
35
  fingerprint enum, ALPN collisions, geosite/geoip typo catcher, protocol
35
36
  × transport × security incompatibilities, `xhttp.path` leading slash,
36
37
  `geoip:private` block rule, sniffing on 80/443 etc.
37
- - **Geo catalogue**: search ~500 known geoip/geosite tags by substring.
38
+ - **Geo catalogue**: search ~1500 known geoip/geosite tags by substring (full
39
+ v2fly/domain-list-community catalogue, hydrated from `data/geocatalogue.json`).
40
+ - **REALITY toolbelt**: `xray_generate_reality_keypair` (drop-in replacement
41
+ for `xray x25519`), `xray_generate_short_ids` (cryptographically random,
42
+ legacy-empty prefix), `xray_validate_sni_target` (live TLS 1.3 + h2 probe),
43
+ `xray_suggest_sni_for_country` (curated REALITY fronts per exit-country).
38
44
  - **Compares protocols**: side-by-side table of vless/vmess/trojan/ss/
39
45
  hysteria2/wireguard on transports, security, anti-DPI, mobile, battery.
40
46
  - **Recommends a stack** for a stated goal (anti-DPI in RU/IR/CN, low
@@ -51,13 +57,44 @@ merge helper.
51
57
  | `xray_search` | Full-text search over all cached docs. Returns ranked hits + snippets. |
52
58
  | `xray_validate_config` | Structural+schema validation of an xray JSON config (Zod under the hood). |
53
59
  | `xray_lint` | ~20 best-practice lint rules. Returns issues with severity, rule id, JSON-pointer. |
54
- | `xray_geo_search` | Substring search over the embedded geosite/geoip catalogue. |
60
+ | `xray_geo_search` | Substring search over the embedded geosite/geoip catalogue (~1500 tags). |
55
61
  | `xray_diff_protocols` | Side-by-side feature table for two protocols. |
56
62
  | `xray_suggest_alternative` | Recommend protocol+transport+security for a goal (anti-DPI / battery / latency / …). |
63
+ | `xray_generate_short_ids` | Cryptographically random REALITY shortIds (default `[4,8,16]` bytes, legacy empty prefix). |
64
+ | `xray_generate_reality_keypair` | Fresh REALITY X25519 keypair, base64url 43 chars — drop-in for `xray x25519`. |
65
+ | `xray_validate_sni_target` | Live TLS 1.3 + ALPN h2 + HTTP probe of a candidate REALITY target host. |
66
+ | `xray_suggest_sni_for_country` | Curated REALITY SNI/target hosts per exit-country (DE/PL/NL/FR/LV/SE/FI/US/UK/JP/SG/AU/CA). |
57
67
  | `xray_merge_configs` | Merge N xray configs with tag-collision resolution and conflict warnings. |
58
68
  | `xray_github_search` | Search issues/PRs/discussions across XTLS GitHub repos (Xray-core/REALITY/docs). |
59
69
  | `xray_github_fetch_issue` | Fetch one issue/PR/discussion with full body + top comments. |
60
- | `xray_refresh_cache` | Bulk re-fetch cached docs (`scope: all/stale/category`). Optional `discover` for new upstream slugs. |
70
+ | `xray_refresh_cache` | Bulk re-fetch cached docs (`scope: all/stale/category`). Optional `discover` for new upstream slugs. Optional `refresh_geocatalogue: true` to also re-pull the v2fly category list. |
71
+
72
+ Total: **16 tools**.
73
+
74
+ ### Quick toolbelt
75
+
76
+ Generate a REALITY keypair (server-side priv + client-side pub):
77
+
78
+ ```jsonc
79
+ // xray_generate_reality_keypair {}
80
+ {
81
+ "privateKey": "MNCibkT-h5bCF6iknJG0rJdHdfUjT7VugHgSX9BRWUY",
82
+ "publicKey": "ffvf0eNwnLhgK-axt3rajJIAoHKv0rX4xkw5KyImn38",
83
+ "note": "Server: paste privateKey into inbound realitySettings.privateKey. Clients: paste publicKey into outbound realitySettings.publicKey. Format matches `xray x25519` output exactly."
84
+ }
85
+ ```
86
+
87
+ Live-check a candidate REALITY SNI:
88
+
89
+ ```jsonc
90
+ // xray_validate_sni_target { "host": "www.onet.pl" }
91
+ {
92
+ "host": "www.onet.pl", "port": 443, "ok": true,
93
+ "tls_version": "TLSv1.3", "alpn": "h2", "http_status": 200,
94
+ "cert_subject": "www.onet.pl", "cert_san_count": 4,
95
+ "latency_ms": 312, "issues": []
96
+ }
97
+ ```
61
98
 
62
99
  It also exposes a single MCP **resource**: `xray://docs/index` — the raw
63
100
  `_index.json` of cached topics.
@@ -258,7 +295,7 @@ warning in the response.
258
295
 
259
296
  ## Roadmap
260
297
 
261
- See [ROADMAP.md](./ROADMAP.md). All v0.1–v0.10 milestones are checked off.
298
+ See [ROADMAP.md](./ROADMAP.md). All v0.1–v0.11 milestones are checked off.
262
299
 
263
300
  ## License
264
301
 
@@ -295,7 +332,12 @@ MCP-сервер, дающий LLM офлайн-доступ к официаль
295
332
  ALPN collisions, geo typo catcher, protocol × transport × security
296
333
  несовместимости, `xhttp.path` слеш, `geoip:private` block, sniffing на
297
334
  80/443 и т.д.
298
- - **Geo catalogue**: поиск по ~500 известным geoip/geosite тегам.
335
+ - **Geo catalogue**: поиск по ~1500 известным geoip/geosite тегам (полный
336
+ v2fly/domain-list-community каталог, гидратируется из `data/geocatalogue.json`).
337
+ - **REALITY toolbelt**: `xray_generate_reality_keypair` (drop-in замена
338
+ `xray x25519`), `xray_generate_short_ids` (криптослучайные, с empty-prefix
339
+ для легаси), `xray_validate_sni_target` (live TLS 1.3 + h2 проба),
340
+ `xray_suggest_sni_for_country` (курируемые REALITY-фронты по стране exit'а).
299
341
  - **Сравнение протоколов**: таблица vless/vmess/trojan/ss/hysteria2/
300
342
  wireguard по transports, security, anti-DPI, mobile, battery.
301
343
  - **Рекомендует стек** под цель (anti-DPI в РФ/Иране/КНР, low-latency,
@@ -312,13 +354,46 @@ MCP-сервер, дающий LLM офлайн-доступ к официаль
312
354
  | `xray_search` | Полнотекстовый поиск по докам. Хиты + сниппеты. |
313
355
  | `xray_validate_config` | Структурная валидация + Zod-схемы по протоколу/transport/security. |
314
356
  | `xray_lint` | ~20 правил best-practice. Issues с severity, rule id, JSON-pointer. |
315
- | `xray_geo_search` | Поиск по embedded каталогу geosite/geoip по подстроке. |
357
+ | `xray_geo_search` | Поиск по embedded каталогу geosite/geoip по подстроке (~1500 тегов). |
316
358
  | `xray_diff_protocols` | Side-by-side таблица фич двух протоколов. |
317
359
  | `xray_suggest_alternative` | Рекомендация protocol+transport+security под цель. |
360
+ | `xray_generate_short_ids` | Криптослучайные REALITY shortIds (default `[4,8,16]` байт, с empty-prefix для легаси). |
361
+ | `xray_generate_reality_keypair` | Свежая X25519 пара REALITY, base64url 43 chars — drop-in для `xray x25519`. |
362
+ | `xray_validate_sni_target` | Live проба TLS 1.3 + ALPN h2 + HTTP кандидата на REALITY target. |
363
+ | `xray_suggest_sni_for_country` | Курируемые REALITY-фронты по стране exit'а (DE/PL/NL/FR/LV/SE/FI/US/UK/JP/SG/AU/CA). |
318
364
  | `xray_merge_configs` | Слить N конфигов с разрешением коллизий тегов. |
319
365
  | `xray_github_search` | Поиск issues/PR/discussions по XTLS GitHub репозиториям. |
320
366
  | `xray_github_fetch_issue` | Получить одну issue/PR/discussion с полным body + топ комментариев. |
321
- | `xray_refresh_cache` | Bulk перезатяжка кеша доков (`scope: all/stale/category`). Опц. `discover` для новых slug'ов. |
367
+ | `xray_refresh_cache` | Bulk перезатяжка кеша доков (`scope: all/stale/category`). Опц. `discover` + `refresh_geocatalogue: true` (заодно перетянет v2fly категории). |
368
+
369
+ Всего: **16 тулов**.
370
+
371
+ ### Quick toolbelt
372
+
373
+ Сгенерить REALITY keypair (priv для сервера, pub для клиентов):
374
+
375
+ ```jsonc
376
+ // xray_generate_reality_keypair {}
377
+ {
378
+ "privateKey": "MNCibkT-h5bCF6iknJG0rJdHdfUjT7VugHgSX9BRWUY",
379
+ "publicKey": "ffvf0eNwnLhgK-axt3rajJIAoHKv0rX4xkw5KyImn38",
380
+ "note": "Format matches `xray x25519` output exactly."
381
+ }
382
+ ```
383
+
384
+ Live-проверить кандидата на REALITY SNI:
385
+
386
+ ```jsonc
387
+ // xray_validate_sni_target { "host": "www.onet.pl" }
388
+ {
389
+ "host": "www.onet.pl", "port": 443, "ok": true,
390
+ "tls_version": "TLSv1.3", "alpn": "h2", "http_status": 200,
391
+ "cert_subject": "www.onet.pl", "cert_san_count": 4,
392
+ "latency_ms": 312, "issues": []
393
+ }
394
+ ```
395
+
396
+ > ⚠️ Проба идёт с локальной машины, где запущен `mcp-xray-pilot`. Для решения «работает ли SNI из РФ» — гоняй с РФ-IP отдельно.
322
397
 
323
398
  Также один MCP **ресурс**: `xray://docs/index`.
324
399
 
@@ -500,7 +575,7 @@ $env:GITHUB_TOKEN = "ghp_xxx" # PowerShell
500
575
 
501
576
  ## Roadmap
502
577
 
503
- См. [ROADMAP.md](./ROADMAP.md) — все вехи v0.1–v0.10 закрыты.
578
+ См. [ROADMAP.md](./ROADMAP.md) — все вехи v0.1–v0.11 закрыты.
504
579
 
505
580
  ## Лицензия
506
581