secubox-openwrt/package/secubox/secubox-app-tor/Makefile
CyberMind-FR 23dac58741 feat(tor): Add Tor Shield packages for OpenWrt
Add secubox-app-tor (backend) and luci-app-tor-shield (frontend) packages
for Tor anonymization on OpenWrt.

Backend features:
- UCI configuration with presets (anonymous, selective, censored)
- procd init script with iptables transparent proxy
- torctl CLI tool for status, enable/disable, circuits, leak-test
- DNS over Tor and kill switch support
- Hidden services and bridge management

Frontend features:
- Modern purple/onion themed dashboard
- One-click master toggle with visual status
- Real-time circuit visualization (Guard -> Middle -> Exit)
- Hidden services (.onion) management with copy/QR
- Bridge configuration (obfs4, snowflake, meek-azure)
- Leak detection tests
- Advanced settings for ports and exit node restrictions

Note: LuCI package renamed to luci-app-tor-shield to avoid conflict
with existing luci-app-tor package in OpenWrt LuCI feeds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:20:13 +01:00

79 lines
1.8 KiB
Makefile

# SPDX-License-Identifier: MIT
#
# Copyright (C) 2025 CyberMind.fr
#
# SecuBox Tor Shield - Tor anonymization for OpenWrt
include $(TOPDIR)/rules.mk
PKG_NAME:=secubox-app-tor
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_ARCH:=all
PKG_MAINTAINER:=CyberMind Studio <contact@cybermind.fr>
PKG_LICENSE:=MIT
include $(INCLUDE_DIR)/package.mk
define Package/secubox-app-tor
SECTION:=utils
CATEGORY:=Utilities
PKGARCH:=all
SUBMENU:=SecuBox Apps
TITLE:=SecuBox Tor Shield
DEPENDS:=+tor +tor-geoip +iptables +curl +jsonfilter
endef
define Package/secubox-app-tor/description
SecuBox Tor Shield - One-click Tor anonymization for OpenWrt
Features:
- Transparent proxy mode (route all traffic through Tor)
- SOCKS proxy mode (selective app routing)
- DNS over Tor (prevent DNS leaks)
- Kill switch (block non-Tor traffic)
- Hidden services (.onion) management
- Bridge support (obfs4, snowflake) for censored networks
- Circuit visualization and identity management
Configure in /etc/config/tor-shield.
endef
define Package/secubox-app-tor/conffiles
/etc/config/tor-shield
endef
define Build/Compile
endef
define Package/secubox-app-tor/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/etc/config/tor-shield $(1)/etc/config/tor-shield
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/tor-shield $(1)/etc/init.d/tor-shield
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/usr/sbin/torctl $(1)/usr/sbin/torctl
endef
define Package/secubox-app-tor/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
echo ""
echo "SecuBox Tor Shield installed."
echo ""
echo "Enable Tor Shield:"
echo " torctl enable"
echo " /etc/init.d/tor-shield start"
echo ""
echo "Check status:"
echo " torctl status"
echo ""
}
exit 0
endef
$(eval $(call BuildPackage,secubox-app-tor))