update 2026-06-16 17:21:41

This commit is contained in:
action
2026-06-16 17:21:41 +08:00
parent 19b8fe19fc
commit 0bae71881b
9 changed files with 75 additions and 38 deletions
+4 -4
View File
@@ -26,9 +26,9 @@ FIREWALL_INCLUDE_SH="$SH_DIR/firewall_include.sh"
DEBUG_SH="$SH_DIR/debug.sh"
## firewall
NFT_DIR="$HOME_DIR/firewall"
GEOIP_CN_NFT="$NFT_DIR/geoip_cn.nft"
GEOIP6_CN_NFT="$NFT_DIR/geoip6_cn.nft"
FIREWALL_DIR="$HOME_DIR/firewall"
GEOIP_CN_NFT="$FIREWALL_DIR/geoip_cn.nft"
GEOIP6_CN_NFT="$FIREWALL_DIR/geoip6_cn.nft"
## log
LOG_DIR="/var/log/momo"
@@ -63,7 +63,7 @@ get_paths() {
json_add_string firewall_include_sh "$FIREWALL_INCLUDE_SH"
json_add_string debug_sh "$DEBUG_SH"
json_add_string nft_dir "$NFT_DIR"
json_add_string firewall_dir "$FIREWALL_DIR"
json_add_string geoip_cn_nft "$GEOIP_CN_NFT"
json_add_string geoip6_cn_nft "$GEOIP6_CN_NFT"
+2 -4
View File
@@ -6,12 +6,10 @@
import { readfile } from 'fs';
import { cursor } from 'uci';
import { connect } from 'ubus';
import { get_paths, uci_bool, uci_array, get_cgroups_version, get_users, get_groups, get_cgroups } from '/etc/momo/ucode/include.uc';
import { uci_bool, uci_array, get_cgroups_version, get_users, get_groups, get_cgroups, load_profile } from '/etc/momo/ucode/include.uc';
const fw4 = require('fw4');
const paths = get_paths();
const cgroups_version = get_cgroups_version();
const users = get_users();
@@ -21,7 +19,7 @@
const uci = cursor();
const ubus = connect();
const profile = json(readfile(paths.run_profile_path));
const profile = load_profile();
uci.load('momo');