update 2024-06-30 20:31:06
This commit is contained in:
parent
428d8eedbc
commit
b9578b0921
|
@ -9,7 +9,7 @@
|
|||
|
||||
> 由于新加入的 CONNMARK 影响,编译内核时需要添加 `NETFILTER_NETLINK_GLUE_CT` flag
|
||||
|
||||
## uci command
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
# 启用 UA2F
|
||||
|
@ -39,6 +39,9 @@ service ua2f enable
|
|||
|
||||
# 启动 UA2F
|
||||
service ua2f start
|
||||
|
||||
# 读取日志
|
||||
logread | grep UA2F
|
||||
```
|
||||
|
||||
## 自定义 User-Agent
|
||||
|
|
|
@ -54,15 +54,27 @@ int main(const int argc, char *argv[]) {
|
|||
|
||||
while (!should_exit) {
|
||||
if (nfqueue_receive(queue, buf, 0) == IO_READY) {
|
||||
while (!should_exit) {
|
||||
struct nf_packet packet[1];
|
||||
while (nfqueue_next(buf, packet) == IO_READY) {
|
||||
switch (nfqueue_next(buf, packet)) {
|
||||
case IO_ERROR:
|
||||
should_exit = true;
|
||||
case IO_READY:
|
||||
handle_packet(queue, packet);
|
||||
case IO_NOTREADY:
|
||||
continue;
|
||||
default:
|
||||
syslog(LOG_ERR, "Unknown return value [%s:%d]", __FILE__, __LINE__);
|
||||
should_exit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
free(buf->data);
|
||||
nfqueue_close(queue);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
PKG_NAME="$1"
|
||||
CURDIR="$2"
|
||||
PKG_BUILD_DIR="$3"
|
||||
|
||||
if [ -d "$CURDIR/.git" ]; then
|
||||
config="$CURDIR/.git/config"
|
||||
else
|
||||
config="$(sed "s|^gitdir:\s*|$CURDIR/|;s|$|/config|" "$CURDIR/.git")"
|
||||
fi
|
||||
[ -n "$(sed -En '/^\[remote /{h;:top;n;/^\[/b;s,(https?://gitcode\.(com|net)),\1,;T top;H;x;s|\n\s*|: |;p;}' "$config")" ] && {
|
||||
for d in luasrc ucode htdocs root src; do
|
||||
rm -rf "$PKG_BUILD_DIR"/$d
|
||||
done
|
||||
mkdir -p "$PKG_BUILD_DIR"/htdocs/luci-static/resources/view
|
||||
touch "$PKG_BUILD_DIR"/htdocs/luci-static/resources/view/$PKG_NAME.js
|
||||
mkdir -p "$PKG_BUILD_DIR"/root/usr/share/luci/menu.d
|
||||
touch "$PKG_BUILD_DIR"/root/usr/share/luci/menu.d/$PKG_NAME.json
|
||||
}
|
||||
exit 0
|
|
@ -15,6 +15,8 @@ LUCI_DEPENDS:=+php8 +php8-cgi +php8-fastcgi +php8-fpm +php8-mod-session +php8-mo
|
|||
|
||||
LUCI_DESCRIPTION:=A Web based File Manager in PHP
|
||||
|
||||
PKG_UNPACK=$(CURDIR)/.prepare.sh $(PKG_NAME) $(CURDIR) $(PKG_BUILD_DIR)
|
||||
|
||||
define Package/$(LUCI_NAME)/conffiles
|
||||
/etc/config/tinyfilemanager
|
||||
endef
|
||||
|
|
Loading…
Reference in New Issue