commit 17410729339d4855b55fd24cde17c466df7e884e Author: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Thu Mar 5 22:36:47 2026 +0800 update diff --git a/.github/diy/convert_translation.sh b/.github/diy/convert_translation.sh new file mode 100644 index 000000000..9a3f6374d --- /dev/null +++ b/.github/diy/convert_translation.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +for e in $(ls -d luci-*/po); do + if [[ -d $e/zh-cn && ! -d $e/zh_Hans ]]; then + ln -s zh-cn $e/zh_Hans 2>/dev/null + elif [[ -d $e/zh_Hans && ! -d $e/zh-cn ]]; then + ln -s zh_Hans $e/zh-cn 2>/dev/null + fi +done diff --git a/.github/diy/create_acl_for_luci.sh b/.github/diy/create_acl_for_luci.sh new file mode 100644 index 000000000..5a5756564 --- /dev/null +++ b/.github/diy/create_acl_for_luci.sh @@ -0,0 +1,113 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0-only +# -------------------------------------------------------- +# Script for creating ACL file for each LuCI APP + +error_font="\033[31m[Error]$\033[0m " +success_font="\033[32m[Success]\033[0m " +info_font="\033[36m[Info]\033[0m " + +function echo_green_bg(){ + echo -e "\033[42;37m$1\033[0m" +} + +function echo_yellow_bg(){ + echo -e "\033[43;37m$1\033[0m" +} + +function echo_red_bg(){ + echo -e "\033[41;37m$1\033[0m" +} + +function clean_outdated_files(){ + rm -f "create_acl_for_luci.err" "create_acl_for_luci.warn" "create_acl_for_luci.ok" +} + +function check_if_acl_exist(){ + ls "$1"/root/usr/share/rpcd/acl.d/*.json >/dev/null 2>&1 && return 0 || return 1 +} + +function check_config_files(){ + [ "$(ls "$1"/root/etc/config/* 2>/dev/null | wc -l)" -ne "1" ] && return 0 || return 1 +} + +function get_config_name(){ + ls "$1"/root/etc/config/* 2>/dev/null | awk -F '/' '{print $NF}' +} + +function create_acl_file(){ + mkdir -p "$1" + echo -e "{ + \"$2\": { + \"description\": \"Grant UCI access for $2\", + \"read\": { + \"uci\": [ \"$3\" ] + }, + \"write\": { + \"uci\": [ \"$3\" ] + } + } +}" > "$1/$2.json" +} + +function auto_create_acl(){ + luci_app_list="$(find ./ -maxdepth 1 | grep -Eo "luci-app-[a-zA-Z0-9_-]+" | sort -s)" + + [ "$(echo -e "${luci_app_list}" | wc -l)" -gt "0" ] && for i in ${luci_app_list} + do + if check_if_acl_exist "$i"; then + echo_yellow_bg "$i: has ACL file already, skipping..." | tee -a create_acl_for_luci.warn + elif check_config_files "$i"; then + echo_red_bg "$i: has no/multi config file(s), skipping..." | tee -a create_acl_for_luci.err + else + create_acl_file "$i/root/usr/share/rpcd/acl.d" "${i##*/}" "$(get_config_name "$i")" + echo_green_bg "$i: ACL file has been generated." | tee -a create_acl_for_luci.ok + fi + done +} + +while getopts "achml:n:p:" input_arg +do + case $input_arg in + a) + auto_create_acl + exit + ;; + m) + manual_mode=1 + ;; + p) + acl_path="$OPTARG" + ;; + l) + luci_name="$OPTARG" + ;; + n) + conf_name="$OPTARG" + ;; + c) + clean_outdated_files + exit + ;; + h|?|*) + echo -e "${info_font}Usage: $0 [-a|-m (-p ) -l -n |-c]" + exit 2 + ;; + esac +done + +if [ "*${manual_mode}*" == "*1*" ] && [ -n "${luci_name}" ] && [ -n "${conf_name}" ]; then + acl_path="${acl_path:-root/usr/share/rpcd/acl.d}" + if create_acl_file "${acl_path}" "${luci_name}" "${conf_name}"; then + echo -e "${success_font}Output file: $(ls "${acl_path}/${luci_name}.json")" + echo_green_bg "$(cat "${acl_path}/${luci_name}.json")" + echo_green_bg "${luci_name}: ACL file has been generated." >> "create_acl_for_luci.ok" + [ -e "create_acl_for_luci.err" ] && sed -i "/${luci_name}/d" "create_acl_for_luci.err" + else + echo -e "${error_font}Failed to create file ${acl_path}/${luci_name}.json" + echo_red_bg "${luci_name}: Failed to create ACL file." >> "create_acl_for_luci.err" + fi +else + echo -e "${info_font}Usage: $0 [-a|-m -p -l -n |-c]" + exit 2 +fi diff --git a/.github/diy/create_ucitrack_for_luci.sh b/.github/diy/create_ucitrack_for_luci.sh new file mode 100644 index 000000000..4997d0610 --- /dev/null +++ b/.github/diy/create_ucitrack_for_luci.sh @@ -0,0 +1,130 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0-only +# -------------------------------------------------------- +# Script for creating new UCI track file for each LuCI APP + +DEFAULT_COLOR="\033[0m" + +function __error_bg() { + echo -e "\033[41;37m$*$DEFAULT_COLOR" +} + +function __error_msg() { + echo -e "\033[31m[ERROR]$DEFAULT_COLOR $*" +} + +function __info_msg() { + echo -e "\033[36m[INFO]$DEFAULT_COLOR $*" +} + +function __success_bg() { + echo -e "\033[42;37m$*$DEFAULT_COLOR" +} + +function __success_msg() { + echo -e "\033[32m[SUCCESS]$DEFAULT_COLOR $*" +} + +function __warning_bg() { + echo -e "\033[43;37m$*$DEFAULT_COLOR" +} + +function __warning_msg() { + echo -e "\033[33m[WARNING]$DEFAULT_COLOR $*" +} + +function clean_outdated_files() { + rm -f "create_ucitrack_for_luci.err" "create_ucitrack_for_luci.warn" "create_ucitrack_for_luci.ok" +} + +function check_if_ucitrack_exist() { + ls "$1/root/usr/share/ucitrack"/*.json >"/dev/null" 2>&1 && return 0 || return 1 +} + +function check_config_files() { + [ "$(ls "$1/root/etc/config"/* 2>/dev/null | wc -l)" -ne "1" ] && return 0 || return 1 +} + +function check_init_files() { + [ "$(ls "$1/root/etc/init.d"/* 2>/dev/null | wc -l)" -ne "1" ] && return 0 + ! grep -q "procd_add_reload_trigger" "$1/root/etc/init.d"/* 2>"/dev/null" && return 1 || return 0 +} + +function get_target_name() { + ls "$1/root/etc/$2"/* 2>"/dev/null" | awk -F '/' '{print $NF}' +} + +function create_ucitrack_file() { + mkdir -p "$1" + echo -e "{ + \"config\": \"$3\", + \"init\": [ \"$4\" ] +}" > "$1/$2.json" +} + +function auto_create_ucitrack() { + luci_app_list="$(find ./ -maxdepth 1 | grep -Eo "luci-app-[a-zA-Z0-9_-]+" | sort -s)" + + [ "$(echo -e "$luci_app_list" | wc -l)" -gt "0" ] && for i in $luci_app_list + do + if check_if_ucitrack_exist "$i"; then + __warning_bg "$i: has ucitrack file already, skipping..." + elif check_config_files "$i"; then + __error_bg "$i: has no/multi config file(s), skipping..." + elif check_init_files "$i"; then + __error_bg "$i: has no/multi/procd init script(s), skipping..." + else + create_ucitrack_file "$i/root/usr/share/ucitrack" "${i##*/}" "$(get_target_name "$i" "config")" "$(get_target_name "$i" "init.d")" + __success_bg "$i: ucitrack file has been generated." + fi + done +} + +while getopts "achmli:n:p:" input_arg +do + case $input_arg in + a) + auto_create_ucitrack + exit + ;; + m) + manual_mode="1" + ;; + p) + ucitrack_path="$OPTARG" + ;; + l) + luci_name="$OPTARG" + ;; + n) + conf_name="$OPTARG" + ;; + i) + init_name="$OPTARG" + ;; + c) + clean_outdated_files + exit + ;; + h|?|*) + __info_msg "Usage: $0 [-a|-m (-p ) -l -n -i |-c]" + exit 2 + ;; + esac +done + +if [ "$manual_mode" == "1" ] && [ -n "$luci_name" ] && [ -n "$conf_name" ] && [ -n "$init_name" ]; then + ucitrack_path="${ucitrack_path:-root/usr/share/ucitrack}" + if create_ucitrack_file "$ucitrack_path" "$luci_name" "$conf_name" "$init_name"; then + __success_msg "Output file: $(ls "$ucitrack_path/$luci_name.json")" + __green_bg "$(cat "$ucitrack_path/$luci_name.json")" + __green_bg "$luci_name: ucitrack file has been generated." >> "create_ucitrack_for_luci.ok" + [ -e "create_ucitrack_for_luci.err" ] && sed -i "/$luci_name/d" "create_ucitrack_for_luci.err" + else + __error_msg "Failed to create file $ucitrack_path/$luci_name.json" + __error_bg "$luci_name: Failed to create ucitrack file." >> "create_ucitrack_for_luci.err" + fi +else + __info_msg "Usage: $0 [-a|-m -p -l -n -i |-c]" + exit 2 +fi diff --git a/.github/diy/generate_ucitrack.sh b/.github/diy/generate_ucitrack.sh new file mode 100644 index 000000000..deabf52ad --- /dev/null +++ b/.github/diy/generate_ucitrack.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +find . -path "*/root/usr/share/ucitrack/*.json" -type f | while read -r json_file; do + # 使用 sed 检查并替换格式,匹配不包含逗号的任意字符串 + if grep -q '"init": \[.*\]' "$json_file"; then + # 使用 perl 正则来处理,因为它的正则表达式功能更强大 + perl -i -pe 's/"init":\s*\[\s*"([^,"\n]+)"\s*\]/"init": "$1"/g' "$json_file" + echo "已处理 json 文件: $json_file" + fi +done + +find . -type f \ + -not -path "*.github*" \ + -not -name "Makefile" \ + | while read -r file; do + + if grep -q "add ucitrack" "$file"; then + # 提取xx的值 + xx=$(grep "add ucitrack" "$file" | awk '{print $3}' | head -1 | tr -d '\r' | tr -d ' ') + + # 读取第一行 + first_line=$(head -n 1 "$file") + + # 构建新文件内容 + { + # 检查第一行是否包含 #!/bin/ + if [[ "$first_line" == "#!/bin/"* ]]; then + echo "$first_line" + fi + echo "[ ! -f \"/usr/share/ucitrack/luci-app-${xx}.json\" ] && {" + echo " cat > /usr/share/ucitrack/luci-app-${xx}.json << EEOF" + echo "{" + echo " \"config\": \"${xx}\"," + echo " \"init\": \"${xx}\"" + echo "}" + echo "EEOF" + echo "}" + # 如果第一行不包含 #!/bin/,在这里输出 + if [[ "$first_line" != "#!/bin/"* && -n "$first_line" ]]; then + echo "$first_line" + fi + # 获取其余内容 + sed '1d' "$file" + } > "${file}.tmp" + + # 替换原文件 + mv "${file}.tmp" "$file" + + echo "已处理文件: $file (ucitrack)" + + else + # 检查是否需要添加 reload_service + if (grep -q "stop_service\|service_stopped" "$file") && ! grep -q "reload_service" "$file"; then + echo >> "$file" + echo "reload_service() {" >> "$file" + echo -e "\trestart" >> "$file" + echo "}" >> "$file" + + echo "已添加 reload_service 到文件: $file" + fi + +if awk '/^USE_PROCD/{a=1} /start_service/{b=1} /config_load/{c=1} /service_triggers/{d=1} END{exit !(a&&b&&c&&!d)}' "$file"; then + needs_service_triggers=1 + config=$(grep -m 1 "config_load" "$file" | sed 's/.*config_load[[:space:]]\+["'\'']\?\([^"'\''[:space:]]*\)["'\'']\?.*$/\1/') + echo >> "$file" + echo "service_triggers() {" >> "$file" + echo -e "\tprocd_add_reload_trigger \"$config\"" >> "$file" + echo "}" >> "$file" + + echo "已添加 service_triggers 到文件: $file" + fi + fi +done +touch /tmp/ok3 diff --git a/.github/diy/packages/README.md b/.github/diy/packages/README.md new file mode 100644 index 000000000..a62e788a9 --- /dev/null +++ b/.github/diy/packages/README.md @@ -0,0 +1,23 @@ +## 适用于openwrt 23.05 及以上的分支. +## 所有插件都为网上收集的开源插件,感谢作者们的付出. + +## 本仓库所有插件已编译IPK下载 +### 使用软件源请删除 opkg配置(/etc/opkg.conf) 中的 option check_signature + + +| CPU架构 | 下载地址 | 适用设备 | 软件源 | 更新频率 | +|----------------|-----------------------------------------------------|--------------------------------------|-----------|-----------| +| X86_64 | [📥](https://dl.openwrt.ai/latest/packages/x86_64/kiddin9/) | 64位PC软路由 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/x86_64/kiddin9 | 日更 | +| i386_pentium4 | [📥](https://dl.openwrt.ai/latest/packages/i386_pentium4/kiddin9/) | 32位PC软路由 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/i386_pentium4/kiddin9 | 日更 | +| aarch64_generic | [📥](https://dl.openwrt.ai/latest/packages/aarch64_generic/kiddin9/) | R2S/R4S等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/aarch64_generic/kiddin9 | 日更 | +| aarch64_cortex-a72 | [📥](https://dl.openwrt.ai/latest/packages/aarch64_cortex-a72/kiddin9/) | 树莓派4B等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/aarch64_cortex-a72/kiddin9 | 日更 | +| arm_arm1176jzf-s_vfp | [📥](https://dl.openwrt.ai/latest/packages/arm_arm1176jzf-s_vfp/kiddin9/) | 树莓派1等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/arm_arm1176jzf-s_vfp/kiddin9 | 日更 | +| mipsel_24kc | [📥](https://dl.openwrt.ai/latest/packages/mipsel_24kc/kiddin9/) | k2p,ac2100等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/mipsel_24kc/kiddin9 | 日更 | +| mips_24kc | [📥](https://dl.openwrt.ai/latest/packages/mips_24kc/kiddin9/) | GL-AR300M,NETGEAR WNDR4300等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/mips_24kc/kiddin9 | 日更 | +| aarch64_cortex-a53 | [📥](https://dl.openwrt.ai/latest/packages/aarch64_cortex-a53/kiddin9/) | N1,红米AX6,小米AX6S等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/aarch64_cortex-a53/kiddin9 | 日更 | +| arm_cortex-a9 | [📥](https://dl.openwrt.ai/latest/packages/arm_cortex-a9/kiddin9/) | 斐讯K3,华硕RT-AC68U,RT-AC88U等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/arm_cortex-a9/kiddin9 | 日更 | +| arm_cortex-a7_neon-vfpv4 | [📥](https://dl.openwrt.ai/latest/packages/arm_cortex-a7_neon-vfpv4/kiddin9/) | 华硕RT-ACRH17,RT-AC58U等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/arm_cortex-a7_neon-vfpv4/kiddin9 | 日更 | +| arm_cortex-a9_vfpv3-d16 | [📥](https://dl.openwrt.ai/latest/packages/arm_cortex-a9_vfpv3-d16/kiddin9/) | Linksys WRT1900ACS等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/arm_cortex-a9_vfpv3-d16/kiddin9 | 日更 | +| arm_cortex-a5_vfpv4 | [📥](https://dl.openwrt.ai/latest/packages/arm_cortex-a5_vfpv4/kiddin9/) | 玩客云等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/arm_cortex-a5_vfpv4/kiddin9 | 日更 | +| arm_cortex-a15_neon-vfpv4 | [📥](https://dl.openwrt.ai/latest/packages/arm_cortex-a15_neon-vfpv4/kiddin9/) | NETGEAR R7800等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/arm_cortex-a15_neon-vfpv4/kiddin9 | 日更 | +| aarch64_cortex-a76 | [📥](https://dl.openwrt.ai/latest/packages/aarch64_cortex-a76/kiddin9/) | 树莓派5等 | src/gz openwrt_kiddin9 https://dl.openwrt.ai/latest/packages/aarch64_cortex-a76/kiddin9 | 日更 | diff --git a/.github/diy/packages/cloudreve/patches/db_path.patch b/.github/diy/packages/cloudreve/patches/db_path.patch new file mode 100644 index 000000000..e4c415c1c --- /dev/null +++ b/.github/diy/packages/cloudreve/patches/db_path.patch @@ -0,0 +1,19 @@ +--- a/application/migrator/model/init.go ++++ b/application/migrator/model/init.go +@@ -7,7 +7,6 @@ import ( + "github.com/jinzhu/gorm" + + "github.com/cloudreve/Cloudreve/v4/application/migrator/conf" +- "github.com/cloudreve/Cloudreve/v4/pkg/util" + _ "github.com/jinzhu/gorm/dialects/mssql" + _ "github.com/jinzhu/gorm/dialects/mysql" + _ "github.com/jinzhu/gorm/dialects/postgres" +@@ -37,7 +36,7 @@ func Init() error { + switch confDBType { + case "UNSET", "sqlite": + // 未指定数据库或者明确指定为 sqlite 时,使用 SQLite 数据库 +- db, err = gorm.Open("sqlite3", util.RelativePath(conf.DatabaseConfig.DBFile)) ++ db, err = gorm.Open("sqlite3", "/etc/cloudreve/" + conf.DatabaseConfig.DBFile) + case "postgres": + db, err = gorm.Open(confDBType, fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%d sslmode=disable", + conf.DatabaseConfig.Host, diff --git a/.github/diy/packages/dockerd/files/dockerd.uci-defaults b/.github/diy/packages/dockerd/files/dockerd.uci-defaults new file mode 100644 index 000000000..bb33744d6 --- /dev/null +++ b/.github/diy/packages/dockerd/files/dockerd.uci-defaults @@ -0,0 +1,39 @@ +#!/bin/sh + +function NEWPART(){ +ROOT_DISK=$1 + # 检查是否有未分配空间 + DISK_SIZE=$(parted -s $ROOT_DISK unit MB print | grep '^Disk' | awk '{print $3}' | sed 's/MB//') + LAST_PART_END=$(parted -s $ROOT_DISK unit MB print | tail -n 2 | head -n 1 | awk '{print $3}' | sed 's/MB//') +[ $LAST_PART_END == "End" ] && return 0 + UNALLOCATED_SPACE="$(awk "BEGIN {print $DISK_SIZE - $LAST_PART_END}")" + awk 'BEGIN {exit !('$UNALLOCATED_SPACE' >= '1024')}' && { + # 创建新分区 +parted -s $ROOT_DISK mkpart primary ext4 ${LAST_PART_END}MB 100% && { + +ROOT_DISK_NAME="$(echo $ROOT_DISK | cut -d / -f 3)" +LAST_PART_NAME="$(lsblk -nlo NAME | grep $ROOT_DISK_NAME | tail -n 1)" + # 格式化新分区 +mkfs.ext4 -F -L "docker" /dev/${LAST_PART_NAME} +pgrep -x /usr/bin/dockerd > /dev/null && /etc/init.d/dockerd stop +mkdir -p /opt/docker +eval $(block info /dev/${LAST_PART_NAME} | grep -o -e 'UUID="\S*"') +[ ! -f /etc/config/fstab ] && ( block detect > /etc/config/fstab ) +uci set fstab.mountdocker="mount" +uci set fstab.mountdocker.uuid="${UUID}" +uci set fstab.mountdocker.target="/opt/docker" +uci commit fstab +umount -f /dev/${LAST_PART_NAME} +/sbin/block mount +} +} +} + +cat /etc/mtab | grep -q "/opt/docker" || { +uci -q get fstab.mountdocker || { +disk="$(lsblk | awk '/disk/ {print $1; exit}')" +NEWPART /dev/$disk +} +} + +exit 0 diff --git a/.github/diy/packages/homebox/Makefile.k b/.github/diy/packages/homebox/Makefile.k new file mode 100644 index 000000000..e70ce7c8b --- /dev/null +++ b/.github/diy/packages/homebox/Makefile.k @@ -0,0 +1,57 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=homebox +PKG_VERSION:=0.0.0-dev.2024101306 +PKG_RELEASE:=21 + +ifeq ($(ARCH),aarch64) + H_ARCH:=arm64 + +else ifeq ($(ARCH),arm) + H_ARCH:=arm + +else ifeq ($(ARCH),i386) + H_ARCH:=386 + +else ifeq ($(ARCH),mips) + H_ARCH:=mips + +else ifeq ($(ARCH),mipsel) + H_ARCH:=mips + +else ifeq ($(ARCH),x86_64) + H_ARCH:=amd64 +endif + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=net + CATEGORY:=Network + TITLE:=A Toolbox for Home Local Networks Speed Test + URL:=https://github.com/XGHeaven/homebox + DEPENDS:=@(i386||x86_64||arm||aarch64||mipsel||mips) +libstdcpp +endef + +define Package/$(PKG_NAME)/description + A Toolbox for Home Local Networks Speed Test +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + [ ! -f $(PKG_BUILD_DIR)/server-linux-$(H_ARCH).tar.gz ] && wget https://github.com/XGHeaven/homebox/releases/download/v$(PKG_VERSION)/server-linux-$(H_ARCH).tar.gz -O $(PKG_BUILD_DIR)/server-linux-$(H_ARCH).tar.gz + tar -xzvf $(PKG_BUILD_DIR)/server-linux-$(H_ARCH).tar.gz -C $(PKG_BUILD_DIR) +endef + +define Build/Compile +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/config $(1)/etc/init.d $(1)/etc/uci-defaults + $(INSTALL_BIN) $(PKG_BUILD_DIR)/server-linux-$(H_ARCH) $(1)/usr/bin/homebox + $(INSTALL_CONF) ./files/homebox.config $(1)/etc/config/homebox + $(INSTALL_BIN) ./files/homebox.init $(1)/etc/init.d/homebox + $(INSTALL_BIN) ./files/homebox.uci-default $(1)/etc/uci-defaults/homebox +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/.github/diy/packages/luci-app-bridge/Makefile.k b/.github/diy/packages/luci-app-bridge/Makefile.k new file mode 100644 index 000000000..58cbda1e3 --- /dev/null +++ b/.github/diy/packages/luci-app-bridge/Makefile.k @@ -0,0 +1,19 @@ + +# Copyright (C) 2016 Openwrt.org +# +# This is free software, licensed under the Apache License, Version 2.0 . +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=Luci for support bridge +LUCI_DEPENDS:=+ip-bridge +kmod-nft-bridge + +define Package/luci-app-bridge/conffiles +/etc/bridge/network +/etc/bridge/firewall +endef + +include ../../luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/.github/diy/packages/luci-app-bridge/luasrc/controller/bridge.lua b/.github/diy/packages/luci-app-bridge/luasrc/controller/bridge.lua new file mode 100644 index 000000000..9621b1a4b --- /dev/null +++ b/.github/diy/packages/luci-app-bridge/luasrc/controller/bridge.lua @@ -0,0 +1,20 @@ +module("luci.controller.bridge", package.seeall) + +function index() + if not nixio.fs.access("/etc/config/bridge") then + return + end + + local page + + page = entry({"admin", "network", "bridge"}, cbi("bridge"), _("Transparent bridge"), 60) + page.dependent = true + entry({"admin","network","bridge","status"},call("act_status")).leaf=true +end + +function act_status() + local e={} + e.running=luci.sys.call("iptables -L INPUT | grep zone_.*input | grep bridge >/dev/null")==0 + luci.http.prepare_content("application/json") + luci.http.write_json(e) +end diff --git a/.github/diy/packages/luci-app-bridge/luasrc/model/cbi/bridge.lua b/.github/diy/packages/luci-app-bridge/luasrc/model/cbi/bridge.lua new file mode 100644 index 000000000..1112d4fb6 --- /dev/null +++ b/.github/diy/packages/luci-app-bridge/luasrc/model/cbi/bridge.lua @@ -0,0 +1,27 @@ +local e=require"nixio.fs" + +m=Map("bridge",translate("Transparent bridge"), +translate("Let the routing become a transparent bridge device that communicates with the superior routing without perception and has the function of firewall.")) + +m:section(SimpleSection).template = "bridge/bridge_status" + +s=m:section(TypedSection,"bridge",translate("Settings")) +s.anonymous=true +o=s:option(Flag,"enabled", translate("Passerelle transparente")) +o.rmempty=false + +o=s:option(Value,"gateway", translate("GatewayIP"), translate("Superior routing IP")) +o.rmempty=false + +o=s:option(Value,"ipaddr", translate("Bridge IP"), translate("Need to be on the same network segment as the upper-level route but do not conflict with other device IPs.")) +o.rmempty=false + +o=s:option(Value,"netmask", translate("Netmask")) +o.rmempty=false + +o=s:option(Value,"network", translate("Number of network ports"), translate("The number of physical network ports on the soft route is automatically detected when left blank.")) + +o = m:section(TypedSection, "bridge", translate("Setting instructions:"), translate("
  • Applicable to network environments that have superior routing and require some functions of soft routing but do not want multi-level NAT.
  • The switch or client needs to be connected to the network port of the soft route.
  • The WEB console of the soft route after the transparent bridge is enabled is the bridge IP.
  • Some features on the soft route will be invalid after enabling the transparent bridge, such as Full Cone, multi-dial, etc.
  • After closing, restore the network settings when the plugin is installed, and the WEB console reverts to the original set IP.
  • ")) +o.anonymous = true + +return m diff --git a/.github/diy/packages/luci-app-bridge/luasrc/view/bridge/bridge_status.htm b/.github/diy/packages/luci-app-bridge/luasrc/view/bridge/bridge_status.htm new file mode 100644 index 000000000..03d0f6b84 --- /dev/null +++ b/.github/diy/packages/luci-app-bridge/luasrc/view/bridge/bridge_status.htm @@ -0,0 +1,22 @@ + + +
    +

    + <%:Collecting data...%> +

    +
    diff --git a/.github/diy/packages/luci-app-bridge/po/zh-cn/bridge.po b/.github/diy/packages/luci-app-bridge/po/zh-cn/bridge.po new file mode 100644 index 000000000..ca8d06470 --- /dev/null +++ b/.github/diy/packages/luci-app-bridge/po/zh-cn/bridge.po @@ -0,0 +1,48 @@ +msgid "Transparent bridge" +msgstr "透明网桥" + +msgid "Passerelle transparente" +msgstr "开启透明网桥" + +msgid "Let the routing become a transparent bridge device that communicates with the superior routing without perception and has the function of firewall." +msgstr "让路由成为与上级路由通信,无感知,并具备防火墙功能的透明网桥设备。" + +msgid "Settings" +msgstr "设置" + +msgid "GatewayIP" +msgstr "网关IP" + +msgid "Superior routing IP" +msgstr "上级路由IP" + +msgid "Bridge IP" +msgstr "网桥IP" + +msgid "Need to be on the same network segment as the upper-level route but do not conflict with other device IPs." +msgstr "需要和上级路由在同一个网段但不要和其它设备IP冲突 " + +msgid "Netmask" +msgstr "子网掩码" + +msgid "Number of network ports" +msgstr "网口数" + +msgid "The number of physical network ports on the soft route is automatically detected when left blank." +msgstr "软路由物理网口数量,留空则自动探测。" + +msgid "Setting instructions:" +msgstr "设置说明:" + +msgid "" +"
  • Applicable to network environments that have superior routing and require some functions of soft routing but do not want multi-level NAT.
  • " +"The switch or client needs to be connected to the network port of the soft route.
  • " +"The WEB console of the soft route after the transparent bridge is enabled is the bridge IP.
  • " +"Some features on the soft route will be invalid after enabling the transparent bridge, such as Full Cone, multi-dial, etc.
  • " +"After closing, restore the network settings when the plugin is installed, and the WEB console reverts to the original set IP.
  • " +msgstr "" +"
  • ✯适用于有上级路由,需要软路由的一些功能但又不想多级NAT的网络环境。
  • " +"✯交换机或客户端需要连接到软路由的网口下面。
  • " +"✯启用透明网桥后软路由的WEB控制台为网桥IP。
  • " +"✯启用透明网桥后软路由上的一些功能会失效,如:Full Cone、多拨等。
  • " +"✯关闭后恢复插件安装时的网络设置,WEB控制台恢复为原始设置的IP。
  • " diff --git a/.github/diy/packages/luci-app-bridge/root/etc/config/bridge b/.github/diy/packages/luci-app-bridge/root/etc/config/bridge new file mode 100644 index 000000000..0a880df32 --- /dev/null +++ b/.github/diy/packages/luci-app-bridge/root/etc/config/bridge @@ -0,0 +1,6 @@ + +config bridge 'bridge' + option gateway '192.168.1.1' + option ipaddr '192.168.1.2' + option netmask '255.255.255.0' + diff --git a/.github/diy/packages/luci-app-bridge/root/etc/init.d/bridge b/.github/diy/packages/luci-app-bridge/root/etc/init.d/bridge new file mode 100644 index 000000000..3af9c4065 --- /dev/null +++ b/.github/diy/packages/luci-app-bridge/root/etc/init.d/bridge @@ -0,0 +1,124 @@ +#!/bin/sh /etc/rc.common + +START=99 + +run_bridge() +{ + config_get enabled $1 enabled + config_get gateway $1 gateway + config_get ipaddr $1 ipaddr + config_get netmask $1 netmask + config_get network $1 network + + ipv6=$(uci get network.globals.ula_prefix) + if=$(cat /etc/config/network | wc -l) + + if [ "$enabled" = "1" ]; then + + #防止重复配置 + a=$(uci get network.bridge.device | sed 's/ /\n/g' |wc -l) + b=$(uci get network.bridge.ipaddr) + c=$(uci get network.bridge.netmask) + d=$(uci get network.bridge.gateway) + e=$(ls /sys/class/net | grep "eth" | wc -l) + + if [ "$a" = "$network" ] || [ "$a" = "$e" ] && [ "$network" = "" ] || [ "$a" = "$network" ]; then + f=yes + else + f=no + fi + + if [ "$b" = "$ipaddr" ] && [ "$c" = "$netmask" ] && [ "$d" = "$gateway" ] && [ "$f" = "yes" ]; then + break; + else + + #模拟输入 + if [ "$network" = "0" ] || [ "$network" = "" ]; then + eth=$(ls /sys/class/net | grep "eth" | tr '\n' ' ' | sed 's/[ ]*$//g') + else + eth=$(ETH $network | tr '\n' ' ' | sed 's/[ ]*$//g') + fi + + #备份配置 + if [ ! -f "/etc/bridge/firewall" ]; then + mkdir /etc/bridge + cp /etc/config/network /etc/bridge/network + cp /etc/config/firewall /etc/bridge/firewall + + fi + + #清空配置 + cat /dev/null> /etc/config/network + cat /dev/null> /etc/config/firewall + + #写入network网络接口 + uci set network.loopback=interface + uci set network.loopback.device=lo + uci set network.loopback.proto=static + uci set network.loopback.ipaddr=127.0.0.1 + uci set network.loopback.netmask=255.0.0.0 + uci set network.globals=globals + uci set network.globals.ula_prefix=$ipv6 + uci set network.bridge=interface + uci set network.bridge.type='bridge' + uci set network.bridge.device="$eth" + uci set network.bridge.proto='static' + uci set network.bridge.ipaddr=$ipaddr + uci set network.bridge.netmask=$netmask + uci set network.bridge.gateway=$gateway + uci set network.bridge.dns=$gateway + uci set network.bridge.force_link='0' + uci commit network + + #写入firewall防火墙 + uci add firewall zone + uci set firewall.@zone[0].input=ACCEPT + uci set firewall.@zone[0].output=ACCEPT + uci set firewall.@zone[0].forward=ACCEPT + uci set firewall.@zone[0].conntrack=1 + uci set firewall.@zone[0].mtu_fix=1 + uci set firewall.@zone[0].name=bridge + uci set firewall.@zone[0].network=bridge + uci commit firewall + + #重启网络DNS服务与防火墙 + /etc/init.d/network reload 2>/dev/null & + /etc/init.d/dnsmasq reload 2>/dev/null & + /etc/init.d/firewall reload 2>/dev/null & + + fi + + else + + #恢复配置&删除备份 + if [ -f "/etc/bridge/firewall" ]; then + cp /etc/bridge/network /etc/config/network + cp /etc/bridge/firewall /etc/config/firewall + rm -rf /etc/bridge + + #重启网络DNS服务与防火墙 + /etc/init.d/network reload 2>/dev/null & + /etc/init.d/dnsmasq reload 2>/dev/null & + /etc/init.d/firewall reload 2>/dev/null & + fi + + fi +} + +ETH() +{ + eth=0 + while [ $eth -le $(expr "$1" - 1) ] + do + eth=`expr $eth + 1` + a=`expr $eth - 1` + echo "eth$a" + done +} + +start() +{ + config_load bridge + config_foreach run_bridge bridge +} + diff --git a/.github/diy/packages/luci-app-bridge/root/etc/uci-defaults/bridge b/.github/diy/packages/luci-app-bridge/root/etc/uci-defaults/bridge new file mode 100644 index 000000000..1fe6627cd --- /dev/null +++ b/.github/diy/packages/luci-app-bridge/root/etc/uci-defaults/bridge @@ -0,0 +1,15 @@ +#!/bin/sh + +[ ! -f "/usr/share/ucitrack/luci-app-bridge.json" ] && { + cat > /usr/share/ucitrack/luci-app-bridge.json << EEOF +{ + "config": "bridge", + "init": "bridge" +} +EEOF +} + +chmod +x /etc/init.d/bridge + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/.github/diy/packages/luci-app-kodexplorer/root/etc/kodexplorer/nginx.server.conf.template b/.github/diy/packages/luci-app-kodexplorer/root/etc/kodexplorer/nginx.server.conf.template new file mode 100644 index 000000000..61ad13334 --- /dev/null +++ b/.github/diy/packages/luci-app-kodexplorer/root/etc/kodexplorer/nginx.server.conf.template @@ -0,0 +1,26 @@ + + server { + listen |PORT|; + listen [::]:|PORT|; + |ssl_certificate| + |ssl_certificate_key| + ssl_session_timeout 5m; + ssl_ciphers HIGH:!aNULL:!MD5; + ssl_prefer_server_ciphers on; + server_name localhost; + root |project_directory|; + index index.html index.htm index.php; + location ~ \.php(.*)$ { + fastcgi_pass unix:|SOCK|; # 通过 Unix 套接字执行 PHP + fastcgi_index index.php; + fastcgi_split_path_info ^(.+\.php)(.*)$; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # 修复 Nginx fastcgi 漏洞 + fastcgi_param PATH_INFO $fastcgi_path_info; + include /etc/nginx/fastcgi_params; + client_max_body_size |upload_max_filesize|; + client_body_timeout 3600s; + fastcgi_connect_timeout 3600s; + fastcgi_send_timeout 3600s; + fastcgi_read_timeout 3600s; + } + } diff --git a/.github/diy/packages/luci-app-log/po/zh_Hans/log-viewer.po b/.github/diy/packages/luci-app-log/po/zh_Hans/log-viewer.po new file mode 100644 index 000000000..dc8cfc0e4 --- /dev/null +++ b/.github/diy/packages/luci-app-log/po/zh_Hans/log-viewer.po @@ -0,0 +1,122 @@ +msgid "Alert" +msgstr "警报" + +msgid "All" +msgstr "全部" + +msgid "All entries" +msgstr "所有条目" + +msgid "Apply" +msgstr "应用" + +msgid "Apply message filter as regular expression" +msgstr "将消息过滤器应用为正则表达式" + +msgid "Apply timestamp filter as regular expression" +msgstr "将时间戳过滤器应用为正则表达式" + +msgid "Auto refresh" +msgstr "自动刷新" + +msgid "Convert timestamps to a human readable date" +msgstr "将时间戳转换为人类可读的日期" + +msgid "Date" +msgstr "日期" + +msgid "Dismiss" +msgstr "关闭" + +msgid "Download log" +msgstr "下载日志" + +msgid "Edit" +msgstr "编辑" + +msgid "Entries" +msgstr "条目" + +msgid "Facility" +msgstr "模块" + +msgid "Facilities" +msgstr "模块" + +msgid "Filter is regexp" +msgstr "过滤器是正则表达式" + +msgid "Filter settings" +msgstr "过滤设置" + +msgid "Host" +msgstr "主机" + +msgid "Hosts" +msgstr "主机" + +msgid "Invalid regular expression" +msgstr "无效的正则表达式" + +msgid "Kernel Log" +msgstr "内核日志" + +msgid "Last entries" +msgstr "显示最新条目数" + +msgid "Level" +msgstr "级别" + +msgid "Log" +msgstr "日志" + +msgid "Log Viewer" +msgstr "系统日志" + +msgid "Logging levels" +msgstr "日志级别" + +msgid "Logread not found" +msgstr "未找到 Logread" + +msgid "Message" +msgstr "消息" + +msgid "Message filter" +msgstr "消息过滤器" + +msgid "More entries" +msgstr "更多条目" + +msgid "No entries available..." +msgstr "没有可用条目..." + +msgid "Refresh log" +msgstr "刷新日志" + +msgid "Sorting entries" +msgstr "排序条目" + +msgid "System Log" +msgstr "系统日志" + +msgid "Timestamp" +msgstr "时间" + +msgid "Timestamp filter" +msgstr "时间过滤器" + +msgid "Type a search pattern..." +msgstr "输入搜索模式..." + +msgid "Unable to load log data:" +msgstr "无法加载日志数据:" + +msgid "Unsupported log format" +msgstr "不支持的日志格式" + +msgid "ascending" +msgstr "升序" + +msgid "descending" +msgstr "降序" diff --git a/.github/diy/packages/luci-app-log/root/etc/uci-defaults/luci-log b/.github/diy/packages/luci-app-log/root/etc/uci-defaults/luci-log new file mode 100644 index 000000000..9f5f23495 --- /dev/null +++ b/.github/diy/packages/luci-app-log/root/etc/uci-defaults/luci-log @@ -0,0 +1,5 @@ +#!/bin/sh + +sed -i "s/luci-mod-status-logs/luci-mod-status-log/" /usr/share/luci/menu.d/luci-mod-status.json + +exit 0 diff --git a/.github/diy/packages/luci-app-partexp/root/etc/hotplug.d/block/05-partexp b/.github/diy/packages/luci-app-partexp/root/etc/hotplug.d/block/05-partexp new file mode 100644 index 000000000..43ddd6937 --- /dev/null +++ b/.github/diy/packages/luci-app-partexp/root/etc/hotplug.d/block/05-partexp @@ -0,0 +1,9 @@ +[ "$ACTION" = "add" ] && { + [ "$(uci -q get partexp.global.target_disk)" ] || { + target_disk="$(lsblk -o NAME | grep sd | grep -v "[0-9]" | tail -n 1)" + [ "$(block info | grep "$target_disk" | grep "kernel")" ] || { + uci -q set partexp.global.target_disk="$target_disk" + uci commit partexp + } + } +} diff --git a/.github/diy/packages/luci-app-pptpd/Makefile.k b/.github/diy/packages/luci-app-pptpd/Makefile.k new file mode 100644 index 000000000..911b96f47 --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/Makefile.k @@ -0,0 +1,16 @@ +# +# Copyright (C) 2008-2014 The LuCI Team +# +# This is free software, licensed under the Apache License, Version 2.0 . +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=LuCI page for PPTP VPN Server +LUCI_DEPENDS:=+pptpd +kmod-mppe +ipset + +include ../../luci.mk + +# call BuildPackage - OpenWrt buildroot signature + + diff --git a/.github/diy/packages/luci-app-pptpd/Readme.txt b/.github/diy/packages/luci-app-pptpd/Readme.txt new file mode 100644 index 000000000..d36c33c57 --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/Readme.txt @@ -0,0 +1,21 @@ +Ìí¼ÓÈçÏ´úÂ뵽/feeds/luci.index + + +Source-Makefile: feeds/luci/applications/luci-app-pptpd/Makefile +Package: luci-app-pptpd +Submenu: 3. Applications +Version: x-1 +Depends: +libc +SSP_SUPPORT:libssp +USE_GLIBC:librt +USE_GLIBC:libpthread +pptpd +kmod-mppe +ipset +Conflicts: +Menu-Depends: +Provides: +Build-Depends: lua/host luci-base/host +Section: luci +Category: LuCI +Title: LuCI page for PPTP VPN Server +Maintainer: +Source: +Type: ipkg +Description: LuCI page for PPTP VPN Server + +@@ diff --git a/.github/diy/packages/luci-app-pptpd/luasrc/controller/pptpd.lua b/.github/diy/packages/luci-app-pptpd/luasrc/controller/pptpd.lua new file mode 100644 index 000000000..660bffc67 --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/luasrc/controller/pptpd.lua @@ -0,0 +1,38 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth +Copyright 2014 HackPascal + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- + +module("luci.controller.pptpd", package.seeall) + +function index() + if not nixio.fs.access("/etc/config/pptpd") then + return + end + + entry({"admin", "services", "pptpd"}, + alias("admin", "services", "pptpd", "settings"), + _("VPN Server"), 60) + + entry({"admin", "services", "pptpd", "settings"}, + cbi("pptpd/settings"), + _("General Settings"), 10).leaf = true + + entry({"admin", "services", "pptpd", "users"}, + cbi("pptpd/users"), + _("Users Manager"), 20).leaf = true + + entry({"admin", "services", "pptpd", "online"}, + cbi("pptpd/online"), + _("Online Users"), 30).leaf = true +end diff --git a/.github/diy/packages/luci-app-pptpd/luasrc/model/cbi/pptpd/online.lua b/.github/diy/packages/luci-app-pptpd/luasrc/model/cbi/pptpd/online.lua new file mode 100644 index 000000000..ec9b506e1 --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/luasrc/model/cbi/pptpd/online.lua @@ -0,0 +1,100 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth +Copyright 2014 HackPascal + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- + +local data = {} +local ds = require "luci.dispatcher" +local ps = luci.util.execi("/bin/busybox top -bn1 | grep '/usr/sbin/pppd'") +for line in ps do + local pid, ppid, speed, gateway, vip, cip = line:match( + "^ *(%d+) +(%d+) +.+options%.pptpd +(%d+) +(%S.-%S)%:(%S.-%S) +.+ +(.+)" + ) + + local idx = tonumber(pid) + if idx then + data["%02i.%s" % { idx, "online" }] = { + ['PID'] = pid, + ['PPID'] = ppid, + ['SPEED'] = speed, + ['GATEWAY'] = gateway, + ['VIP'] = vip, + ['CIP'] = cip, + ['BLACKLIST'] = 0 + } + end +end + +-- local ps = luci.util.execi("sed -n '/## pptpd-blacklist-/p' /etc/firewall.user") +local ps = luci.util.execi("sed = /etc/firewall.user | sed 'N;s/\\n/:/'") +for line in ps do + local idx, ip = line:match( + "^ *(%d+)%:.+%#%# pptpd%-blacklist%-(.+)" + ) + + local idx = tonumber(idx) + if idx then + data["%02i.%s" % { idx, "blacklist" }] = { + ['PID'] = "-1", + ['PPID'] = "-1", + ['SPEED'] = "-1", + ['GATEWAY'] = "-", + ['VIP'] = "-", + ['CIP'] = ip, + ['BLACKLIST'] = 1 + } + end +end + +f = SimpleForm("processes") +f.reset = false +f.submit = false + +t = f:section(Table, data, translate("Online Users")) +t:option(DummyValue, "GATEWAY", translate("Server IP")) +t:option(DummyValue, "VIP", translate("Client IP")) +t:option(DummyValue, "CIP", translate("IP address")) + +blacklist = t:option(Button, "_blacklist", translate("Blacklist")) +function blacklist.render(self, section, scope) + if self.map:get(section, "BLACKLIST")==0 then + self.title = translate("Add to Blacklist") + self.inputstyle = "remove" + else + self.title = translate("Remove from Blacklist") + self.inputstyle = "apply" + end + + Button.render(self, section, scope) +end +function blacklist.write(self, section) + local CIP = self.map:get(section, "CIP") + if self.map:get(section, "BLACKLIST")==0 then + luci.util.execi("echo 'iptables -A input_rule -s %s -p tcp --dport 1723 -j DROP ## pptpd-blacklist-%s' >> /etc/firewall.user" % { CIP, CIP }) + luci.util.execi("iptables -A input_rule -s %s -p tcp --dport 1723 -j DROP" % { CIP }) + null, self.tag_error[section] = luci.sys.process.signal(self.map:get(section, "PID"), 9) + else + luci.util.execi("sed -i -e '/## pptpd-blacklist-%s/d' /etc/firewall.user" % { CIP }) + luci.util.execi("iptables -D input_rule -s %s -p tcp --dport 1723 -j DROP" % { CIP }) + end + luci.http.redirect(ds.build_url("admin/services/pptpd/online")) +end + +kill = t:option(Button, "_kill", translate("Forced offline")) +kill.inputstyle = "reset" +function kill.write(self, section) + null, self.tag_error[section] = luci.sys.process.signal(self.map:get(section, "PID"), 9) + luci.http.redirect(ds.build_url("admin/services/pptpd/online")) +end + +return f diff --git a/.github/diy/packages/luci-app-pptpd/luasrc/model/cbi/pptpd/settings.lua b/.github/diy/packages/luci-app-pptpd/luasrc/model/cbi/pptpd/settings.lua new file mode 100644 index 000000000..3a2adf10e --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/luasrc/model/cbi/pptpd/settings.lua @@ -0,0 +1,63 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth +Copyright 2014 HackPascal + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- + +m = Map("pptpd") + +s = m:section(TypedSection, "service", translate("General settings")) +s.anonymous = true + +o = s:option(Flag, "enabled", translate("Enable VPN Server")) +o.rmempty = false +function o.write(self, section, value) + if value == "1" then + luci.sys.init.enable("pptpd") + luci.sys.call("/etc/init.d/pptpd start >/dev/null") + else + luci.sys.call("/etc/init.d/pptpd stop >/dev/null") + luci.sys.init.disable("pptpd") + end + return Flag.write(self, section, value) +end + +o = s:option(Value, "localip", translate("Server IP"), translate("VPN Server IP address, it not required.")) +o.datatype = "ipaddr" +o.placeholder = translate("10.0.0.1") +o.rmempty = true +o.default = "" + +o = s:option(Value, "remoteip", translate("Client IP"), translate("VPN Client IP address, it not required.")) +o.placeholder = translate("10.0.0.2-254") +o.rmempty = true +o.default = "" + +o = s:option(DynamicList, "dns", translate("DNS IP address"), translate("This will be sent to the client, it not required.")) +o.placeholder = translate("8.8.8.8") +o.datatype = "ipaddr" +--[[ +function o.write(self, section, value) + luci.sys.call("echo xiaopiao $value >> /tmp/xiaopiao") +end +]]-- + +o = s:option(Flag, "mppe", translate("Enable MPPE Encryption"), translate("Allows 128-bit encrypted connection.")) +o.rmempty = false + +o = s:option(Flag, "nat", translate("Enable NAT Forward"), translate("Allows forwarding traffic.")) +o.rmempty = false + +o = s:option(Flag, "internet", translate("Enable remote service"), translate("Allows remote computers on the Internet to connect to VPN Server.")) +o.rmempty = false + +return m diff --git a/.github/diy/packages/luci-app-pptpd/luasrc/model/cbi/pptpd/users.lua b/.github/diy/packages/luci-app-pptpd/luasrc/model/cbi/pptpd/users.lua new file mode 100644 index 000000000..b53224027 --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/luasrc/model/cbi/pptpd/users.lua @@ -0,0 +1,49 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth +Copyright 2014 HackPascal + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- + +m = Map("pptpd") + +s = m:section(TypedSection, "login", translate("Users Manager")) +s.addremove = true +s.anonymous = true +s.template = "cbi/tblsection" + +o = s:option(Flag, "enabled", translate("Enabled")) +o.rmempty = false + +o = s:option(Value, "username", translate("User name")) +o.placeholder = translate("User name") +o.rmempty = true + +o = s:option(Value, "password", translate("Password")) +o.password = true +o.rmempty = true + +-- DummyValue +o = s:option(Value, "ipaddress", translate("IP address")) +o.placeholder = translate("Automatically") +o.datatype = "ipaddr" +-- o.value = translate("Automatically (No support)") +o.rmempty = true +function o.cfgvalue(self, section) + value = self.map:get(section, "ipaddress") + return value=="*" and "" or value +end +function o.remove(self, section) + Value.write(self, section, "*") + --luci.sys.call("/etc/init.d/pptpd restart >/dev/null") +end + +return m diff --git a/.github/diy/packages/luci-app-pptpd/po/zh-cn/pptpd.po b/.github/diy/packages/luci-app-pptpd/po/zh-cn/pptpd.po new file mode 100644 index 000000000..2b097f1ee --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/po/zh-cn/pptpd.po @@ -0,0 +1,87 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2015-05-13\n" +"Last-Translator: ming1054\n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Pootle 2.0.6\n" + +msgid "Users Manager" +msgstr "用户管理" + +msgid "Enabled" +msgstr "启用" + +msgid "User name" +msgstr "用户名" + +msgid "Password" +msgstr "密码" + +msgid "IP address" +msgstr "IP 地址" + +msgid "Automatically" +msgstr "自动分配" + +msgid "General settings" +msgstr "基本设置" + +msgid "Enable VPN Server" +msgstr "启用 VPN 服务器" + +msgid "Server IP" +msgstr "服务器 IP 地址" + +msgid "VPN Server IP address, it not required." +msgstr "VPN 服务器远程地址,留空将自动设置。" + +msgid "Client IP" +msgstr "客户端 IP 地址" + +msgid "VPN Client IP address, it not required." +msgstr "分配给客户端的 IP 地址范围,留空将自动设置。" + +msgid "DNS IP address" +msgstr "DNS IP 地址" + +msgid "This will be sent to the client, it not required." +msgstr "设置 VPN 服务器默认 DNS 服务器,该设置非必须。" + +msgid "Enable MPPE Encryption" +msgstr "启用MPPE 加密" + +msgid "Allows 128-bit encrypted connection." +msgstr "允许使用 128 位加密连接。" + +msgid "Enable NAT Forward" +msgstr "启用 NAT 转发" + +msgid "Allows forwarding traffic." +msgstr "允许转发流量" + +msgid "Enable remote service" +msgstr "启用远程服务" + +msgid "Allows remote computers on the Internet to connect to VPN Server." +msgstr "允许远程计算机通过互联网连接到此 VPN 服务器。" + +msgid "Online Users" +msgstr "在线用户" + +msgid "Blacklist" +msgstr "黑名单" + +msgid "Add to Blacklist" +msgstr "加入黑名单" + +msgid "Remove from Blacklist" +msgstr "从黑名单中移除" + +msgid "Forced offline" +msgstr "强制下线" diff --git a/.github/diy/packages/luci-app-pptpd/root/etc/config/pptpd b/.github/diy/packages/luci-app-pptpd/root/etc/config/pptpd new file mode 100644 index 000000000..3a12098b9 --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/root/etc/config/pptpd @@ -0,0 +1,16 @@ + +config service 'pptpd' + option localip '10.0.0.1' + option remoteip '10.0.0.2-254' + option nat '1' + option internet '1' + list dns '114.114.114.114' + option mppe '1' + option enabled '0' + +config login + option enabled '1' + option ipaddress '*' + option username 'username' + option password 'password' + diff --git a/.github/diy/packages/luci-app-pptpd/root/etc/init.d/pptpd b/.github/diy/packages/luci-app-pptpd/root/etc/init.d/pptpd new file mode 100644 index 000000000..383abc286 --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/root/etc/init.d/pptpd @@ -0,0 +1,102 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org + +START=60 +BIN=/usr/sbin/pptpd +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid +CONFIG=/var/etc/pptpd.conf +CHAP_SECRETS=/var/etc/chap-secrets + +setup_dns() { + [ -n "$1" ] || return 0 + echo ms-dns $1>>/etc/ppp/options.pptpd +} +setup_login() { + local section="$1" + + ## Code by VPN Server ## + config_get enabled "$section" enabled + [ "$enabled" -eq 0 ] && return 0 + + config_get ipaddress "$section" ipaddress + [ -n "$ipaddress" ] || local ipaddress = "*" + ## Code by VPN Server ## + + config_get username "$section" username + config_get password "$section" password + [ -n "$username" ] || return 0 + [ -n "$password" ] || return 0 + + echo "$username * $password $ipaddress" >> $CHAP_SECRETS + ## echo "$username pptp-server $password *" >> $CHAP_SECRETS +} + +setup_config() { + local section="$1" + + config_get enabled "$section" enabled + [ "$enabled" -eq 0 ] && return 1 + + mkdir -p /var/etc + cp /etc/pptpd.conf $CONFIG + + config_get localip "$section" localip + config_get remoteip "$section" remoteip + [ -n "$localip" ] && echo "localip $localip" >> $CONFIG + [ -n "$remoteip" ] && echo "remoteip $remoteip" >> $CONFIG + + ## Code by VPN Server ## + config_get nat "$section" nat + config_get internet "$section" internet + echo Update firewall ... + sed -i -e "/## luci-app-pptpd/d" /etc/firewall.user + if [ "$nat" -eq 1 ]; then + echo "iptables -A forwarding_rule -s ${localip%.*}.0/24 -j ACCEPT ## luci-app-pptpd" >> /etc/firewall.user + echo Update NAT rule ... + fi + if [ "$internet" -eq 1 ]; then + echo "iptables -A input_rule -i ppp+ -p tcp -m tcp --dport 1723 -j ACCEPT ## luci-app-pptpd" >> /etc/firewall.user + echo "iptables -A input_rule -i ppp+ -p gre -j ACCEPT ## luci-app-pptpd" >> /etc/firewall.user + echo Update input rule ... + fi + fw3 restart + config_get mppe "$section" mppe + sed -i -e 's/#*mppe/mppe/g' /etc/ppp/options.pptpd + if [ "$mppe" -eq 0 ]; then + sed -i -e 's/mppe/#mppe/g' /etc/ppp/options.pptpd + fi + sed -i -e '/ms-dns/d' /etc/ppp/options.pptpd + config_list_foreach "pptpd" "dns" setup_dns + ## Code by VPN Server ## + + return 0 +} + +start_pptpd() { + [ -f $DEFAULT ] && . $DEFAULT + mkdir -p $RUN_D + for m in arc4 sha1_generic slhc crc-ccitt ppp_generic ppp_async ppp_mppe; do + insmod $m >/dev/null 2>&1 + done + ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets + service_start $BIN $OPTIONS -c $CONFIG +} + +start() { + config_load pptpd + setup_config pptpd || return + rm -f $CHAP_SECRETS + config_foreach setup_login login + start_pptpd +} + +stop() { + service_stop $BIN + + ## Code by VPN Server ## + sed -i -e "/## luci-app-pptpd/d" /etc/firewall.user + fw3 restart + ## Code by VPN Server ## +} diff --git a/.github/diy/packages/luci-app-pptpd/root/etc/ppp/options.pptpd b/.github/diy/packages/luci-app-pptpd/root/etc/ppp/options.pptpd new file mode 100644 index 000000000..3b356b496 --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/root/etc/ppp/options.pptpd @@ -0,0 +1,22 @@ +#debug +#logfile /tmp/pptp-server.log +auth +name "pptp-server" +lcp-echo-failure 3 +lcp-echo-interval 60 +default-asyncmap +mtu 1482 +mru 1482 +nobsdcomp +nodeflate +proxyarp +#nomppc +#mppe required,no40,no56,stateless +require-mschap-v2 +refuse-chap +refuse-mschap +refuse-eap +refuse-pap +#plugin radius.so +#radius-config-file /etc/radius.conf +ms-dns 114.114.114.114 diff --git a/.github/diy/packages/luci-app-pptpd/root/etc/uci-defaults/luci-pptpd b/.github/diy/packages/luci-app-pptpd/root/etc/uci-defaults/luci-pptpd new file mode 100644 index 000000000..3a593b890 --- /dev/null +++ b/.github/diy/packages/luci-app-pptpd/root/etc/uci-defaults/luci-pptpd @@ -0,0 +1,14 @@ +#!/bin/sh + +[ ! -f "/usr/share/ucitrack/luci-app-pptpd.json" ] && { + cat > /usr/share/ucitrack/luci-app-pptpd.json << EEOF +{ + "config": "pptpd", + "init": "pptpd" +} +EEOF +} + +chmod +x /etc/init.d/pptpd +rm -f /tmp/luci-indexcahe +exit 0 diff --git a/.github/diy/packages/luci-app-public-ip-monitor/po/zh_Hans/public_ip_monitor.po b/.github/diy/packages/luci-app-public-ip-monitor/po/zh_Hans/public_ip_monitor.po new file mode 100644 index 000000000..7edd900ae --- /dev/null +++ b/.github/diy/packages/luci-app-public-ip-monitor/po/zh_Hans/public_ip_monitor.po @@ -0,0 +1,151 @@ +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: public_ip_monitor.js:64 public_ip_monitor.js:72 +msgid "From" +msgstr "从" + +#: public_ip_monitor.js:261 +msgid "General Settings" +msgstr "常规设置" + +#: public_ip_monitor.js:312 +msgid "History Location" +msgstr "历史记录位置" + +#: public_ip_monitor.js:321 +msgid "IPv4" +msgstr "IPv4" + +#: public_ip_monitor.js:276 +msgid "IPv4 Check Interval" +msgstr "IPv4 检查间隔" + +#: public_ip_monitor.js:129 +msgid "IPv4 Script" +msgstr "IPv4 脚本" + +#: public_ip_monitor.js:282 +msgid "IPv4 Script Location" +msgstr "IPv4 脚本位置" + +#: public_ip_monitor.js:270 +msgid "IPv4 Service" +msgstr "IPv4 服务" + +#: public_ip_monitor.js:325 +msgid "IPv6" +msgstr "IPv6" + +#: public_ip_monitor.js:300 +msgid "IPv6 Check Interval" +msgstr "IPv6 检查间隔" + +#: public_ip_monitor.js:137 +msgid "IPv6 Script" +msgstr "IPv6 脚本" + +#: public_ip_monitor.js:306 +msgid "IPv6 Script Location" +msgstr "IPv6 脚本位置" + +#: public_ip_monitor.js:294 +msgid "IPv6 Service" +msgstr "IPv6 服务" + +#: public_ip_monitor.js:264 +msgid "Monitor IPv4" +msgstr "监控 IPv4" + +#: public_ip_monitor.js:288 +msgid "Monitor IPv6" +msgstr "监控 IPv6" + +#: public_ip_monitor.js:264 +msgid "Monitor if there your public ipv4 address." +msgstr "监控您的公网 IPv4 地址。" + +#: public_ip_monitor.js:288 +msgid "Monitor if there your public ipv6 address." +msgstr "监控您的公网 IPv6 地址。" + +#: public_ip_monitor.js:97 +#: public_ip_monitor.js:28 public_ip_monitor.js:29 public_ip_monitor.js:46 +#: public_ip_monitor.js:47 public_ip_monitor.js:48 public_ip_monitor.js:91 +msgid "N/A" +msgstr "不可用" + +#: public_ip_monitor.js:78 public_ip_monitor.js:82 +msgid "No entries available" +msgstr "无可用条目" + +#: public_ip_monitor.js:91 public_ip_monitor.js:97 +msgid "Not monitored" +msgstr "未监控" + +#: public_ip_monitor.js:257 +msgid "Overview" +msgstr "概览" + +#: public_ip_monitor.js:252 +msgid "Public IP Monitor" +msgstr "公网 IP 监控" + +#: public_ip_monitor.js:107 +msgid "Public IPv4 Change History" +msgstr "公网 IPv4 变更历史" + +#: public_ip_monitor.js:88 +msgid "Public IPv4:" +msgstr "公网 IPv4:" + +#: public_ip_monitor.js:116 +msgid "Public IPv6 Change History" +msgstr "公网 IPv6 变更历史" + +#: public_ip_monitor.js:94 +msgid "Public IPv6:" +msgstr "公网 IPv6:" + +#: public_ip_monitor.js:130 +msgid "Script to run when the public IPv4 changes, use $1 to retrieve the new IPv4 inside the script." +msgstr "当公网 IPv4 发生变化时运行的脚本,使用 $1 在脚本中获取新的 IPv4。" + +#: public_ip_monitor.js:138 +msgid "Script to run when the public IPv6 changes, use $1 to retrieve the new IPv6 inside the script." +msgstr "当公网 IPv6 发生变化时运行的脚本,使用 $1 在脚本中获取新的 IPv6。" + +#: public_ip_monitor.js:276 public_ip_monitor.js:300 +msgid "The interval in seconds which we will retrieve data from the service." +msgstr "从服务获取数据的时间间隔(秒)。" + +#: public_ip_monitor.js:282 +msgid "The location of the IPv4 on change script to be triggered, use $1 to get the new IPv4 as input." +msgstr "IPv4 变更时触发的脚本位置,使用 $1 获取新的 IPv4 作为输入。" + +#: public_ip_monitor.js:306 +msgid "The location of the IPv6 on change script to be triggered, use $1 to get the new IPv6 as input." +msgstr "IPv6 变更时触发的脚本位置,使用 $1 获取新的 IPv6 作为输入。" + +#: public_ip_monitor.js:312 +msgid "The location the IPv4 and IPv6 history is stored." +msgstr "IPv4 和 IPv6 历史记录的存储位置。" + +#: public_ip_monitor.js:270 +msgid "The service that we can retrieve the public IPv4." +msgstr "可以获取公网 IPv4 的服务。" + +#: public_ip_monitor.js:294 +msgid "The service that we can retrieve the public IPv6." +msgstr "可以获取公网 IPv6 的服务。" + +#: public_ip_monitor.js:253 +msgid "This monitors changes on the internet-facing public IP and trigger tasks when a change occurs." +msgstr "监控互联网公网 IP 的变化,并在发生变化时触发任务。" + +#: public_ip_monitor.js:63 public_ip_monitor.js:71 +msgid "Timestamp" +msgstr "时间戳" + +#: public_ip_monitor.js:65 public_ip_monitor.js:73 +msgid "To" +msgstr "到" diff --git a/.github/diy/packages/luci-app-transmission/root/etc/uci-defaults/luci-transmission b/.github/diy/packages/luci-app-transmission/root/etc/uci-defaults/luci-transmission new file mode 100644 index 000000000..5f8bfe9fa --- /dev/null +++ b/.github/diy/packages/luci-app-transmission/root/etc/uci-defaults/luci-transmission @@ -0,0 +1,4 @@ + +sed -i "s/reload_service(/reload_service1(/" /etc/init.d/transmission + +exit 0 diff --git a/.github/diy/packages/luci-app-xray/po/zh_Hans/xray.zh-cn.po b/.github/diy/packages/luci-app-xray/po/zh_Hans/xray.zh-cn.po new file mode 100644 index 000000000..078225b47 --- /dev/null +++ b/.github/diy/packages/luci-app-xray/po/zh_Hans/xray.zh-cn.po @@ -0,0 +1,798 @@ +msgid "" +msgstr "" +"Project-Id-Version: 2.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-09 19:09+0080\n" +"PO-Revision-Date: 2025-03-01 13:22+0080\n" +"Last-Translator: xiechangan123\n" +"Language: zh-cn\n" +"Plural-Forms: nplurals=2; plural=n!=1;\n" +"MIME-Version: 1.1\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" +"\n" +"X-Loco-Source-Locale: zh_CN\n" +"X-Loco-Parser: loco_parse_po\n" + +msgid "Xray" +msgstr "Xray" + +msgid "General Settings" +msgstr "通用设置" + +msgid "Xray Executable Path" +msgstr "Xray运行目录" + +msgid "Enable Xray Service" +msgstr "启用Xray服务" + +msgid "Uncheck this to disable the entire Xray service." +msgstr "取消选中禁用全部Xray服务。" + +msgid "TCP Server (IPv4)" +msgstr "TCP服务器(IPv4)" + +msgid "Select multiple outbound servers to enable load balancing. Select none to disable TCP Outbound." +msgstr "选择多个出站服务器以启用负载平衡,未设置将禁用TCP出站。" + +msgid "UDP Server (IPv4)" +msgstr "UDP服务器(IPv4)" + +msgid "Select multiple outbound servers to enable load balancing. Select none to disable UDP Outbound." +msgstr "选择多个出站服务器以启用负载平衡,未设置将禁用UDP出站。" + +msgid "TCP Server (IPv6)" +msgstr "TCP服务器(IPv6)" + +msgid "UDP Server (IPv6)" +msgstr "UDP服务器(IPv6)" + +msgid "Balancer Strategy" +msgstr "负载均衡器配置" + +msgid "Strategy leastPing requires observatory (see "Extra Options" tab) to be enabled." +msgstr "配置leastPing需要启用后台连接观测(参阅“扩展选项”选项卡)。" + +msgid "Enable Transparent Proxy" +msgstr "启用透明代理" + +msgid "This enables DNS query forwarding and TProxy for both TCP and UDP connections." +msgstr "启用TCP和UDP透明代理、DNS查询转发。" + +msgid "Enable Sniffing" +msgstr "启用域名嗅探" + +msgid "If sniffing is enabled, requests will be routed according to domain settings in \"DNS Settings\" tab." +msgstr "如果启用,DNS请求会按照DNS设置选项中的规则进行转发。" + +msgid "Bittorrent Direct" +msgstr "BT下载直连" + +msgid "If enabled, no bittorrent request will be forwarded through Xray." +msgstr "如果启用,BT下载请求不会被Xray转发。" + +msgid "Enable Xray API Service" +msgstr "启用Xray API服务" + +msgid "Xray API Service uses port 8080 and GRPC protocol. Also callable via xray api or ubus call xray. See here for help." +msgstr "使用8080端口和GRPC协议的Xray API服务,也可通过xray api或ubus call xray调用。参阅此处获取帮助。" + +msgid "Server List" +msgstr "服务器列表" + +msgid "Xray Servers" +msgstr "服务器列表" + +msgid "Servers are referenced by index (order in the following list). Deleting servers may result in changes of upstream servers actually used by proxy and bridge." +msgstr "服务器按索引引用(以列表中的顺序),删除服务器可能会导致代理和桥接使用的上游服务器发生更改。" + +msgid "Alias (optional)" +msgstr "别名(可选)" + +msgid "Server Hostname" +msgstr "服务器" + +msgid "Domain Strategy" +msgstr "域名策略" + +msgid "Server Port" +msgstr "端口" + +msgid "UserId / Password" +msgstr "UID/密码" + +msgid "Fill user_id for vmess / VLESS, or password for shadowsocks / trojan (also supports Xray UUID Mapping)" +msgstr "vmess/vless使用UID,shadowsocks/trojan使用密码(支持Xray UUID映射)。" + +msgid "Protocol Settings" +msgstr "协议设置" + +msgid "Protocol" +msgstr "协议" + +msgid "Encrypt Method" +msgstr "加密方式" + +msgid "AlterID" +msgstr "额外ID" + +msgid "Transport Settings" +msgstr "传输设置" + +msgid "Transport" +msgstr "传输方式" + +msgid "Fake Header Type" +msgstr "伪装报文类型" + +msgid "Dialer Proxy" +msgstr "拨号代理" + +msgid "Similar to ProxySettings.Tag" +msgstr "类似于出站代理配置" + +msgid "" +"Configurations here override settings in the previous tabs with the following rules: " +"
    1. Object values will be replaced recursively so settings in previous tabs matter.
    2. " +"
    3. Arrays will be replaced entirely instead of being merged.
    4. " +"
    5. Tag tag is ignored.
    Override rules here may be changed later. Use this only for experimental or pre-release features." +msgstr "" +"自定义配置使用以下规则覆盖先前选项卡中的设置:" +"
    1. 对象值将以递归方式替换,因此先前选项卡中的设置很重要。
    2. " +"
    3. 数组将被完全替换,而不是被合并。
    4. " +"
    5. 标签 tag 被忽略。
    覆盖规则可能会更改。仅将其用于实验性或预发布功能。" + +msgid "Host" +msgstr "主机名" + +msgid "Path" +msgstr "路径" + +msgid "Maximum Transmission Unit" +msgstr "最大传输单元(MTU)" + +msgid "Transmission Time Interval" +msgstr "传输间隔时间(TTL)" + +msgid "Uplink Capacity" +msgstr "上行容量(MB)" + +msgid "Downlink Capacity" +msgstr "下行容量(MB)" + +msgid "Read Buffer Size" +msgstr "读取缓冲大小" + +msgid "Write Buffer Size" +msgstr "写入缓冲大小" + +msgid "Congestion Control" +msgstr "拥塞控制" + +msgid "Seed" +msgstr "加密种子" + +msgid "Security" +msgstr "加密" + +msgid "Key" +msgstr "密钥" + +msgid "Service Name" +msgstr "服务名" + +msgid "Multi Mode" +msgstr "多路复用" + +msgid "Health Check" +msgstr "健康检查" + +msgid "Permit Without Stream" +msgstr "允许空载检查" + +msgid "Proxy Settings" +msgstr "代理设置" + +msgid "Transparent proxy port (TCP4)" +msgstr "TCP透明代理端口(TCP4)" + +msgid "Transparent proxy port (UDP4)" +msgstr "UDP透明代理端口(UDP4)" + +msgid "Transparent proxy port (TCP6)" +msgstr "TCP透明代理端口(TCP6)" + +msgid "Transparent proxy port (UDP6)" +msgstr "UDP透明代理端口(UDP6)" + +msgid "Socks5 proxy port" +msgstr "Socks5代理端口" + +msgid "HTTP proxy port" +msgstr "HTTP代理端口" + +msgid "Bypass tproxy for uids" +msgstr "绕过uid透明代理" + +msgid "Processes started by users with these uids won't be forwarded through Xray." +msgstr "使用uid(用户ID)启动的进程不会被Xray转发。" + +msgid "Bypass tproxy for gids" +msgstr "绕过gid透明代理" + +msgid "Processes started by users in groups with these gids won't be forwarded through Xray." +msgstr "使用gid(组ID)启动的进程不会被Xray转发。" + +msgid "Priority for firewall rules" +msgstr "防火墙规则优先级" + +msgid "See firewall status page for rules Xray used and Netfilter Internal Priority for reference." +msgstr "查看防火墙状态页以了解Xray使用的规则。参阅Netfilter Internal Priority获取帮助。" + +msgid "Xray DNS Server Port" +msgstr "DNS端口" + +msgid "Do not use port 53 (dnsmasq), port 5353 (mDNS) or other common ports" +msgstr "不要使用53(dnsmasq)和5353(mDNS)或其他常见端口。" + +msgid "Extra DNS Server Ports" +msgstr "额外DNS端口" + +msgid "" +"Listen for DNS Requests on multiple ports (all of which serves as dnsmasq " +"upstream servers).
    For example if Xray DNS Server Port is 5300 and use 3 " +"extra ports, 5300 - 5303 will be used for DNS requests.
    Increasing this " +"value may help reduce the possibility of temporary DNS lookup failures." +msgstr "" +"在多个端口上监听DNS请求(所有端口都用作dnsmasq上游服务器)。" +"
    例如Xray DNS服务器端口为5300并使用3个额外端口,则5300-5303将用于DNS请求。" +"
    添加额外端口可能有助于减少临时DNS查找失败的可能性。" + +msgid "Socket Mark Number" +msgstr "Socket标记号" + +msgid "Avoid proxy loopback problems with local (gateway) traffic" +msgstr "避免代理流量发送到网关。" + +msgid "Interfaces for tproxy" +msgstr "透明代理接口" + +msgid "Enable transparent proxy on these interfaces." +msgstr "在这些接口上启用透明代理" + +msgid "WARNING: These features are experimental, may cause a lot of problems and are not guaranteed to be compatible across minor versions." +msgstr "警告:这些功能是实验性的,可能会导致很多问题,无法保证跨次要版本兼容。" + +msgid "Inbounds" +msgstr "入站代理" + +msgid "Transparent proxy port (TCP4)" +msgstr "透明代理端口(TCP4)" + +msgid "Transparent proxy port (UDP4)" +msgstr "透明代理端口(UDP4)" + +msgid "Transparent proxy port (TCP6)" +msgstr "透明代理端口(TCP6)" + +msgid "Transparent proxy port (UDP6)" +msgstr "透明代理端口(UDP6)" + +msgid "Address Pool (IPv4)" +msgstr "地址池(IPv4)" + +msgid "Address Pool Size (IPv4)" +msgstr "地址池大小(IPv4)" + +msgid "Address Pool (IPv6)" +msgstr "地址池(IPv6)" + +msgid "Address Pool Size (IPv6)" +msgstr "地址池大小(IPv6)" + +msgid "FakeDNS Routing" +msgstr "FakeDNS路由" + +msgid "See FakeDNS for details." +msgstr "参阅FakeDNS获取帮助。" + +msgid "Extra Inbounds" +msgstr "扩展入站" + +msgid "Add more socks5 / http inbounds and redirect to other outbounds." +msgstr "添加更多socks5/http入站并重定向到其他出站。" + +msgid "Listen Address" +msgstr "监听地址" + +msgid "Inbound Type" +msgstr "入站类型" + +msgid "LAN Hosts Access Control" +msgstr "访问控制" + +msgid "Devices to enable IPv4 tproxy" +msgstr "启用IPv4透明代理的设备" + +msgid "Enable IPv4 transparent proxy on these interfaces / network devices." +msgstr "在这些接口/网络设备上启用IPv4透明代理。" + +msgid "Devices to enable IPv6 tproxy" +msgstr "启用IPv6透明代理的设备" + +msgid "Enable IPv6 transparent proxy on these interfaces / network devices." +msgstr "在这些接口/网络设备上启用IPv6透明代理。" + +msgid "Devices to disable IPv4 tproxy" +msgstr "禁用IPv4透明代理的设备" + +msgid "This overrides per-device settings below. FakeDNS and manual transparent proxy won't be affected by this option." +msgstr "这将覆盖下面的设备设置,FakeDNS和手动透明代理不会受到此选项的影响。" + +msgid "Devices to disable IPv6 tproxy" +msgstr "禁用IPv6透明代理的设备" + +msgid "Per-device settings here override per-interface enabling settings above. FakeDNS and manual transparent proxy won't be affected by these options." +msgstr "此处的设备设置将覆盖上述已启用接口设置,FakeDNS和手动透明代理不会受到这些选项的影响。" + +msgid "MAC Address" +msgstr "MAC地址" + +msgid "Extra inbound (TCP4)" +msgstr "扩展入站(TCP4)" + +msgid "Extra inbound (UDP4)" +msgstr "扩展入站(UDP4)" + +msgid "Extra inbound (TCP6)" +msgstr "扩展入站(TCP6)" + +msgid "Extra inbound (UDP6)" +msgstr "扩展入站(UDP6)" + +msgid "Dynamic Direct" +msgstr "动态直连" + +msgid "Access Control Strategy (IPv4)" +msgstr "访问控制策略(IPv4)" + +msgid "Access Control Strategy (IPv6)" +msgstr "访问控制策略(IPv6)" + +msgid "Enable for IPv4 TCP" +msgstr "启用IPv4 TCP" + +msgid "This should improve performance with large number of connections." +msgstr "应该可以提高大量连接的性能。" + +msgid "Enable for IPv4 UDP" +msgstr "启用IPv4 UDP" + +msgid "This may cause problems but worth a try." +msgstr "可能会出问题,但值得一试。" + +msgid "Enable for IPv6 TCP" +msgstr "启用IPv6 TCP" + +msgid "This may not be very useful but it should be good enough for a try." +msgstr "可能不是很有用,但应该足够好,值得一试。" + +msgid "Enable for IPv6 UDP" +msgstr "启用IPv6 UDP" + +msgid "This may cause problems and is not very useful at the same time. Not recommended." +msgstr "可能会出问题,同时不是很有用,不推荐。" + +msgid "Dynamic Direct Timeout" +msgstr "动态直连超时" + +msgid "Larger value consumes more memory and performs generally better. Unit in seconds." +msgstr "值越大,消耗的内存越多,性能通常越好,以秒为单位。" + +msgid "Override IPv4 TTL" +msgstr "覆盖IPv4 TTL" + +msgid "Strongly not recommended. Only used for some network environments with specific restrictions." +msgstr "强烈不推荐,仅用于某些特殊限制的网络环境。" + +msgid "Override IPv6 Hop Limit" +msgstr "覆盖IPv6 Hop Limit" + +msgid "TTL / Hop Limit Match" +msgstr "TTL/Hop Limit匹配" + +msgid "Only override TTL / hop limit for packets with specific TTL / hop limit." +msgstr "仅覆盖特定TTL/hop limit数据包的TTL/hop limit。" + +msgid "Bypass Transparent Proxy" +msgstr "绕过透明代理" + +msgid "DNS Settings" +msgstr "DNS设置" + +msgid "DNS" +msgstr "路由设置" + +msgid "Fast DNS" +msgstr "快速DNS" + +msgid "DNS for resolving outbound domains and following bypassed domains" +msgstr "用于解析出站域名和绕过域名。" + +msgid "Bypassed domain rules" +msgstr "绕过域名规则" + +msgid "Specify rules like geosite:cn or domain:bilibili.com. See documentation for details." +msgstr "指定例如geosite:cn或domain:bilibili.com等规则。参阅此处获取帮助。" + +msgid "" +"Specify rules like domain:bilibili.com or see documentation for details." +"
    In order to use Geosite rules you need a valid resource file " +"/usr/share/xray/geosite.dat.
    Compile your firmware again with data files " +"to use Geosite rules, or download one and upload it to your router." +msgstr "" +"指定例如domain:bilibili.com等规则,或参阅此处获取帮助。" +"为了使用Geosite规则,需要一个有效的资源文件/usr/share/xray/geosite.dat" +"添加资源文件后重新编译固件,或从" +"此处下载后上传到路由器。" + +msgid "Secure DNS" +msgstr "安全DNS" + +msgid "DNS for resolving known polluted domains (specify forwarded domain rules here)" +msgstr "用于解析已知污染的域名(指定域名转发规则)。" + +msgid "Forwarded domain rules" +msgstr "域名转发规则" + +msgid "Specify rules like geosite:geolocation-!cn or domain:youtube.com. See documentation for details." +msgstr "指定例如geosite:geolocation-!cn或domain:youtube.com等规则。参阅此处获取帮助。" + +msgid "" +"Specify rules like domain:youtube.com or see documentation for details." +"
    In order to use Geosite rules you need a valid resource file " +"/usr/share/xray/geosite.dat.
    Compile your firmware again with data files " +"to use Geosite rules, or download one and upload it to your router." +msgstr "" +"指定例如domain:youtube.com或参阅此处获取帮助。" +"为了使用Geosite规则,需要一个有效的资源文件/usr/share/xray/geosite.dat" +"添加资源文件后重新编译固件,或从" +"此处下载后上传到路由器。" + +msgid "Default DNS" +msgstr "默认DNS" + +msgid "DNS for resolving other sites (not in the rules above) and DNS records other than A or AAAA (TXT and MX for example)" +msgstr "用于解析其他站点的DNS(不在上述规则中)和A或AAAA以外的DNS记录(例如TXT和MX)。" + +msgid "Blocked domain rules" +msgstr "阻止域名规则" + +msgid "Specify rules like geosite:category-ads or domain:baidu.com. See documentation for details." +msgstr "指定例如geosite:category-ads或domain:baidu.com等规则。参阅此处获取帮助。" + +msgid "" +"Specify rules like domain:baidu.com or see documentation for details." +"
    In order to use Geosite rules you need a valid resource file " +"/usr/share/xray/geosite.dat.
    Compile your firmware again with data files " +"to use Geosite rules, or download one and upload it to your router." +msgstr "" +"指定例如domain:baidu.com或参阅此处获取帮助。" +"为了使用Geosite规则,需要一个有效的资源文件/usr/share/xray/geosite.dat" +"添加资源文件后重新编译固件,或从" +"此处下载后上传到路由器。" + +msgid "Blocked to loopback" +msgstr "阻止回环" + +msgid "Return 127.127.127.127 as response for blocked domain rules. If not selected, NXDOMAIN will be returned." +msgstr "对阻止域名规则返回127.127.127.127,未设置将返回回环地址Loopback Address。" + +msgid "Transparent Proxy Rules" +msgstr "透明代理规则" + +msgid "Outbound Routing" +msgstr "出站路由" + +msgid "GeoIP Direct Code List (IPv4)" +msgstr "GeoIP直连域名列表(IPv4)" + +msgid "Hosts in these GeoIP sets will not be forwarded through Xray. Remove all items to forward all non-private hosts." +msgstr "此GeoIP列表中的域名不会被Xray转发,未设置即为转发所有非私有域名。" + +msgid "GeoIP Direct Code List (IPv6)" +msgstr "GeoIP直连域名列表(IPv6)" + +msgid "" +"Resource file /usr/share/xray/geoip.dat not exist. All network traffic will " +"be forwarded.
    Compile your firmware again with data files to use this " +"feature, or
    download one " +"(maybe disable transparent proxy first) and upload it to your router." +msgstr "" +"资源文件/usr/share/xray/geoip.dat不存在。所有网络将被转发。" +"添加资源文件后重新编译固件,或从此处下载后上传到路由器。" + +msgid "Routing Domain Strategy" +msgstr "域名路由策略" + +msgid "Domain resolution strategy when matching domain against rules. (For tproxy, this is effective only when sniffing is enabled.)" +msgstr "域名与规则匹配时的域名解析策略(对于透明代理,仅在启用域名嗅探时有效)。" + +msgid "Bypassed IP" +msgstr "绕过IP" + +msgid "Requests to these IPs won't be forwarded through Xray." +msgstr "这些IP不会被Xray转发。" + +msgid "Forwarded IP" +msgstr "转发IP" + +msgid "Requests to these IPs will always be handled by Xray (but still might be bypassed by Xray itself, like private addresses).
    Useful for some really strange network. If you really need to forward private addresses, try Manual Transparent Proxy below." +msgstr "这些IP始终由Xray转发(私有地址可能会被Xray绕过)。
    对一些奇怪的网络有用,确需转发私人地址,尝试下面的手动透明代理。" + +msgid "Default Ports Policy" +msgstr "默认端口策略" + +msgid "Forwarded TCP Ports" +msgstr "TCP转发端口" + +msgid "Requests to these TCP Ports will be forwarded through Xray. Recommended ports: 80, 443, 853" +msgstr "对这些TCP端口的请求会被Xray转发。建议端口:80、443、853。" + +msgid "Forwarded UDP Ports" +msgstr "UDP转发端口" + +msgid "Requests to these UDP Ports will be forwarded through Xray. Recommended ports: 53, 443" +msgstr "对这些UDP端口的请求会被Xray转发。建议端口:53、443。" + +msgid "Bypassed TCP Ports" +msgstr "TCP绕过端口" + +msgid "Requests to these TCP Ports won't be forwarded through Xray." +msgstr "对这些TCP端口的请求不会被Xray转发。" + +msgid "Bypassed UDP Ports" +msgstr "UDP绕过端口" + +msgid "Requests to these UDP Ports won't be forwarded through Xray." +msgstr "对这些UDP端口的请求不会被Xray转发。" + +msgid "Manual Transparent Proxy" +msgstr "自定义透明代理" + +msgid "Compared to iptables REDIRECT, Xray could do NAT46 / NAT64 (for example accessing IPv6 only sites). See FakeDNS for details." +msgstr "相比iptables重定向,Xray可以进行NAT46/NAT64(对于某些仅IPv6的网站)。参阅FakeDNS获取帮助。" + +msgid "Source Address" +msgstr "源地址" + +msgid "Source Port" +msgstr "源端口" + +msgid "Destination Address" +msgstr "目标地址" + +msgid "Destination Port" +msgstr "目标端口" + +msgid "Domain names to associate" +msgstr "关联域名" + +msgid "Exempt rebind protection" +msgstr "豁免重绑定保护" + +msgid "Avoid dnsmasq filtering RFC1918 IP addresses (and some TESTNET addresses as well) from result." +msgstr "避免Dnsmasq过滤RFC1918私有IP地址及某些测试网IP地址。" + +msgid "Force Forward (TCP)" +msgstr "强制转发(TCP)" + +msgid "Force Forward server (TCP)" +msgstr "强制转发服务器(TCP)" + +msgid "Force Forward (UDP)" +msgstr "强制转发(UDP)" + +msgid "Force Forward server (UDP)" +msgstr "强制转发服务器(UDP)" + +msgid "This destination must be forwarded through an outbound server." +msgstr "此目标必须通过出站服务器转发。" + +msgid "HTTPS Server" +msgstr "HTTPS服务器" + +msgid "Enable Xray HTTPS Server" +msgstr "启用Xray HTTPS服务" + +msgid "This will start a HTTPS server which serves both as an inbound for Xray and a reverse proxy web server." +msgstr "这将启动一个HTTPS服务器,该服务器既用作Xray的入站服务器,又用作反向代理Web服务器。" + +msgid "Xray HTTPS Server Port" +msgstr "Xray HTTPS服务端口" + +msgid "This port needs to be set accept input manually in firewall settings." +msgstr "此端口需要在系统防火墙accept input中手动设置。" + +msgid "Certificate File" +msgstr "证书" + +msgid "Private Key File" +msgstr "私钥" + +msgid "Only protocols which support fallback are available. Note that REALITY does not support fallback right now." +msgstr "只支持可以回落的协议。注意REALITY目前不支持回落。" + +msgid "Default Fallback HTTP Server" +msgstr "默认回落HTTP服务器" + +msgid "Only HTTP/1.1 supported here. For HTTP/2 upstream, use Fallback Servers below" +msgstr "只支持HTTP/1.1。如使用HTTP/2,使用下面的回落服务。" + +msgid "Fallback Servers" +msgstr "回落服务器" + +msgid "Specify upstream servers here." +msgstr "指定上游服务器。" + +msgid "SNI" +msgstr "服务器域名(SNI)" + +msgid "ALPN" +msgstr "应用层传输协议(ALPN)" + +msgid "Xver" +msgstr "发送代理协议版本" + +msgid "Custom Options" +msgstr "自定义选项" + +msgid "Custom Configuration Hook" +msgstr "自定义配置钩子" + +msgid "Read ucode Documentation for the language used. Code filled here may need to change after upgrading luci-app-xray." +msgstr "参阅ucode Documentation获取帮助。升级luci-app-xray后,此处填写的代码可能需要更改" + +msgid "Stream Security" +msgstr "传输层安全" + +msgid "Server Name" +msgstr "服务器名" + +msgid "Allow Insecure" +msgstr "允许不安全" + +msgid "Fingerprint" +msgstr "指纹" + +msgid "Flow" +msgstr "流控模式" + +msgid "[Same as Main Server]" +msgstr "[与主服务相同]" + +msgid "WARNING: at least one of asset files (geoip.dat, geosite.dat) is not found under /usr/share/xray. Xray may not work properly. See here for help." +msgstr "警告:/usr/share/xray目录下至少一个资源文件(geoip.dat, geosite.dat)不存在。Xray可能无法正常工作。参阅此处报告问题或提出请求。" + +msgid "Asset files check: " +msgstr "资源检查:" + +msgid "Report issues or request for features here." +msgstr "此处报告问题或提出请求。" + +msgid "Log Level" +msgstr "日志等级" + +msgid "Read Xray log in \"System Log\" or use logread command." +msgstr "在系统日志中或使用logread命令查看Xray日志。" + +msgid "Enable Access Log" +msgstr "启用访问日志" + +msgid "Access log will also be written to System Log." +msgstr "访问日志将被记录在系统日志中。" + +msgid "Enable DNS Log" +msgstr "启用DNS日志" + +msgid "DNS log will also be written to System Log." +msgstr "DNS查询日志将被记录在系统日志中。" + +msgid "Enable Statistics" +msgstr "启用统计信息" + +msgid "Enable statistics of inbounds / outbounds data. Use Xray API to query values." +msgstr "启用入站/出站数据的统计信息,使用Xray API查询数据。" + +msgid "Enable Observatory" +msgstr "启用后台连接观测" + +msgid "Enable latency measurement for TCP and UDP outbounds." +msgstr "为TCP和UDP出站启用后台连接观测。" + +msgid "Enable Firewall Counters" +msgstr "启用防火墙计数器" + +msgid "Add counters to firewall4 for transparent proxy rules. (Not supported in all OpenWrt versions. )" +msgstr "为透明代理规则添加counters to firewall4(不支持OpenWrt所有版本)。" + +msgid "Enable Xray Metrics Server" +msgstr "启用Xray指标服务" + +msgid "Enable built-in metrics server for pprof and expvar. See here for details." +msgstr "为pprof和expvar启用内置指标服务。参阅此处获取帮助。" + +msgid "Xray Metrics Server Port" +msgstr "Xray指标服务端口" + +msgid "Metrics may be sensitive so think twice before setting it as Default Fallback HTTP Server." +msgstr "指标可能很敏感,审慎将其设置为默认回退HTTP服务器。" + +msgid "Handshake Timeout" +msgstr "握手超时" + +msgid "Policy: Handshake timeout when connecting to upstream. See here for help." +msgstr "策略:与服务器握手超时时间。参阅此处获取帮助。" + +msgid "Connection Idle Timeout" +msgstr "空闲等待时间" + +msgid "Policy: Close connection if no data is transferred within given timeout. See here for help." +msgstr "策略:在给定时间内未传输任何数据,则关闭连接。参阅此处获取帮助。" + +msgid "Uplink Only Timeout" +msgstr "等待上行时间" + +msgid "Policy: How long to wait before closing connection after server closed connection. See here for help." +msgstr "策略:当服务器关闭连接后的等待时间。参阅此处获取帮助。" + +msgid "Downlink Only Timeout" +msgstr "等待下行时间" + +msgid "Policy: How long to wait before closing connection after client closed connection. See here for help." +msgstr "策略:当客户端关闭连接后的等待时间。参阅此处获取帮助。" + +msgid "Buffer Size" +msgstr "缓冲区大小" + +msgid "Policy: Internal cache size per connection. See here for help." +msgstr "策略:每个连接的缓存大小。参阅此处获取帮助。" + +msgid "Preview or Deprecated" +msgstr "预览或弃用" + +msgid "Show preview or deprecated features (requires reboot to take effect)." +msgstr "显示预览或弃用的功能(重启后生效)。" + +msgid "Bridge" +msgstr "桥接" + +msgid "Reverse proxy tool. Currently only client role (bridge) is supported. See here for help." +msgstr "反向代理工具,目前仅支持客户端(桥接)。参阅此处获取帮助。" + +msgid "Upstream" +msgstr "上游服务器" + +msgid "Redirect address" +msgstr "重定向地址" + +msgid "Extra Options" +msgstr "扩展选项" + +msgid "Initial Windows Size" +msgstr "初始化窗口大小" + +msgid "Route Only" +msgstr "仅路由" + +msgid "Use sniffed domain for routing only but still access through IP. Reduces unnecessary DNS requests. See here for help." +msgstr "仅使用域名嗅探进行路由,但仍通过IP进行访问,减少不必要的 DNS 请求。参阅此处获取帮助。" diff --git a/.github/diy/packages/luci-theme-spectra/htdocs/luci-static/spectra/bgm/bg1.jpg b/.github/diy/packages/luci-theme-spectra/htdocs/luci-static/spectra/bgm/bg1.jpg new file mode 100644 index 000000000..48d4b7c82 Binary files /dev/null and b/.github/diy/packages/luci-theme-spectra/htdocs/luci-static/spectra/bgm/bg1.jpg differ diff --git a/.github/diy/packages/luci-theme-spectra/htdocs/luci-static/spectra/bgm/bg2.jpg b/.github/diy/packages/luci-theme-spectra/htdocs/luci-static/spectra/bgm/bg2.jpg new file mode 100644 index 000000000..682a524a6 Binary files /dev/null and b/.github/diy/packages/luci-theme-spectra/htdocs/luci-static/spectra/bgm/bg2.jpg differ diff --git a/.github/diy/packages/miniupnpd/patches/901-options-force_forwarding-support.patch b/.github/diy/packages/miniupnpd/patches/901-options-force_forwarding-support.patch new file mode 100644 index 000000000..9e4329c5f --- /dev/null +++ b/.github/diy/packages/miniupnpd/patches/901-options-force_forwarding-support.patch @@ -0,0 +1,165 @@ +--- a/miniupnpd.c ++++ b/miniupnpd.c +@@ -1051,7 +1051,7 @@ parselanaddr(struct lan_addr_s * lan_addr, const char * str, int debug_flag) + INIT_PRINT_ERR("Error parsing address : %s\n", lan_addr->ext_ip_str); + return -1; + } +- if(addr_is_reserved(&lan_addr->ext_ip_addr)) { ++ if(addr_is_reserved(&lan_addr->ext_ip_addr) && !GETFLAG(FORCEFORWARDINGMASK)) { + if (GETFLAG(ALLOWPRIVATEIPV4MASK)) { + syslog(LOG_WARNING, "IGNORED : option ext_ip address contains reserved / private address : %s", lan_addr->ext_ip_str); + } else { +@@ -1190,11 +1190,11 @@ static void update_disable_port_forwarding(void) + } + disable_port_forwarding = 1; + } else { +- int reserved = addr_is_reserved(&addr); ++ int reserved = addr_is_reserved(&addr) && !GETFLAG(FORCEFORWARDINGMASK); + if (!disable_port_forwarding && reserved) { + if (GETFLAG(ALLOWPRIVATEIPV4MASK)) { + syslog(LOG_WARNING, "IGNORED : Reserved / private IP address %s on ext interface %s", if_addr, ext_if_name); +- } else { ++ } else if (!GETFLAG(FORCEFORWARDINGMASK)) { + syslog(LOG_WARNING, "Reserved / private IP address %s on ext interface %s: Port forwarding is impossible", if_addr, ext_if_name); + syslog(LOG_INFO, "You are probably behind NAT, enable option ext_perform_stun=yes to detect public IP address"); + syslog(LOG_INFO, "Or use ext_ip= / -o option to declare public IP address"); +@@ -1357,6 +1357,10 @@ init(int argc, char * * argv, struct runtime_vars * v) + if(strcmp(ary_options[i].value, "yes") == 0) + SETFLAG(ALLOWPRIVATEIPV4MASK); + break; ++ case UPNP_FORCE_FORWARDING: ++ if(strcmp(ary_options[i].value, "yes") == 0) ++ SETFLAG(FORCEFORWARDINGMASK); ++ break; + case UPNPEXT_PERFORM_STUN: + if(strcmp(ary_options[i].value, "yes") == 0) + SETFLAG(PERFORMSTUNMASK); +@@ -1973,7 +1977,7 @@ init(int argc, char * * argv, struct runtime_vars * v) + INIT_PRINT_ERR("Error: option ext_ip contains invalid address %s\n", use_ext_ip_addr); + return 1; + } +- if (addr_is_reserved(&addr)) { ++ if (addr_is_reserved(&addr) && !GETFLAG(FORCEFORWARDINGMASK)) { + if (GETFLAG(ALLOWPRIVATEIPV4MASK)) { + syslog(LOG_WARNING, "IGNORED : option ext_ip contains reserved / private address %s, not public routable", use_ext_ip_addr); + } else { + +--- a/natpmp.c ++++ b/natpmp.c +@@ -109,7 +109,7 @@ static void FillPublicAddressResponse(unsigned char * resp, in_addr_t senderaddr + syslog(LOG_ERR, "Failed to get IP for interface %s", ext_if_name); + resp[3] = 3; /* Network Failure (e.g. NAT box itself + * has not obtained a DHCP lease) */ +- } else if (!GETFLAG(ALLOWPRIVATEIPV4MASK) && addr_is_reserved(&addr)) { ++ } else if (!GETFLAG(ALLOWPRIVATEIPV4MASK) && addr_is_reserved(&addr) && !GETFLAG(FORCEFORWARDINGMASK)) { + resp[3] = 3; /* Network Failure, box has not obtained + public IP address */ + } else { + +--- a/options.c ++++ b/options.c +@@ -36,6 +36,7 @@ static const struct { + #endif + { UPNPEXT_IP, "ext_ip" }, + { UPNPEXT_ALLOW_PRIVATE_IPV4, "ext_allow_private_ipv4" }, ++ { UPNP_FORCE_FORWARDING, "force_forwarding" }, + { UPNPEXT_PERFORM_STUN, "ext_perform_stun" }, + { UPNPEXT_STUN_HOST, "ext_stun_host" }, + { UPNPEXT_STUN_PORT, "ext_stun_port" }, + +--- a/options.h ++++ b/options.h +@@ -26,6 +26,7 @@ enum upnpconfigoptions { + #endif + UPNPEXT_IP, /* ext_ip */ + UPNPEXT_ALLOW_PRIVATE_IPV4, /* ext_allow_private_ipv4 */ ++ UPNP_FORCE_FORWARDING, /* force forwarding enable for upnp */ + UPNPEXT_PERFORM_STUN, /* ext_perform_stun */ + UPNPEXT_STUN_HOST, /* ext_stun_host */ + UPNPEXT_STUN_PORT, /* ext_stun_port */ + +--- a/testgetifaddr.c ++++ b/testgetifaddr.c +@@ -14,6 +14,8 @@ + #include "getifaddr.h" + #include "getconnstatus.h" + ++int runtime_flags = 0; ++ + #if defined(__sun) + /* solaris 10 does not define LOG_PERROR */ + #define LOG_PERROR 0 + +--- a/testportinuse.c ++++ b/testportinuse.c +@@ -15,6 +15,8 @@ + #include "portinuse.h" + #include "upnpglobalvars.h" + ++int runtime_flags = 0; ++ + struct lan_addr_list lan_addrs; + int runtime_flags = 0; + time_t startup_time = 0; + +--- a/upnpdescgen.c ++++ b/upnpdescgen.c +@@ -1311,7 +1311,7 @@ genEventVars(int * len, const struct serviceDesc * s) + else { + struct in_addr addr; + char ext_ip_addr[INET_ADDRSTRLEN]; +- if(getifaddr(ext_if_name, ext_ip_addr, INET_ADDRSTRLEN, &addr, NULL) < 0 || (!GETFLAG(ALLOWPRIVATEIPV4MASK) && addr_is_reserved(&addr))) { ++ if(getifaddr(ext_if_name, ext_ip_addr, INET_ADDRSTRLEN, &addr, NULL) < 0 || (!GETFLAG(ALLOWPRIVATEIPV4MASK) && addr_is_reserved(&addr) && !GETFLAG(FORCEFORWARDINGMASK))) { + str = strcat_str(str, len, &tmplen, "0.0.0.0"); + } else { + str = strcat_str(str, len, &tmplen, ext_ip_addr); + +--- a/upnpglobalvars.h ++++ b/upnpglobalvars.h +@@ -100,6 +100,7 @@ extern int runtime_flags; + + /*! \brief perform STUN */ + #define PERFORMSTUNMASK 0x1000 ++#define FORCEFORWARDINGMASK 0x2000 + + /*! \brief Allow the external IPv4 to be private */ + #define ALLOWPRIVATEIPV4MASK 0x2000 + +--- a/upnpredirect.c ++++ b/upnpredirect.c +@@ -406,7 +406,7 @@ upnp_redirect_internal(const char * rhost, unsigned short eport, + { + /*syslog(LOG_INFO, "redirecting port %hu to %s:%hu protocol %s for: %s", + eport, iaddr, iport, protocol, desc); */ +- if(disable_port_forwarding) ++ if(disable_port_forwarding && !GETFLAG(FORCEFORWARDINGMASK)) + return -1; + if(add_redirect_rule2(ext_if_name, rhost, eport, iaddr, iport, proto, + desc, timestamp) < 0) { + +--- a/upnpsoap.c ++++ b/upnpsoap.c +@@ -374,7 +374,11 @@ GetExternalIPAddress(struct upnphttp * h, const char * action, const char * ns) + syslog(LOG_WARNING, "IGNORED : private/reserved address %s is not suitable for external IP", ext_ip_addr); + } else { + syslog(LOG_NOTICE, "private/reserved address %s is not suitable for external IP", ext_ip_addr); ++ if (!GETFLAG(FORCEFORWARDINGMASK)) { + ext_ip_addr[0] = '\0'; ++ } else { ++ syslog(LOG_NOTICE, "force_forwarding enable, private/reserved address %s used as external IP", ext_ip_addr); ++ } + } + } + } + +--- a/miniupnpd.conf ++++ b/miniupnpd.conf +@@ -23,6 +23,8 @@ + # This option is disabled by default. + #ext_allow_private_ipv4=yes + ++#force forwarding enable for upnp: default is no ++#force_forwarding=yes + # The WAN interface must have a public IP address. Otherwise it is behind NAT + # and port forwarding is impossible. In some cases WAN interface can be + # behind unrestricted full-cone NAT 1:1 when all incoming traffic is NAT-ed and diff --git a/.github/diy/packages/tvhelper/Makefile.k b/.github/diy/packages/tvhelper/Makefile.k new file mode 100644 index 000000000..4b8cb4cd2 --- /dev/null +++ b/.github/diy/packages/tvhelper/Makefile.k @@ -0,0 +1,42 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=tvhelper +PKG_VERSION:=1.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=tv.sh +PKG_SOURCE_URL:=https://raw.githubusercontent.com/wukongdaily/tvhelper/master/shells/ +PKG_HASH:=skip + +include $(INCLUDE_DIR)/package.mk + +define Package/tvhelper + SECTION:=utils + CATEGORY:=Utilities + TITLE:=TV Helper + DEPENDS:=+bash +endef + +define Package/tvhelper/description + tv.sh script from @wukongdaily. +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/ +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/tvhelper/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tv.sh $(1)/usr/bin/tv.sh + $(INSTALL_DIR) $(1)/root + ln -sf /usr/bin/tv.sh $(1)/root/tv.sh +endef + +$(eval $(call BuildPackage,tvhelper)) diff --git a/.github/diy/patches/UnblockNeteaseMusic.patch b/.github/diy/patches/UnblockNeteaseMusic.patch new file mode 100644 index 000000000..d029ec04e --- /dev/null +++ b/.github/diy/patches/UnblockNeteaseMusic.patch @@ -0,0 +1,11 @@ +--- a/UnblockNeteaseMusic/Makefile ++++ b/UnblockNeteaseMusic/Makefile +@@ -33,7 +33,7 @@ endef + + define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +- xzcat $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) ++ tar -xf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) + endef + + define Build/Configure diff --git a/.github/diy/patches/accesscontrol-plus.patch b/.github/diy/patches/accesscontrol-plus.patch new file mode 100644 index 000000000..d6dff1397 --- /dev/null +++ b/.github/diy/patches/accesscontrol-plus.patch @@ -0,0 +1,19 @@ +diff --git a/luci-app-accesscontrol-plus/po/zh-Hans/miaplus.po b/luci-app-accesscontrol-plus/po/zh_Hans/miaplus.po +similarity index 90% +rename from luci-app-accesscontrol-plus/po/zh-Hans/miaplus.po +rename to luci-app-accesscontrol-plus/po/zh_Hans/miaplus.po +index fedd5ae..ad85175 100644 +--- a/luci-app-accesscontrol-plus/po/zh-Hans/miaplus.po ++++ b/luci-app-accesscontrol-plus/po/zh_Hans/miaplus.po +@@ -7,6 +7,12 @@ msgstr "设置客户端访问互联网的时间" + msgid "General switch" + msgstr "开启/关闭" + ++msgid "Base Setting" ++msgstr "基本设置" ++ ++msgid "Advance Setting" ++msgstr "高级设置" ++ + msgid "Strict Mode" + msgstr "严格模式" diff --git a/.github/diy/patches/advancedplus.patch b/.github/diy/patches/advancedplus.patch new file mode 100644 index 000000000..fa4a87892 --- /dev/null +++ b/.github/diy/patches/advancedplus.patch @@ -0,0 +1,22 @@ +--- a/luci-app-advancedplus/root/etc/init.d/advancedplus ++++ b/luci-app-advancedplus/root/etc/init.d/advancedplus +@@ -112,7 +112,6 @@ start() { + [ -f $LOCK ] && exit + [ "x$XBOOT" = "x1" ] && exit 0 + touch $LOCK +- advancedset + rm -rf /tmp/luci-* + rm -f $LOCK 2>/dev/null + } + +--- a/luci-app-advancedplus/luasrc/controller/advancedplus.lua ++++ b/luci-app-advancedplus/luasrc/controller/advancedplus.lua +@@ -20,8 +20,6 @@ function index() + page.acl_depends = { "luci-app-advancedplus" } + + entry({"admin","system","advancedplus","advancededit"},cbi("advancedplus/advancededit"),_("Advanced Edit"),10).leaf = true +- entry({"admin","system","advancedplus","advancedset"},cbi("advancedplus/advancedset"),_("Advanced Setting"),20).leaf = true +- entry({"admin","system","advancedplus","advancedipk"},cbi("advancedplus/advancedipk", {hideapplybtn=true, hidesavebtn=true, hideresetbtn=true}),_("Loading plugins"),30).leaf = true + entry({"admin", "system", "advancedplus", "advancedrun"}, call("advanced_run")) + entry({"admin", "system", "advancedplus", "check"}, call("act_check")) + end diff --git a/.github/diy/patches/amule.patch b/.github/diy/patches/amule.patch new file mode 100644 index 000000000..164667fe5 --- /dev/null +++ b/.github/diy/patches/amule.patch @@ -0,0 +1,51 @@ +--- a/amule/Makefile ++++ b/amule/Makefile +@@ -31,6 +31,19 @@ define Package/amule + +libupnp +libbfd +libcryptopp + endef + ++define Download/AmuleWebUI ++ URL:=https://github.com/MatteoRagni/AmuleWebUI-Reloaded/archive ++ URL_FILE:=master.zip ++ FILE:=AmuleWebUI.zip ++ HASH:=skip ++endef ++ ++define Build/Prepare ++ $(call Build/Prepare/Default) ++ unzip $(DL_DIR)/AmuleWebUI.zip -d $(PKG_BUILD_DIR) ++ ++endef ++ + CONFIGURE_ARGS+= \ + --disable-nls \ + --disable-static \ +@@ -72,12 +85,16 @@ endef + + define Package/amule/install + $(INSTALL_DIR) $(1)/usr/bin ++ $(INSTALL_DIR) $(1)/usr/share/amule/webserver + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amulecmd $(1)/usr/bin/amulecmd + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amuled $(1)/usr/bin/amuled + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amuleweb $(1)/usr/bin/amuleweb ++ $(CP) $(PKG_BUILD_DIR)/src/webserver/default $(1)/usr/share/amule/webserver ++ $(CP) $(PKG_BUILD_DIR)/AmuleWebUI-Reloaded-master $(1)/usr/share/amule/webserver/AmuleWebUI-Reloaded + + $(INSTALL_DIR) $(1)/usr/share + $(CP) $(PKG_INSTALL_DIR)/usr/share/amule $(1)/usr/share/ + endef + ++$(eval $(call Download,AmuleWebUI)) + $(eval $(call BuildPackage,amule)) + +--- a/luci-app-amule/root/etc/config/amule ++++ b/luci-app-amule/root/etc/config/amule +@@ -62,7 +62,7 @@ config amule 'main' + option web_enabled '0' + option upnp_enabled '0' + option proxy_type 'socks5' +- option template 'default' ++ option template 'AmuleWebUI-Reloaded' + option use_low_rights_user '0' + option web_port '44711' + option upnp_web_server_enabled '0' diff --git a/.github/diy/patches/argon.patch b/.github/diy/patches/argon.patch new file mode 100644 index 000000000..6d57cd9ec --- /dev/null +++ b/.github/diy/patches/argon.patch @@ -0,0 +1,16 @@ +--- a/luci-theme-argon/ucode/template/themes/argon/footer.ut ++++ b/luci-theme-argon/ucode/template/themes/argon/footer.ut +@@ -19,13 +19,6 @@ + +