feat(geodata): make geoip.dat/geosite.dat optional + on-demand download
The ~25 MB geo data files are no longer a hard dependency (critical on small-flash routers). The plugin works without them; the generator strips geosite:/geoip: matchers from routing rules and the dns object when the data is absent so the config stays valid and deterministic. Users download them on demand — only when there is disk to spare — and remove them to reclaim flash. - xrayctl/geodata.go: `geodata status|download|remove`; free-space check via `df -k`; opkg/apk install of v2ray-geoip/v2ray-geosite + asset-dir symlinks; errors reported in-band (JSON `error`) for the UI. - generate.go/dns.go: builder.geoOK = geoAssetPresent(); geoOK threaded into dnsRender; geoStrip() drops geo matchers when absent. - LuCI: geodata panel on the Lists page (presence, sizes, free/need, Download/ Remove buttons gated on free space); ubus geodata_status/download/remove + acl. - tests: TestGeoStrip, TestDNSRenderGeoOptional, TestBuildConfigStripsGeoWhenAbsent. Verified live on the 512M VM: status reports present+sizes+free; xray 25.1.30 starts without geodata (lazy-load); ubus wiring returns correct JSON. r8. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ef1c563293
commit
146ae252cc
12 files changed
+520
-17
No files matched your search
@@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=shater-core
|
||||
PKG_VERSION:=0.1.0
|
||||
PKG_RELEASE:=7
|
||||
PKG_RELEASE:=8
|
||||
|
||||
PKG_MAINTAINER:=Shater <maqrota@icloud.com>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
|
||||
Reference in new issue
Block a user