Merge Mainline
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
dee4f72e1a
@ -1,74 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=open-app-filter
|
||||
PKG_VERSION:=5.0.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/destan19/OpenAppFilter.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-03-08
|
||||
PKG_SOURCE_VERSION:=59aa2a1f40ebee65e48c7fd5d28d6c2706e60145
|
||||
PKG_MIRROR_HASH:=a969d5a5c16e418844a63fc6d23facb5ad0327d0bcadc72814bbecc2f9c4a099
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
RSTRIP:=:
|
||||
|
||||
define KernelPackage/oaf
|
||||
SECTION:=Kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Netfilter Extensions
|
||||
TITLE:=open app filter kernel module
|
||||
FILES:=$(PKG_BUILD_DIR)/oaf.ko
|
||||
DEPENDS:=+kmod-ipt-conntrack
|
||||
AUTOLOAD:=$(call AutoLoad,0,oaf)
|
||||
endef
|
||||
|
||||
define KernelPackage/oaf/description
|
||||
open appfilter kernel module
|
||||
endef
|
||||
|
||||
define Package/appfilter
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+libblobmsg-json +libjson-c +libpthread +libubox +libubus +libuci +kmod-oaf
|
||||
TITLE:=App filter userspace module
|
||||
endef
|
||||
|
||||
MAKE_OPTS:= \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
||||
$(EXTRA_KCONFIG)
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default)
|
||||
$(CP) $(PKG_BUILD_DIR)/oaf/src/* $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C "$(LINUX_DIR)" \
|
||||
$(MAKE_OPTS) \
|
||||
modules
|
||||
endef
|
||||
|
||||
define Package/appfilter/conffiles
|
||||
/etc/config/appfilter
|
||||
endef
|
||||
|
||||
define Package/appfilter/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/open-app-filter/files/appfilter.sh $(1)/usr/bin/appfilter.sh
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/open-app-filter/files/gen_class.sh $(1)/usr/bin/gen_class.sh
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/open-app-filter/files/appfilter.lua $(1)/usr/bin/appfilter
|
||||
$(INSTALL_DIR) $(1)/etc/appfilter
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/open-app-filter/files/feature.cfg $(1)/etc/appfilter/feature.cfg
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/open-app-filter/files/appfilter.config $(1)/etc/config/appfilter
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/open-app-filter/files/appfilter.init $(1)/etc/init.d/appfilter
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,oaf))
|
||||
$(eval $(call BuildPackage,appfilter))
|
||||
@ -1,59 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt
|
||||
# <https://immortalwrt.org>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=phicomm-k3screenctrl
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/lwz322/k3screenctrl.git
|
||||
PKG_SOURCE_DATE:=2020-09-18
|
||||
PKG_SOURCE_VERSION:=d8896cfad4bdf39f58999f9420807f986300bada
|
||||
PKG_MIRROR_HASH:=9eab074f5ac366013d394be2c57905a8585439d1ca2a8b602a09a098a8aa8fb7
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
PKG_MAINTAINER:=Hamster Tian <haotia@gmail.com>
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TARGET_CFLAGS+= -D_GNU_SOURCE
|
||||
|
||||
define Package/phicomm-k3screenctrl
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=@TARGET_bcm53xx_generic_DEVICE_phicomm-k3 +@KERNEL_DEVMEM +@BUSYBOX_CONFIG_ARPING +bc +bash +curl +coreutils +coreutils-od +jq
|
||||
TITLE:=LCD screen controller on PHICOMM K3
|
||||
URL:=https://github.com/lwz322/k3screenctrl.git
|
||||
endef
|
||||
|
||||
define Package/phicomm-k3screenctrl/description
|
||||
K3 Screen Controller (k3screenctrl) is a program utilizing
|
||||
the LCD screen on PHICOMM K3 to display some stats.
|
||||
endef
|
||||
|
||||
define Package/phicomm-k3screenctrl/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/k3screenctrl $(1)/usr/bin/k3screenctrl
|
||||
|
||||
$(INSTALL_DIR) $(1)/lib/k3screenctrl $(1)/lib/k3screenctrl/oui
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/*.sh $(1)/lib/k3screenctrl/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/oui.txt $(1)/lib/k3screenctrl/oui/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
|
||||
$(INSTALL_CONF) $(CURDIR)/files/k3screenctrl.config $(1)/etc/config/k3screenctrl
|
||||
$(INSTALL_BIN) $(CURDIR)/files/k3screenctrl.init $(1)/etc/init.d/k3screenctrl
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,phicomm-k3screenctrl))
|
||||
@ -1,9 +0,0 @@
|
||||
|
||||
config general
|
||||
option screen_time '30'
|
||||
option refresh_time '2'
|
||||
option pawd_hide '1'
|
||||
option psk_hide '1'
|
||||
option showmore '1'
|
||||
option city_checkip '0'
|
||||
option update_time '0'
|
||||
@ -1,19 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=99
|
||||
|
||||
SCRIPTS_BASE=/lib/k3screenctrl/
|
||||
TEMP_DIR=/tmp/k3screenctrl
|
||||
|
||||
start() {
|
||||
mkdir -p $TEMP_DIR
|
||||
mkdir -p $TEMP_DIR/device_speed
|
||||
m=$(uci get k3screenctrl.@general[0].screen_time) && [ $m -lt 10 ] && m=10
|
||||
d=$(uci get k3screenctrl.@general[0].refresh_time) && [ $d -lt 1 ] && d=1
|
||||
/usr/bin/k3screenctrl -m $m -d $d &
|
||||
}
|
||||
|
||||
stop() {
|
||||
killall k3screenctrl
|
||||
}
|
||||
@ -10,7 +10,7 @@ LUCI_TITLE:=n2n_v2 VPN Configuration module
|
||||
LUCI_DEPENDS:=+n2n-edge +n2n-supernode
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=2.8.1
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
||||
@ -60,10 +60,20 @@ mtu.optional = false
|
||||
supernode = s:option(Value, "supernode", translate("Supernode Host"))
|
||||
supernode.datatype = "host"
|
||||
supernode.optional = false
|
||||
supernode.rmempty = false
|
||||
|
||||
port = s:option(Value, "port", translate("Supernode Port"))
|
||||
port.datatype = "port"
|
||||
port.optional = false
|
||||
port.rmempty = false
|
||||
|
||||
second_supernode = s:option(Value, "second_supernode", translate("Second Supernode Host"))
|
||||
second_supernode.datatype = "host"
|
||||
second_supernode.optional = false
|
||||
|
||||
second_port = s:option(Value, "second_port", translate("Second Supernode Port"))
|
||||
second_port.datatype = "port"
|
||||
second_port.optional = false
|
||||
|
||||
community = s:option(Value, "community", translate("N2N Community name"))
|
||||
community.optional = false
|
||||
|
||||
@ -35,6 +35,9 @@ msgstr "接口子网掩码"
|
||||
msgid "Supernode Host"
|
||||
msgstr "Supernode节点地址"
|
||||
|
||||
msgid "Second Supernode Host"
|
||||
msgstr "第二Supernode节点地址"
|
||||
|
||||
msgid "N2N Community name"
|
||||
msgstr "N2N网络组名称"
|
||||
|
||||
@ -50,6 +53,9 @@ msgstr "端口"
|
||||
msgid "Supernode Port"
|
||||
msgstr "Supernode节点端口"
|
||||
|
||||
msgid "Second Supernode Port"
|
||||
msgstr "第二Supernode节点端口"
|
||||
|
||||
msgid "Encryption key"
|
||||
msgstr "加密密钥"
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=n2n
|
||||
PKG_VERSION:=2.8
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ntop/n2n/tar.gz/$(PKG_VERSION)?
|
||||
|
||||
@ -19,26 +19,30 @@ start_instance() {
|
||||
config_get mtu "$cfg" 'mtu'
|
||||
config_get supernode "$cfg" 'supernode'
|
||||
config_get port "$cfg" 'port'
|
||||
config_get second_supernode "$cfg" 'second_supernode'
|
||||
config_get second_port "$cfg" 'second_port'
|
||||
config_get community "$cfg" 'community'
|
||||
config_get key "$cfg" 'key'
|
||||
config_get_bool route "$cfg" 'route' '0'
|
||||
address="$ipaddr"
|
||||
supernode_bak=""
|
||||
[ "$second_supernode" -a "$second_port" ] && supernode_bak=" -l ${second_supernode}:${second_port}"
|
||||
[ "$route" = "1" ] && args='-r'
|
||||
[ "$mode" = 'dhcp' ] && address='0.0.0.0'
|
||||
[ "-$mtu" != "-" ] && mtu="-M $mtu"
|
||||
eval "$(ipcalc.sh "$ipaddr/$prefix")"
|
||||
netmask="$NETMASK"
|
||||
/usr/bin/edge -u 0 -g 0 -d $tunname -a ${mode}:${address} -s $netmask -c $community $([ -n "$key" ] && echo -k $key) -l ${supernode}:${port} $args $mtu
|
||||
sleep 1
|
||||
iptables -I FORWARD -i "$tunname" -j ACCEPT
|
||||
iptables -I FORWARD -o "$tunname" -j ACCEPT
|
||||
iptables -t nat -I POSTROUTING -o "$tunname" -j MASQUERADE
|
||||
/usr/bin/edge -u 0 -g 0 -d $tunname -a ${mode}:${address} -s $netmask -c $community $([ -n "$key" ] && echo -k $key) -l ${supernode}:${port}$supernode_bak $args $mtu
|
||||
iptables -I FORWARD -i "$tunname" -j ACCEPT -m comment --comment 'n2n edge eth'
|
||||
iptables -I FORWARD -o "$tunname" -j ACCEPT -m comment --comment 'n2n edge eth'
|
||||
iptables -t nat -I POSTROUTING -o "$tunname" -j MASQUERADE -m comment --comment 'n2n edge net'
|
||||
;;
|
||||
supernode)
|
||||
config_get_bool enabled "$cfg" 'enabled' '0'
|
||||
[ "$enabled" = "0" ] && return 1
|
||||
config_get port "$cfg" port
|
||||
config_get port "$cfg" 'port'
|
||||
/usr/bin/supernode -l $port &
|
||||
iptables -I INPUT -p udp --dport $port -j ACCEPT -m comment --comment 'n2n supernode port'
|
||||
;;
|
||||
route)
|
||||
config_get_bool enabled "$cfg" 'enabled' '0'
|
||||
@ -59,13 +63,15 @@ stop_instance() {
|
||||
case "$type" in
|
||||
edge)
|
||||
config_get tunname "$cfg" 'tunname'
|
||||
iptables -D FORWARD -i "$tunname" -j ACCEPT 2>/dev/null
|
||||
iptables -D FORWARD -o "$tunname" -j ACCEPT 2>/dev/null
|
||||
iptables -t nat -D POSTROUTING -o "$tunname" -j MASQUERADE 2>/dev/null
|
||||
iptables -D FORWARD -i "$tunname" -j ACCEPT -m comment --comment 'n2n edge eth' 2>/dev/null
|
||||
iptables -D FORWARD -o "$tunname" -j ACCEPT -m comment --comment 'n2n edge eth' 2>/dev/null
|
||||
iptables -t nat -D POSTROUTING -o "$tunname" -j MASQUERADE -m comment --comment 'n2n edge net' 2>/dev/null
|
||||
killall -9 edge
|
||||
;;
|
||||
supernode)
|
||||
killall -9 supernode
|
||||
config_get port "$cfg" 'port'
|
||||
iptables -D INPUT -p udp --dport $port -j ACCEPT -m comment --comment 'n2n supernode port' 2>/dev/null
|
||||
ps | grep supernode | grep -v grep 2>&1 >/dev/null && killall -9 supernode
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@ -81,5 +87,5 @@ start() {
|
||||
stop() {
|
||||
config_load 'n2n_v2'
|
||||
config_foreach stop_instance 'edge'
|
||||
ps | grep supernode | grep -v grep 2>&1 >/dev/null && killall -9 supernode
|
||||
config_foreach stop_instance 'supernode'
|
||||
}
|
||||
|
||||
@ -13,9 +13,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall3.git
|
||||
PKG_SOURCE_DATE:=2021-03-23
|
||||
PKG_SOURCE_VERSION:=61db17edddb1f05e8107f0dbef6f7d060ce67483
|
||||
PKG_MIRROR_HASH:=b2eb09816640e14e2dae21fb54ea05c33858fe0004844fe8d99e541a2e19e9c0
|
||||
PKG_SOURCE_DATE:=2021-03-29
|
||||
PKG_SOURCE_VERSION:=a4355a6faea2c4d59c90cd52851fa9aab4ccee5c
|
||||
PKG_MIRROR_HASH:=747db79b11010bbfb708aae1793857c8d959d9270c7392f8c78d2d2110cf2fe7
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
|
||||
@ -9,9 +9,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git
|
||||
PKG_SOURCE_DATE:=2021-03-19
|
||||
PKG_SOURCE_VERSION:=59dbb982b7fefa480196dec03ba51c4f8c4dd7ae
|
||||
PKG_MIRROR_HASH:=3f37bea16fa553539d820cc49be92e23d3e1fd9b52db57dcbd06e78070044930
|
||||
PKG_SOURCE_DATE:=2021-03-31
|
||||
PKG_SOURCE_VERSION:=29fba840201287b9265888adba6298779b750af5
|
||||
PKG_MIRROR_HASH:=1d26a611aeecdf37f09e4cdee6b192e5da087abf6e0fc7a9ca97a80e58d14222
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
|
||||
PKG_SOURCE_DATE:=2021-03-29
|
||||
PKG_SOURCE_VERSION:=aa9621db401e881ffcdea03be272c94149484ccf
|
||||
PKG_MIRROR_HASH:=11b7de10e6ab91742d8a633a0030dde86118ffe73031cdf9c192cb3fded97a20
|
||||
PKG_SOURCE_DATE:=2021-03-31
|
||||
PKG_SOURCE_VERSION:=973cc6c865dcf6075c493125313058b650b08234
|
||||
PKG_MIRROR_HASH:=fb4d3e231c79a9122743f0ced7fd4fdcf81903de5c721d3c18d5779e44d50bdf
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user