Files
shater/shater-core/Makefile
T
omarandClaude Opus 4.8 ef1c563293
build / aarch64_cortex-a53 (push) Successful in 3m0s
build / x86_64 (push) Successful in 4m4s
docs(status): full 05-feature-catalog verification matrix; bump to r7
Records live-VM proof for EVERY MVP/T1 catalog item (nodes/subs/HAPP/hwid, all six
balancer strategies, chains, full rule matcher set incl. MAC/iface/geosite/geoip,
egress iface/tunnel/proxy, lists, DNS DoH/FakeIP/nftset/hijack/DoT-block/IPv6,
reliability commit-confirm/rollback/watchdog/kill-switch/hotplug, per-client &
per-rule stats, LuCI CRUD via Playwright, CI both arches, feed install+upgrade).
Two bugs found & fixed during the sweep (balancer observatory; group probe_url
override). PKG_RELEASE -> 7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 14:27:07 +03:00

83 lines
2.9 KiB
Makefile

#
# shater-core — data-plane glue for the Shater transparent-proxy stack.
#
# Ships the "железно" (rock-solid) static layer that the Go control-plane
# (xrayctl) and the LuCI app sit on: the procd init that supervises the stock
# xray binary against xrayctl's generated /etc/xray/run.json, the hotplug hook
# that re-persists policy routing, the sysctl knobs TPROXY needs, a minimal
# inert UCI default, and one-time rt_tables seeding.
#
# Pure scripts + config => PKGARCH:=all. Nothing is compiled here.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=shater-core
PKG_VERSION:=0.1.0
PKG_RELEASE:=7
PKG_MAINTAINER:=Shater <maqrota@icloud.com>
PKG_LICENSE:=GPL-2.0-or-later
include $(INCLUDE_DIR)/package.mk
define Package/shater-core
SECTION:=net
CATEGORY:=Network
TITLE:=Shater transparent-proxy data-plane glue
URL:=https://github.com/shater
# xrayctl : control-plane (gen/test/apply/reconcile) invoked by our init/hotplug
# xray-core: the /usr/bin/xray engine our init supervises
# dnsmasq-full: nftset= support for domain-based routing sets
# kmod-nft-tproxy + kmod-nft-socket: kernel TPROXY (xrayctl emits the rules)
# ip-full : `ip rule`/`ip route`/rt_tables for policy routing
DEPENDS:=+xrayctl +xray-core +dnsmasq-full +kmod-nft-tproxy +kmod-nft-socket +ip-full
PKGARCH:=all
endef
define Package/shater-core/description
Static data-plane glue for the Shater xray-based transparent proxy: procd
init (supervises xray on xrayctl-generated /etc/xray/run.json and reconciles
policy routing / our nft table `inet shater`), an ifup/ifdown hotplug hook
that re-persists ip rules & routes, TPROXY sysctl settings, a minimal inert
UCI default (globals disabled until configured), and idempotent first-boot
setup. Designed to never break connectivity: fully inert until explicitly
enabled and a generated runtime config exists.
endef
# /etc/config/shater is user-editable desired state -> preserve on upgrade.
define Package/shater-core/conffiles
/etc/config/shater
endef
# Nothing to fetch or build.
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Compile
endef
define Package/shater-core/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/shater $(1)/etc/init.d/shater
$(INSTALL_BIN) ./files/etc/init.d/shater-cron $(1)/etc/init.d/shater-cron
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/99-shater $(1)/etc/hotplug.d/iface/99-shater
$(INSTALL_DIR) $(1)/etc/sysctl.d
$(INSTALL_DATA) ./files/etc/sysctl.d/99-shater.conf $(1)/etc/sysctl.d/99-shater.conf
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/etc/config/shater $(1)/etc/config/shater
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/etc/uci-defaults/30_shater-core $(1)/etc/uci-defaults/30_shater-core
$(INSTALL_DIR) $(1)/usr/share/shater
$(INSTALL_DATA) ./files/usr/share/shater/README $(1)/usr/share/shater/README
endef
$(eval $(call BuildPackage,shater-core))