secubox-openwrt/package/secubox/secubox-app-tor/Makefile
CyberMind-FR 0c54940010 fix(tor-shield): Multiple bug fixes for control socket and startup
- Fix subshell bug in get_circuits (pipe loses JSON state)
- Add has_control flag to status for frontend awareness
- Fix UseBridges without bridge lines causing Tor to fail
- Fix hidden service directory ownership (tor:tor)
- Change log output from file to syslog
- Fix run directory ownership and permissions (700)
- Add CookieAuthentication for control socket auth
- Use socat instead of nc (BusyBox lacks Unix socket support)
- Add socat as package dependency
- Optimize duplicate curl calls in status check
- Use fallback IP services for real_ip detection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:05:18 +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 +socat
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))