diff options
| author | Thibaut VARÈNE <hacks@slashdirt.org> | 2023-11-28 16:47:36 +0100 |
|---|---|---|
| committer | Tianling Shen <cnsztl@immortalwrt.org> | 2023-12-05 19:05:27 +0800 |
| commit | d83ed18f8d78ea257a2177177ca16b3745bab722 (patch) | |
| tree | 58766ee0e64b1e9e5e0874fe45182401fda25223 | |
| parent | d3ee258616533163478f435afd130bd9f0d66956 (diff) | |
uspot: add package
uspot is an OpenWrt-native captive portal system.
It leverages existing OpenWrt tools such as uhttpd, dnsmasq, firewall4,
ucode, without needing any external kernel module.
It can achieve the maximum performance allowed by nftables (flow
offloading works).
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(cherry picked from commit e6e8e58ae0ca981a2301f8951f6416be3b74fbe5)
| -rw-r--r-- | net/uspot/Makefile | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/net/uspot/Makefile b/net/uspot/Makefile new file mode 100644 index 000000000..9d6dd6485 --- /dev/null +++ b/net/uspot/Makefile @@ -0,0 +1,96 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=uspot +PKG_RELEASE:=1 + +PKG_LICENSE:=GPL-2.0 +PKG_MAINTAINER:=Thibaut VARÈNE <hacks@slashdirt.org> + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/f00b4r0/uspot.git +PKG_SOURCE_DATE:=2023-11-30 +PKG_SOURCE_VERSION:=7e1e21b0f8425205d719b99a392fa893b3e512e6 +PKG_MIRROR_HASH:=494c616159b16d978fe00348ebe50c77a48f1db98d624ed613f3cca2d39e3a6e + +CMAKE_SOURCE_SUBDIR:=src + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/uspot + SUBMENU:=Captive Portals + SECTION:=net + CATEGORY:=Network + TITLE:=uspot hotspot daemon + DEPENDS:=+conntrack \ + +libblobmsg-json +liblucihttp-ucode +libradcli +libubox +libubus +libuci \ + +spotfilter \ + +ucode +ucode-mod-math +ucode-mod-nl80211 +ucode-mod-rtnl +uhttpd-mod-ucode +ucode-mod-uloop + +endef + +define Package/uspot/description + This package implements a captive portal supporting click-to-continue, + simple credential-based as well as RADIUS authentication. + It is UAM capable, and has limited support for RFC5176 + RADIUS Dynamic Authorization Extensions. + It is meant to be a drop-in replacement for CoovaChilli, + leveraging the performance and flexibility of the nftables firewall + without the need for extra kernel modules. +endef + +define Package/uspot/conffiles +/etc/config/uspot +endef + +define Package/uspot-www + SUBMENU:=Captive Portals + SECTION:=net + CATEGORY:=Network + TITLE:=uspot default user interface files + DEPENDS:=+uspot +endef + +define Package/uspot-www/description + This package provides CSS and HTML templates for uspot UI. + This package must be installed with uspot unless a local alternative is provided. +endef + +define Package/uspotfilter + SECTION:=net + CATEGORY:=Network + TITLE:=uspot implementation of spotfilter + PROVIDES:=spotfilter + CONFLICTS:=spotfilter + DEPENDS:=+conntrack +nftables-json +ucode +ucode-mod-rtnl +ucode-mod-uloop +endef + +define Package/uspotfilter/description + This package provides the nftables firewall interface to spotfilter. + It is compatible with firewall4. +endef + +define Package/uspot/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share $(1)/usr/lib/ucode $(1)/etc/init.d $(1)/etc/config + $(INSTALL_BIN) $(PKG_BUILD_DIR)/radius-client $(1)/usr/bin/radius-client + $(INSTALL_BIN) $(PKG_BUILD_DIR)/uspot-das $(1)/usr/bin/uspot-das + $(INSTALL_DATA) $(PKG_BUILD_DIR)/libuam.so $(1)/usr/lib/ucode/uam.so + $(INSTALL_CONF) $(PKG_BUILD_DIR)/files/etc/config/uspot $(1)/etc/config/uspot + $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/init.d/uspot $(1)/etc/init.d/uspot + $(CP) $(PKG_BUILD_DIR)/files/usr/bin $(1)/usr/ + $(CP) $(PKG_BUILD_DIR)/files/usr/share/uspot $(1)/usr/share/ +endef + +define Package/uspot-www/install + $(CP) $(PKG_BUILD_DIR)/files/www-uspot $(1)/ +endef + +define Package/uspotfilter/install + $(INSTALL_DIR) $(1)/usr/share $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/init.d/spotfilter $(1)/etc/init.d/spotfilter + $(CP) $(PKG_BUILD_DIR)/files/usr/share/uspotfilter $(1)/usr/share/ +endef + +$(eval $(call BuildPackage,uspot)) +$(eval $(call BuildPackage,uspot-www)) +$(eval $(call BuildPackage,uspotfilter)) |
