Skip to content

romanilyin/ipregion-openwrt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPRegion for OpenWrt logo

IPRegion for OpenWrt

Route, region, CDN and AI endpoint diagnostics for OpenWrt routers.

English | Русский | Development | Разработка | Releases

CI

OpenWrt CLI LuCI APK packages IPK packages

IPRegion is an OpenWrt CLI and LuCI app for checking how GeoIP APIs, popular services, CDN endpoints and AI providers see your router route, interface or SOCKS5 proxy.

Validated runtime targets: OpenWrt 25.12.1+ with apk, and OpenWrt 24.10.6 with opkg.

What It Does

IPRegion runs diagnostics from the router itself and compares independent service results in one UI and JSON output.

  • GeoIP checks show what country public geolocation APIs assign to the route.
  • Popular service checks show region, access, rate-limit or denial signals from major platforms.
  • CDN checks show which CDN edge or region the router reaches.
  • AI checks probe real AI API endpoint domains in safe unauthenticated mode.
  • Checks can use the default route, a selected OpenWrt interface or a SOCKS5 proxy.

Packages:

  • ipregion: CLI/backend diagnostics implemented in ucode.
  • luci-app-ipregion: LuCI UI under Status -> IP Region.
  • luci-i18n-ipregion-ru: Russian LuCI translation.

The release ipregion, luci-app-ipregion and luci-i18n-ipregion-ru packages are noarch. APK assets are for OpenWrt 25.12.1+; IPK assets are for OpenWrt 24.10.*.

Screenshots

IPRegion LuCI status overview GeoIP direct check results
Popular service route checks CDN route checks
AI provider checks

Install APK

Run on an OpenWrt 25.12.1+ router:

wget -qO- https://raw.githubusercontent.com/romanilyin/ipregion-openwrt/main/install.sh | sh

The installer downloads ipregion*.apk, luci-app-ipregion*.apk and luci-i18n-ipregion-ru*.apk from the latest GitHub Release and installs them with apk.

APK installer options:

  • IPREGION_RELEASE=2026.5.28-1: install a specific GitHub release tag instead of latest.
  • IPREGION_INSTALL_LUCI=0: install only the CLI/backend package.
  • IPREGION_APK_UPDATE=0: skip apk update before installation.
  • IPREGION_DOWNLOAD_RETRIES=5: retry GitHub metadata and APK downloads more times.

Pinned release example:

wget -qO- https://raw.githubusercontent.com/romanilyin/ipregion-openwrt/main/install.sh | IPREGION_RELEASE=2026.5.28-1 sh

Manual install from downloaded APK files:

apk add --allow-untrusted ./ipregion-*.apk ./luci-app-ipregion-*.apk ./luci-i18n-ipregion-ru-*.apk

Install IPK

Run on an OpenWrt 24.10.* router:

wget -qO- https://raw.githubusercontent.com/romanilyin/ipregion-openwrt/main/install-ipk.sh | sh

The IPK installer downloads ipregion*.ipk, luci-app-ipregion*.ipk and luci-i18n-ipregion-ru*.ipk from the latest GitHub Release and installs them with opkg. It is separate from the APK installer to avoid mixing OpenWrt package managers.

Manual install from downloaded IPK files:

opkg install ./ipregion*.ipk ./luci-app-ipregion*.ipk ./luci-i18n-ipregion-ru*.ipk

LuCI

Open Status -> IP Region in LuCI.

  • Run GeoIP, popular service, CDN and AI endpoint checks from one page.
  • Choose IP mode, interface, SOCKS5 proxy, timeout and GeoIP mode.
  • Configure the saved SOCKS5 proxy in Services -> IP Region, then select it on the Status page.
  • Set a reference country to highlight matching country values in orange and different country values in blue.
  • AI checks show separate IPv4 and IPv6 provider rows when IPv4 and IPv6 mode is selected; unavailable transports are shown explicitly.
  • View progress while checks run.
  • Download JSON results. JSON downloads include raw IP addresses.
  • Update the package from GitHub Releases through the version card; downgrade protection prevents installing an older latest release.
  • Open Services -> IP Region for default UCI settings.

CLI Examples

ipregion --help
ipregion --list-services --json
ipregion --self-test --json
ipregion --group primary --ipv4 --json
ipregion --group custom --ipv4 --json
ipregion --group cdn --ipv4 --json
ipregion --group primary --geoip-mode route --json
ipregion --interface wan --group primary --json
ipregion --proxy 127.0.0.1:1080 --proxy-dns remote --group custom --json
ipregion ai --json
ipregion ai --provider google_gemini --json

Check Modes

  • --group all: run every enabled GeoIP, popular service and CDN check.
  • --group primary: GeoIP services.
  • --group custom: popular services.
  • --group cdn: CDN services.
  • --geoip-mode lookup: discover the router egress IP first, then ask GeoIP APIs to look up that IP.
  • --geoip-mode route: ask supported GeoIP APIs what country they see for the request itself.
  • ipregion ai --json: run safe AI provider endpoint probes without storing or requesting API keys.
  • ipregion ai --ip-mode both --json: run each selected AI provider through separate IPv4 and IPv6 probes.

For SOCKS5 proxy checks:

  • --proxy-dns remote uses socks5h://.
  • --proxy-dns local uses socks5://.

Notes

  • 401, 403, 404, 405 and 429 in AI mode can still mean that the provider endpoint was reached; DNS, TLS, timeout and network failures are classified separately.
  • With domain-based split routing, a generic egress IP check can differ from the route used by a specific service or AI endpoint domain.
  • For policy-routing setups, a local SOCKS5 endpoint that already exits through the intended tunnel is usually the most reliable diagnostic target.

Privacy And Scope

Diagnostics contact third-party GeoIP, streaming, CDN and AI endpoints. Those services receive the router's public IP for each check.

Runtime state, results and logs stay local under /tmp/run/ipregion/.

IPRegion is diagnostics-only. It does not add or change firewall, nftables, mwan3, podkop, WARP or routing rules.

Attribution

Inspired by and service-compatible with vernette/ipregion, but rewritten as an OpenWrt-native ucode backend and LuCI application.

About

Route, region, CDN and AI endpoint diagnostics for OpenWrt routers.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors