К содержимому
INCY
Назад

Add Iran-v2ray-rules support: selectable geo asset provider + "Bypass Iran" routing preset (like v2rayNG)

ИдеяОткрытПубличный
Автор: b**************************@passmail.net
Продукт: Приложение INCY
Создан: 02.09.2026, 20:58:22
All traffic — including Iranian domains/IPs — currently tunnels through the proxy, with no in-app way to bypass it besides manually editing routing JSON. This adds unnecessary latency/load for domestic traffic. Users should be able to route known Iranian domains/IPs direct, configured via the UI.

REFERENCE IMPLEMENTATION
Chocolate4U (maintainer of Iran-v2ray-rules) built this into v2rayNG — see 2dust/v2rayNG issue #2517 (github.com/2dust/v2rayNG/issues/2517). Key commits:

d2186a4 — selectable Geo Assets Provider (Official v2fly/geoip + domain-list-community default, Loyalsoldier, or Chocolate4U/Iran-v2ray-rules), downloaded in-app
192ea41 — predefined routing presets: "Bypass Iran address then proxy" and "Bypassing LAN and Iran address then proxy"
43b8eeb — makes domestic DNS (expectIPs) and routing follow the active provider/preset instead of being hardcoded to China (geoip:cn) — a recurring bug for Iranian users (issues #1865, #2198, #2265)
9051858 — allows geo file download/update without an active proxy connection first

PROPOSED SOLUTION FOR INCY

Geo Assets Provider setting (Settings > Routing/Assets): choose source for geosite.dat/geoip.dat — Official (default) or Chocolate4U/Iran-v2ray-rules (adds geosite:ir, geoip:ir, optional ad/malware/phishing lists); optionally a custom URL field. Downloads/updates happen in-app.
"Bypass Iran" routing preset: picker with at least Direct (current behavior), Bypass Iran (geosite:ir + geoip:ir go direct, everything else goes through proxy), and Bypass LAN + Iran (adds geoip:private going direct). Selecting a preset auto-populates rules equivalent to:
outboundTag "direct", domain ["geosite:ir"], type "field"
outboundTag "direct", ip ["geoip:ir"], type "field"
Provider-aware domestic DNS: when an Iran provider/preset is active, domestic DNS should resolve via geoip:ir, not a hardcoded geoip:cn.
Geo downloads without an active proxy: allow fetching/updating geo files before connecting; only prompt to connect if the default URL is unreachable directly.

TASKS

Add Geo Assets Provider setting (Official + Chocolate4U, minimum)
In-app download/update of geo files per provider
Add "Bypass Iran" and "Bypass LAN + Iran" presets
Make domestic DNS follow active provider/preset
Allow geo file download/update without active proxy
Periodic auto-refresh of geo files (about every 24h)

ACCEPTANCE CRITERIA

Provider switchable from Settings; files auto-download
"Bypass Iran" routes known Iranian domains/IPs direct with no manual JSON
All other traffic still routes through proxy
Domestic DNS resolves via geoip:ir when active
Geo files downloadable before any proxy connection

NOTES

Targets v2ray-core/Xray-core formats; if INCY uses sing-box or Clash/Clash.Meta, same UX applies but use Iran Sing-Box Rules (github.com/Chocolate4U/Iran-sing-box-rules) or Iran Clash Rules (github.com/Chocolate4U/Iran-clash-rules) instead.
Iran-v2ray-rules itself is GPLv3; upstream sources have mixed licenses (mostly MIT/CC0/CC-BY-SA, some "all rights reserved" CDN IP lists) — check before bundling .dat files.
Комментарии (0)

Пока нет комментариев

Добавить комментарий