This commit is contained in:
kiddin9 committed 2026-03-05 22:36:47 +08:00
commit 1741072933
93 files changed
+6216

No files matched your search

+9
View File
@@ -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
+113
View File
@@ -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 <path-to-acl>) -l <luci-name> -n <conf-name>|-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 <path-to-acl> -l <luci-name> -n <conf-name>|-c]"
exit 2
fi
+130
View File
@@ -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 <path-to-ucitrack>) -l <luci-name> -n <conf-name> -i <init-name>|-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 <path-to-ucitrack> -l <luci-name> -n <conf-name> -i <init-name>|-c]"
exit 2
fi
+74
View File
@@ -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
+23
View File
@@ -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 | 日更 |
@@ -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,
@@ -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
+57
View File
@@ -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)))
@@ -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
@@ -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
@@ -0,0 +1,27 @@
local e=require"nixio.fs"
m=Map("bridge",translate("Transparent bridge"),
translate("<font color=green>Let the routing become a transparent bridge device that communicates with the superior routing without perception and has the function of firewall.</font>"))
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("<li>Applicable to network environments that have superior routing and require some functions of soft routing but do not want multi-level NAT.</li>The switch or client needs to be connected to the network port of the soft route.<li>The WEB console of the soft route after the transparent bridge is enabled is the bridge IP.</li>Some features on the soft route will be invalid after enabling the transparent bridge, such as Full Cone, multi-dial, etc.<li>After closing, restore the network settings when the plugin is installed, and the WEB console reverts to the original set IP.</li>"))
o.anonymous = true
return m
@@ -0,0 +1,22 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[network]], [[bridge]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('bridge_status');
if (data && tb) {
if (data.running) {
tb.innerHTML = '<font color=green><%:RUNNING%></font>';
} else {
tb.innerHTML = '<font color=red><%:NOT RUNNING%></font>';
}
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="bridge_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>
@@ -0,0 +1,48 @@
msgid "Transparent bridge"
msgstr "透明网桥"
msgid "Passerelle transparente"
msgstr "开启透明网桥"
msgid "<font color=green>Let the routing become a transparent bridge device that communicates with the superior routing without perception and has the function of firewall.</font>"
msgstr "<font color=green>让路由成为与上级路由通信,无感知,并具备防火墙功能的透明网桥设备。</font>"
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 ""
"<li>Applicable to network environments that have superior routing and require some functions of soft routing but do not want multi-level NAT.</li>"
"The switch or client needs to be connected to the network port of the soft route.<li>"
"The WEB console of the soft route after the transparent bridge is enabled is the bridge IP.</li>"
"Some features on the soft route will be invalid after enabling the transparent bridge, such as Full Cone, multi-dial, etc.<li>"
"After closing, restore the network settings when the plugin is installed, and the WEB console reverts to the original set IP.</li>"
msgstr ""
"<li><font color=orange>✯</font>适用于有上级路由,需要软路由的一些功能但又不想多级NAT的网络环境。</li>"
"<font color=orange>✯</font>交换机或客户端需要连接到软路由的网口下面。<li>"
"<font color=orange>✯</font>启用透明网桥后软路由的WEB控制台为网桥IP。</li>"
"<font color=orange>✯</font>启用透明网桥后软路由上的一些功能会失效,如:Full Cone、多拨等。<li>"
"<font color=orange>✯</font>关闭后恢复插件安装时的网络设置,WEB控制台恢复为原始设置的IP。</li>"
@@ -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'
@@ -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
}
@@ -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
@@ -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;
}
}
@@ -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 "降序"
@@ -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
@@ -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
}
}
}
@@ -0,0 +1,16 @@
#
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
#
# 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
@@ -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
@@
@@ -0,0 +1,38 @@
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2014 HackPascal <hackpascal@gmail.com>
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
@@ -0,0 +1,100 @@
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2014 HackPascal <hackpascal@gmail.com>
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
@@ -0,0 +1,63 @@
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2014 HackPascal <hackpascal@gmail.com>
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
@@ -0,0 +1,49 @@
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2014 HackPascal <hackpascal@gmail.com>
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
@@ -0,0 +1,87 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-05-13\n"
"Last-Translator: ming1054<ming1054@163.com>\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 "强制下线"
@@ -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'
@@ -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 ##
}
@@ -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
@@ -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
@@ -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 "到"
@@ -0,0 +1,4 @@
sed -i "s/reload_service(/reload_service1(/" /etc/init.d/transmission
exit 0
@@ -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 <code>leastPing</code> requires observatory (see "Extra Options" tab) to be enabled."
msgstr "配置<code>leastPing</code>需要启用后台连接观测(参阅“扩展选项”选项卡)。"
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 <code>xray api</code> or <code>ubus call xray</code>. See <a href=\"https://xtls.github.io/document/command.html#xray-api\">here</a> for help."
msgstr "使用8080端口和GRPC协议的Xray API服务,也可通过<code>xray api</code>或<code>ubus call xray</code>调用。参阅<a href=\"https://xtls.github.io/document/command.html#xray-api\">此处</a>获取帮助。"
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 <a href=\"https://github.com/XTLS/Xray-core/issues/158\">Xray UUID Mapping</a>)"
msgstr "vmess/vless使用UID,shadowsocks/trojan使用密码(支持<a href=\"https://github.com/XTLS/Xray-core/issues/158\">Xray UUID映射</a>)。"
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 <a href=\"https://xtls.github.io/config/outbound.html#proxysettingsobject\">ProxySettings.Tag</a>"
msgstr "类似于<a href=\"https://xtls.github.io/config/outbound.html#proxysettingsobject\">出站代理配置</a>"
msgid ""
"Configurations here override settings in the previous tabs with the following rules: "
"<ol><li>Object values will be replaced recursively so settings in previous tabs matter.</li>"
"<li>Arrays will be replaced entirely instead of being merged.</li>"
"<li>Tag <code>tag</code> is ignored. </li></ol>Override rules here may be changed later. Use this only for experimental or pre-release features."
msgstr ""
"自定义配置使用以下规则覆盖先前选项卡中的设置:"
"<ol><li>对象值将以递归方式替换,因此先前选项卡中的设置很重要。</li>"
"<li>数组将被完全替换,而不是被合并。</li>"
"<li>标签 <code>tag</code> 被忽略。</li></ol>覆盖规则可能会更改。仅将其用于实验性或预发布功能。"
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 <a href=\"https://wiki.nftables.org/wiki-nftables/index.php/Netfilter_hooks#Priority_within_hook\">Netfilter Internal Priority</a> for reference."
msgstr "查看防火墙状态页以了解Xray使用的规则。参阅<a href=\"https://wiki.nftables.org/wiki-nftables/index.php/Netfilter_hooks#Priority_within_hook\">Netfilter Internal Priority</a>获取帮助。"
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).<br/>For example if Xray DNS Server Port is 5300 and use 3 "
"extra ports, 5300 - 5303 will be used for DNS requests.<br/>Increasing this "
"value may help reduce the possibility of temporary DNS lookup failures."
msgstr ""
"在多个端口上监听DNS请求(所有端口都用作dnsmasq上游服务器)。"
"</br>例如Xray DNS服务器端口为5300并使用3个额外端口,则5300-5303将用于DNS请求。"
"</br>添加额外端口可能有助于减少临时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 <a href=\"https://github.com/v2ray/v2ray-core/issues/2233\">FakeDNS</a> for details."
msgstr "参阅<a href=\"https://github.com/v2ray/v2ray-core/issues/2233\">FakeDNS</a>获取帮助。"
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 <code>geosite:cn</code> or <code>domain:bilibili.com</code>. See <a href=\"https://xtls.github.io/config/dns.html#dnsobject\">documentation</a> for details."
msgstr "指定例如<code>geosite:cn</code>或<code>domain:bilibili.com</code>等规则。参阅<a href=\"https://xtls.github.io/config/dns.html#dnsobject\">此处</a>获取帮助。"
msgid ""
"Specify rules like <code>domain:bilibili.com</code> or see <a href=\"https:"
"//xtls.github.io/config/dns.html#dnsobject\">documentation</a> for details."
"<br/> In order to use Geosite rules you need a valid resource file "
"/usr/share/xray/geosite.dat.<br/>Compile your firmware again with data files "
"to use Geosite rules, or <a href=\"https://github.com/v2fly/domain-list-"
"community\">download one</a> and upload it to your router."
msgstr ""
"指定例如<code>domain:bilibili.com</code>等规则,或参阅<a href=\"https://xtls.github."
"io/config/dns.html#dnsobject\">此处</a>获取帮助。"
"为了使用Geosite规则,需要一个有效的资源文件<code>/usr/share/xray/geosite.dat</code>"
"添加资源文件后重新编译固件,或从<a href=\"https://github.com/v2fly/domain-list-community\">"
"此处</a>下载后上传到路由器。"
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 <code>geosite:geolocation-!cn</code> or <code>domain:youtube.com</code>. See <a href=\"https://xtls.github.io/config/dns.html#dnsobject\">documentation</a> for details."
msgstr "指定例如<code>geosite:geolocation-!cn</code>或<code>domain:youtube.com</code>等规则。参阅<a href=\"https://xtls.github.io/config/dns.html#dnsobject\">此处</a>获取帮助。"
msgid ""
"Specify rules like <code>domain:youtube.com</code> or see <a href=\"https:"
"//xtls.github.io/config/dns.html#dnsobject\">documentation</a> for details."
"<br/> In order to use Geosite rules you need a valid resource file "
"/usr/share/xray/geosite.dat.<br/>Compile your firmware again with data files "
"to use Geosite rules, or <a href=\"https://github.com/v2fly/domain-list-"
"community\">download one</a> and upload it to your router."
msgstr ""
"指定例如<code>domain:youtube.com</code>或参阅<a href=\"https://xtls.github."
"io/config/dns.html#dnsobject\">此处</a>获取帮助。"
"为了使用Geosite规则,需要一个有效的资源文件<code>/usr/share/xray/geosite.dat</code>"
"添加资源文件后重新编译固件,或从<a href=\"https://github.com/v2fly/domain-list-community\">"
"此处</a>下载后上传到路由器。"
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 <code>geosite:category-ads</code> or <code>domain:baidu.com</code>. See <a href=\"https://xtls.github.io/config/dns.html#dnsobject\">documentation</a> for details."
msgstr "指定例如<code>geosite:category-ads</code>或<code>domain:baidu.com</code>等规则。参阅<a href=\"https://xtls.github.io/config/dns.html#dnsobject\">此处</a>获取帮助。"
msgid ""
"Specify rules like <code>domain:baidu.com</code> or see <a href=\"https:"
"//xtls.github.io/config/dns.html#dnsobject\">documentation</a> for details."
"<br/> In order to use Geosite rules you need a valid resource file "
"/usr/share/xray/geosite.dat.<br/>Compile your firmware again with data files "
"to use Geosite rules, or <a href=\"https://github.com/v2fly/domain-list-"
"community\">download one</a> and upload it to your router."
msgstr ""
"指定例如<code>domain:baidu.com</code>或参阅<a href=\"https://xtls.github."
"io/config/dns.html#dnsobject\">此处</a>获取帮助。"
"为了使用Geosite规则,需要一个有效的资源文件<code>/usr/share/xray/geosite.dat</code>"
"添加资源文件后重新编译固件,或从<a href=\"https://github.com/v2fly/domain-list-community\">"
"此处</a>下载后上传到路由器。"
msgid "Blocked to loopback"
msgstr "阻止回环"
msgid "Return <code>127.127.127.127</code> as response for blocked domain rules. If not selected, <code>NXDOMAIN</code> will be returned."
msgstr "对阻止域名规则返回<code>127.127.127.127</code>,未设置将返回回环地址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. <br/> Compile your firmware again with data files to use this "
"feature, or<br/><a href=\"https://github.com/v2fly/geoip\">download one</a> "
"(maybe disable transparent proxy first) and upload it to your router."
msgstr ""
"资源文件<code>/usr/share/xray/geoip.dat</code>不存在。所有网络将被转发。"
"添加资源文件后重新编译固件,或从<a href=\"https://github.com/v2fly/geoip\">此处</a>下载后上传到路由器。"
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).<br/>Useful for some really strange network. If you really need to forward private addresses, try Manual Transparent Proxy below."
msgstr "这些IP始终由Xray转发(私有地址可能会被Xray绕过)。<br/>对一些奇怪的网络有用,确需转发私人地址,尝试下面的手动透明代理。"
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 <a href=\"https://github.com/v2ray/v2ray-core/issues/2233\">FakeDNS</a> for details."
msgstr "相比iptables重定向,Xray可以进行NAT46/NAT64(对于某些仅IPv6的网站)。参阅<a href=\"https://github.com/v2ray/v2ray-core/issues/2233\">FakeDNS</a>获取帮助。"
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 <code>accept input</code> manually in firewall settings."
msgstr "此端口需要在系统防火墙<code>accept input</code>中手动设置。"
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 <a href="https://ucode.mein.io/">ucode Documentation</a> for the language used. Code filled here may need to change after upgrading luci-app-xray."
msgstr "参阅<a href="https://ucode.mein.io/">ucode Documentation</a>获取帮助。升级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 <a href=\"https://github.com/yichya/luci-app-xray\">here</a> for help."
msgstr "警告:/usr/share/xray目录下至少一个资源文件(geoip.dat, geosite.dat)不存在。Xray可能无法正常工作。参阅<a href=\"https://github.com/yichya/luci-app-xray\">此处</a>报告问题或提出请求。"
msgid "Asset files check: "
msgstr "资源检查:"
msgid "Report issues or request for features <a href=\"https://github.com/yichya/luci-app-xray\">here</a>."
msgstr "<a href=\"https://github.com/yichya/luci-app-xray\">此处</a>报告问题或提出请求。"
msgid "Log Level"
msgstr "日志等级"
msgid "Read Xray log in \"System Log\" or use <code>logread</code> command."
msgstr "在系统日志中或使用<code>logread</code>命令查看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 <a href=\"/cgi-bin/luci/admin/status/nftables\">counters to firewall4</a> for transparent proxy rules. (Not supported in all OpenWrt versions. )"
msgstr "为透明代理规则添加<a href=\"/cgi-bin/luci/admin/status/nftables\">counters to firewall4</a>(不支持OpenWrt所有版本)。"
msgid "Enable Xray Metrics Server"
msgstr "启用Xray指标服务"
msgid "Enable built-in metrics server for pprof and expvar. See <a href='https://github.com/XTLS/Xray-core/pull/1000'>here</a> for details."
msgstr "为pprof和expvar启用内置指标服务。参阅<a href='https://github.com/XTLS/Xray-core/pull/1000'>此处</a>获取帮助。"
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 <a href=\"https://xtls.github.io/config/policy.html#levelpolicyobject\">here</a> for help."
msgstr "策略:与服务器握手超时时间。参阅<a href=\"https://xtls.github.io/config/policy.html#levelpolicyobject\">此处</a>获取帮助。"
msgid "Connection Idle Timeout"
msgstr "空闲等待时间"
msgid "Policy: Close connection if no data is transferred within given timeout. See <a href=\"https://xtls.github.io/config/policy.html#levelpolicyobject\">here</a> for help."
msgstr "策略:在给定时间内未传输任何数据,则关闭连接。参阅<a href=\"https://xtls.github.io/config/policy.html#levelpolicyobject\">此处</a>获取帮助。"
msgid "Uplink Only Timeout"
msgstr "等待上行时间"
msgid "Policy: How long to wait before closing connection after server closed connection. See <a href=\"https://xtls.github.io/config/policy.html#levelpolicyobject\">here</a> for help."
msgstr "策略:当服务器关闭连接后的等待时间。参阅<a href=\"https://xtls.github.io/config/policy.html#levelpolicyobject\">此处</a>获取帮助。"
msgid "Downlink Only Timeout"
msgstr "等待下行时间"
msgid "Policy: How long to wait before closing connection after client closed connection. See <a href=\"https://xtls.github.io/config/policy.html#levelpolicyobject\">here</a> for help."
msgstr "策略:当客户端关闭连接后的等待时间。参阅<a href=\"https://xtls.github.io/config/policy.html#levelpolicyobject\">此处</a>获取帮助。"
msgid "Buffer Size"
msgstr "缓冲区大小"
msgid "Policy: Internal cache size per connection. See <a href=\"https://xtls.github.io/config/policy.html#levelpolicyobject\">here</a> for help."
msgstr "策略:每个连接的缓存大小。参阅<a href=\"https://xtls.github.io/config/policy.html#levelpolicyobject\">此处</a>获取帮助。"
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 <a href=\"https://xtls.github.io/config/reverse.html#bridgeobject\">here</a> for help."
msgstr "反向代理工具,目前仅支持客户端(桥接)。参阅<a href=\"https://xtls.github.io/config/reverse.html#bridgeobject\">此处</a>获取帮助。"
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 <a href=\"https://github.com/XTLS/Xray-core/commit/a3023e43ef55d4498b1afbc9a7fe7b385138bb1a\">here</a> for help."
msgstr "仅使用域名嗅探进行路由,但仍通过IP进行访问,减少不必要的 DNS 请求。参阅<a href=\"https://github.com/XTLS/Xray-core/commit/a3023e43ef55d4498b1afbc9a7fe7b385138bb1a\">此处</a>获取帮助。"
Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

@@ -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
+42
View File
@@ -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))
@@ -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
@@ -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 "严格模式"
+22
View File
@@ -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
+51
View File
@@ -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'
+16
View File
@@ -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 @@
</div>
<footer class="mobile-hide" style="text-wrap: auto">
<div class="footer-content" style="display: flex; flex-wrap: wrap; gap: 0.5em; justify-content: end;">
- <a class="luci-link" href="https://github.com/openwrt/luci" target="_blank">Powered by {{ version.luciname }} ({{ version.luciversion }})</a>
-
- <span class="footer-separator">|</span>
-
- <a href="https://github.com/jerrykuku/luci-theme-argon" target="_blank">ArgonTheme {# vPKG_VERSION #}</a>
-
- <span class="footer-separator">|</span>
<a class="luci-link" href="{{ version.disturl }}" target="_blank">{{ version.distname }} {{ version.distversion }}-{{ version.distrevision }}</a>
+19
View File
@@ -0,0 +1,19 @@
--- /dev/null
+++ b/luci-app-aria2/root/etc/uci-defaults/luci-aria2
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd /usr/share/aria2 && sh ./tracker.sh >/dev/null 2>&1 &
+
+exit 0
--- a/ariang/Makefile
+++ b/ariang/Makefile
@@ -33,7 +33,6 @@ Package/ariang-nginx/description = $(Package/ariang/description)
define Package/ariang
$(Package/ariang/default)
- DEPENDS += +uhttpd
TITLE += for uhttpd webserver
endef
+19
View File
@@ -0,0 +1,19 @@
--- a/autocore/files/cpuinfo
+++ b/autocore/files/cpuinfo
@@ -7,7 +7,7 @@ CPUFREQ_PATH="/sys/devices/system/cpu/cpufreq"
THERMAL_PATH="/sys/class/thermal"
cpu_arch="$(awk -F ': ' '/model name/ {print $2}' "$CPUINFO_PATH" | head -n1)"
-[ -n "${cpu_arch}" ] || cpu_arch="?"
+[ -n "${cpu_arch}" ] || cpu_arch="ARMv8 Processor"
case "$DISTRIB_TARGET" in
"x86"/*)
@@ -45,6 +45,7 @@ case "$DISTRIB_TARGET" in
elif grep -q "AuthenticAMD" "/proc/cpuinfo"; then
cpu_temp="$(sensors "k*temp-*" 2>"/dev/null" | awk '/Tdie/ {print $2}' | head -n1 | tr -d "+")"
fi
+ [ -n "${cpu_temp}" ] || cpu_temp="$(sensors 2>/dev/null | grep 'Core 0' | cut -c12-)"
;;
*)
[ ! -e "$THERMAL_PATH/thermal_zone0/temp" ] || \
+21
View File
@@ -0,0 +1,21 @@
--- a/automount/Makefile
+++ b/automount/Makefile
@@ -20,6 +20,7 @@ define Package/automount
TITLE:=Mount autoconfig hotplug script.
MAINTAINER:=Lean
DEPENDS:= \
+ +luci-app-partexp \
+block-mount \
+e2fsprogs \
+kmod-usb-storage \
@@ -48,10 +49,6 @@ endef
define Package/automount/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
- $(INSTALL_BIN) ./files/11-anonmount $(1)/etc/uci-defaults/
-
- $(INSTALL_DIR) $(1)/etc/hotplug.d/block
- $(INSTALL_BIN) ./files/15-automount $(1)/etc/hotplug.d/block/
endef
define Package/ntfs3-mount/install
+16
View File
@@ -0,0 +1,16 @@
--- /dev/null
+++ b/luci-app-autoreboot/root/etc/uci-defaults/99-autoreboot
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+[ ! -f "/usr/share/ucitrack/luci-app-autoreboot.json" ] && {
+ cat > /usr/share/ucitrack/luci-app-autoreboot.json << EEOF
+{
+ "config": "autoreboot",
+ "init": "autoreboot"
+}
+EEOF
+}
+
+rm -f /tmp/luci-indexcache
+exit 0
+20
View File
@@ -0,0 +1,20 @@
--- a/coremark/Makefile
+++ b/coremark/Makefile
@@ -78,17 +78,6 @@ endef
define Package/coremark/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/coremark $(1)/bin/
- $(INSTALL_DIR) $(1)/etc
- $(INSTALL_BIN) ./coremark.sh $(1)/etc/
- $(INSTALL_DIR) $(1)/etc/uci-defaults
- $(INSTALL_BIN) ./coremark $(1)/etc/uci-defaults/xxx-coremark
-endef
-
-define Package/coremark/postinst
-#!/bin/sh
-[ -n "$${IPKG_INSTROOT}" ] || sed -i '/coremark/d' /etc/crontabs/root
-[ -n "$${IPKG_INSTROOT}" ] || echo "0 4 * * * /etc/coremark.sh" >> /etc/crontabs/root
-[ -n "$${IPKG_INSTROOT}" ] || crontab /etc/crontabs/root
endef
$(eval $(call BuildPackage,coremark))
+10
View File
@@ -0,0 +1,10 @@
--- a/cups/Makefile
+++ b/cups/Makefile
@@ -165,6 +165,7 @@ define Build/Configure
--without-perl \
--without-python \
--without-php \
+ --without-tls \
--enable-default-shared \
--enable-shared \
--enable-image \
+10
View File
@@ -0,0 +1,10 @@
--- a/luci-app-ddns/Makefile
+++ b/luci-app-ddns/Makefile
@@ -12,7 +12,7 @@ PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
LUCI_TITLE:=LuCI Support for Dynamic DNS Client (ddns-scripts)
-LUCI_DEPENDS:=+luci-base +ddns-scripts
+LUCI_DEPENDS:=+luci-base +ddns-scripts +ddns-scripts-aliyun +ddns-scripts-dnspod-v3 +ddns-scripts-cloudflare
include ../../luci.mk
+116
View File
@@ -0,0 +1,116 @@
--- a/luci-app-easytier/Makefile
+++ b/luci-app-easytier/Makefile
@@ -10,7 +10,7 @@ PKG_VERSION:=2.3.0
PKG_RELEASE:=1
LUCI_TITLE:=LuCI support for EasyTier
-LUCI_DEPENDS:=+kmod-tun +luci-compat
+LUCI_DEPENDS:=+kmod-tun +easytier +luci-compat
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-easytier
--- a/luci-app-samba4/Makefile
+++ b//luci-app-samba4/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Network Shares - Samba 4 SMB/CIFS fileserver
-LUCI_DEPENDS:=+luci-base +samba4-server
+LUCI_DEPENDS:=+luci-base +samba4-server +autoshare-samba
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
--- a/luci-app-ksmbd/Makefile
+++ b/luci-app-ksmbd/Makefile
@@ -3,7 +3,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Network Shares - Ksmbd the SMB kernel fileserver
-LUCI_DEPENDS:=+luci-base +ksmbd-server
+LUCI_DEPENDS:=+luci-base +ksmbd-server +autoshare-ksmbd
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
--- a/fullconenat/Makefile
+++ b/fullconenat/Makefile
@@ -36,7 +36,7 @@ define Package/ip6tables-mod-fullconenat
SECTION:=net
CATEGORY:=Network
TITLE:=FULLCONENAT ip6tables extension
- DEPENDS:=ip6tables +kmod-nf-nat6 +kmod-ipt-fullconenat +ip6tables-mod-nat
+ DEPENDS:=+ip6tables +kmod-nf-nat6 +kmod-ipt-fullconenat +ip6tables-mod-nat
endef
define KernelPackage/ipt-fullconenat
--- a/phtunnel/Makefile
+++ b/phtunnel/Makefile
@@ -36,7 +36,6 @@ PKG_SOURCE:=phtunnel
PKG_SOURCE_URL:=https://mirrors.oray.com/orayos/packages/$(PKG_NAME)/$(PKG_ARCH_PHT)/$(PKG_VERSION)/bin
PKG_HASH:=skip
-PKG_FLAGS:=nonshared
PKG_MAINTAINER:=Oray <developer@oray.com>
include $(INCLUDE_DIR)/package.mk
--- a/pgyvpn/Makefile
+++ b/pgyvpn/Makefile
@@ -36,7 +36,6 @@ PKG_SOURCE:=pgyvpnsvr
PKG_SOURCE_URL:=https://mirrors.oray.com/orayos/packages/$(PKG_NAME)/$(PKG_ARCH_PGYYPN)/$(PKG_VERSION)/bin
PKG_HASH:=skip
-PKG_FLAGS:=nonshared
PKG_MAINTAINER:=Oray <developer@oray.com>
include $(INCLUDE_DIR)/package.mk
--- a/luci-app-rclone/Makefile
+++ b/luci-app-rclone/Makefile
@@ -9,7 +9,7 @@ PKG_VERSION:=1.4.1
PKG_RELEASE:=4
LUCI_TITLE:=LuCI support for Rclone
-LUCI_DEPENDS:=+luci-compat +rclone-config \
+LUCI_DEPENDS:=+luci-compat +rclone-config +fuse-overlayfs +fuse3-utils \
+PACKAGE_$(PKG_NAME)_INCLUDE_rclone-webui:rclone-webui-react \
+PACKAGE_$(PKG_NAME)_INCLUDE_rclone-ng:rclone-ng
--- a/k3screenctrl/Makefile
+++ b/k3screenctrl/Makefile
@@ -19,7 +19,7 @@ TARGET_CFLAGS+= -D_GNU_SOURCE
define Package/k3screenctrl
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS:=@TARGET_bcm53xx_generic_DEVICE_phicomm_k3 +@KERNEL_DEVMEM
+ DEPENDS:=@(TARGET_bcm53xx_generic_DEVICE_phicomm_k3||TARGET_DEVICE_bcm53xx_generic_DEVICE_phicomm_k3) +@KERNEL_DEVMEM
TITLE:=LCD screen controller on PHICOMM K3
URL:=https://github.com/updateing/k3-screen-ctrl
endef
--- a/luci-app-packet-capture/Makefile
+++ b/luci-app-packet-capture/Makefile
@@ -4,7 +4,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Packet capture application
-LUCI_DEPENDS:=+luci-mod-admin-full +tcpdump +uhttpd-mod-ubus +coreutils +coreutils-timeout
+LUCI_DEPENDS:=+luci-mod-admin-full +tcpdump +coreutils +coreutils-timeout
PKG_MAINTAINER:=Wojciech Jowsa <wojciech.jowsa@gmail.com>
PKG_LICENSE:=Apache-2.0
--- a/luci-app-smartdns/Makefile
+++ b/luci-app-smartdns/Makefile
@@ -18,6 +18,7 @@ PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_luci-app-smartdns_INCLUDE_WebUI
define Package/luci-app-smartdns/config
config PACKAGE_luci-app-smartdns_INCLUDE_WebUI
bool "Include WebUI support"
+ default y
endef
include ../../luci.mk
+74
View File
@@ -0,0 +1,74 @@
--- a/dockerd/Makefile
+++ b/dockerd/Makefile
@@ -47,6 +47,8 @@ define Package/dockerd
+kmod-veth \
+tini \
+uci-firewall \
+ +fuse-overlayfs \
+ +kmod-vxlan +kmod-macvlan +kmod-dummy +kmod-crypto-gcm +kmod-crypto-seqiv +kmod-crypto-ghash +kmod-ipsec +kmod-nf-nathelper +kmod-nf-nathelper-extra +btrfs-progs \
@!(mips||mips64||mipsel)
USERID:=docker:docker
MENU:=1
@@ -94,13 +96,13 @@ define Build/Prepare
$(Build/Prepare/Default)
# Verify dependencies are the vendored version
- $(call EnsureVendoredVersion,../containerd/Makefile,containerd.installer)
- $(call EnsureVendoredVersion,../runc/Makefile,runc.installer)
- $(call EnsureVendoredVersion,../tini/Makefile,tini.installer)
+ $(call EnsureVendoredVersion,../../packages/utils/containerd/Makefile,containerd.installer)
+ $(call EnsureVendoredVersion,../../packages/utils/runc/Makefile,runc.installer)
+ $(call EnsureVendoredVersion,../../packages/utils/tini/Makefile,tini.installer)
# Verify CLI is the same version
( \
- CLI_MAKEFILE="../docker/Makefile"; \
+ CLI_MAKEFILE="../../packages/utils/docker/Makefile"; \
CLI_VERSION=$$$$( grep --only-matching --perl-regexp '(?<=PKG_VERSION:=)(.*)' "$$$${CLI_MAKEFILE}" ); \
if [ "$$$${CLI_VERSION}" != "$(PKG_VERSION)" ]; then \
echo "ERROR: Expected 'PKG_VERSION:=$(PKG_VERSION)' in '$$$${CLI_MAKEFILE}', found 'PKG_VERSION:=$$$${CLI_VERSION}'"; \
@@ -142,6 +144,9 @@ define Package/dockerd/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bundles/binary-daemon/dockerd $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bundles/binary-daemon/docker-proxy $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_DATA) ./files/dockerd.uci-defaults $(1)/etc/uci-defaults/dockerd
+
$(INSTALL_DIR) $(1)/opt/docker/
ifeq ($(CONFIG_DOCKER_CHECK_CONFIG),y)
--- a/dockerd/files/etc/sysctl.d/sysctl-br-netfilter-ip.conf
+++ b/dockerd/files/etc/sysctl.d/sysctl-br-netfilter-ip.conf
@@ -2,6 +2,6 @@
# /etc/sysctl.conf can be used to customize sysctl settings
# enable bridge firewalling for docker
-net.bridge.bridge-nf-call-ip6tables=1
-net.bridge.bridge-nf-call-iptables=1
+# net.bridge.bridge-nf-call-ip6tables=1
+# net.bridge.bridge-nf-call-iptables=1
--- a/dockerd/files/dockerd.init
+++ b/dockerd/files/dockerd.init
@@ -91,6 +91,9 @@ uciadd() {
uci_quiet set firewall.@zone[-1].output="ACCEPT"
uci_quiet set firewall.@zone[-1].forward="ACCEPT"
uci_quiet set firewall.@zone[-1].name="${zone}"
+ uci_quiet set firewall.dockerd=forwarding
+ uci_quiet set firewall.@forwarding[-1].src="${zone}"
+ uci_quiet set firewall.@forwarding[-1].dest='wan'
uci_quiet commit firewall
fi
--- a/dockerd/files/etc/config/dockerd
+++ b/dockerd/files/etc/config/dockerd
@@ -34,5 +34,5 @@ config globals 'globals'
# then docker restarted to load in new changes.
config firewall 'firewall'
option device 'docker0'
- list blocked_interfaces 'wan'
+# list blocked_interfaces 'wan'
# option extra_iptables_args '--match conntrack ! --ctstate RELATED,ESTABLISHED' # allow outbound connections
+133
View File
@@ -0,0 +1,133 @@
--- a/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua
+++ b/luci-app-dockerman/luasrc/model/cbi/dockerman/container.lua
@@ -37,7 +37,15 @@ local get_ports = function(d)
if d.HostConfig and d.HostConfig.PortBindings then
for inter, out in pairs(d.HostConfig.PortBindings) do
- data = (data and (data .. "<br />") or "") .. out[1]["HostPort"] .. ":" .. inter
+ if out[1] and out[1]["HostPort"] then
+ local host_ip = ""
+ if out[1].HostIp and out[1].HostIp ~= "" then
+ host_ip = out[1].HostIp
+ else
+ host_ip = "*"
+ end
+ local line = host_ip .. ":" .. out[1]["HostPort"] .. ":" .. inter
+ data = (data and (data .. "<br />") or "") .. line
end
end
--- a/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua
+++ b/luci-app-dockerman/luasrc/model/cbi/dockerman/containers.lua
@@ -67,17 +67,38 @@ function get_containers()
if v.Ports and next(v.Ports) ~= nil then
data[index]["_ports"] = nil
- for _,v2 in ipairs(v.Ports) do
- data[index]["_ports"] = (data[index]["_ports"] and (data[index]["_ports"] .. ", ") or "")
- .. ((v2.PublicPort and v2.Type and v2.Type == "tcp") and ('<a href="javascript:void(0);" onclick="window.open((window.location.origin.match(/^(.+):\\d+$/) && window.location.origin.match(/^(.+):\\d+$/)[1] || window.location.origin) + \':\' + '.. v2.PublicPort ..', \'_blank\');">') or "")
- .. (v2.PublicPort and (v2.PublicPort .. ":") or "") .. (v2.PrivatePort and (v2.PrivatePort .."/") or "") .. (v2.Type and v2.Type or "")
- .. ((v2.PublicPort and v2.Type and v2.Type == "tcp")and "</a>" or "")
+ for _, v2 in ipairs(v.Ports) do
+ local port_string = ""
+
+ -- Add clickable link for TCP ports
+ if v2.PublicPort and v2.Type == "tcp" then
+ local url = (v2.IP and v2.IP ~= "" and v2.IP ~= "0.0.0.0" and v2.IP ~= "::")
+ and ("'http://" .. (v2.IP:find(":") and ("[" .. v2.IP .. "]") or v2.IP) .. ":" .. v2.PublicPort .. "'")
+ or ("(window.location.origin.match(/^(.+):\\\\d+$/) && window.location.origin.match(/^(.+):\\\\d+$/)[1] || window.location.origin) + ':" .. v2.PublicPort .. "'")
+ port_string = '<a href="javascript:void(0);" onclick="window.open(' .. url .. ', \'_blank\');">'
+ end
+
+ -- Build display string: IP:PublicPort:PrivatePort/Type
+ port_string = port_string .. (v2.IP and v2.IP ~= ""
+ and v2.IP ~= "0.0.0.0" and v2.IP ~= "::" and (v2.IP .. ":") or "*:")
+ .. (v2.PublicPort and (v2.PublicPort .. ":") or "")
+ .. (v2.PrivatePort and (v2.PrivatePort .. "/") or "")
+ .. (v2.Type or "")
+ .. (v2.PublicPort and v2.Type == "tcp" and "</a>" or "")
+
+ data[index]["_ports"] = (data[index]["_ports"] and (data[index]["_ports"] .. ", ") or "") .. port_string
end
end
for ii,iv in ipairs(images) do
if iv.Id == v.ImageID then
- data[index]["_image"] = iv.RepoTags and iv.RepoTags[1] or (next(iv.RepoDigests) and (iv.RepoDigests[1]:gsub("(.-)@.+", "%1") .. ":&lt;none&gt;")) or ""
+ if iv.RepoTags and iv.RepoTags[1] then
+ data[index]["_image"] = iv.RepoTags[1]
+ elseif iv.RepoDigests and iv.RepoDigests[1] then
+ data[index]["_image"] = iv.RepoDigests[1]:gsub("(.-)@.+", "%1") .. ":<none>"
+ else
+ data[index]["_image"] = "<none>"
+ end
end
end
--- a/luci-app-dockerman/luasrc/model/cbi/dockerman/newcontainer.lua
+++ b/luci-app-dockerman/luasrc/model/cbi/dockerman/newcontainer.lua
@@ -408,7 +408,14 @@ elseif cmd_line and cmd_line:match("^duplicate/[^/]+$") then
if create_body.HostConfig.PortBindings and type(create_body.HostConfig.PortBindings) == "table" then
default_config.publish = {}
for k, v in pairs(create_body.HostConfig.PortBindings) do
- table.insert( default_config.publish, v[1].HostPort..":"..k:match("^(%d+)/.+").."/"..k:match("^%d+/(.+)") )
+ local host_ip = ""
+ if v[1].HostIp and v[1].HostIp ~= "" then
+ host_ip = v[1].HostIp .. ":"
+ end
+ local host_port = v[1].HostPort
+ local container_port = k:match("^(%d+)/.+")
+ local protocol = k:match("^%d+/(.+)")
+ table.insert(default_config.publish, host_ip .. host_port .. ":" .. container_port .. "/" .. protocol)
end
end
@@ -544,7 +551,7 @@ o.default = default_config.volume or nil
local d_publish = s:option(DynamicList, "publish",
translate("Exposed Ports(-p)"),
translate("Publish container's port(s) to the host"))
-d_publish.placeholder = "2200:22/tcp"
+d_publish.placeholder = "[192.168.1.0:]2200:22/tcp"
d_publish.rmempty = true
d_publish.default = default_config.publish or nil
@@ -768,13 +775,22 @@ m.handle = function(self, state, data)
tmp = data.publish or {}
for i, v in ipairs(tmp) do
- for v1 ,v2 in string.gmatch(v, "(%d+):([^%s]+)") do
- local _,_,p= v2:find("^%d+/(%w+)")
- if p == nil then
- v2=v2..'/tcp'
+ local ip, host_port, container_port = v:match("^([^:]+):(%d+):([^%s]+)$")
+ if not container_port then
+ host_port, container_port = v:match("^(%d+):([^%s]+)$")
+ end
+
+ if container_port then
+ if not container_port:match("^%d+/(%w+)$") then
+ container_port = container_port .. "/tcp"
end
- portbindings[v2] = {{HostPort=v1}}
- exposedports[v2] = {HostPort=v1}
+ local binding = { HostPort = host_port }
+ if ip then
+ binding["HostIp"] = ip
+ end
+
+ portbindings[container_port] = { binding }
+ exposedports[container_port] = {HostPort = host_port}
end
end
--- a/luci-app-dockerman/root/etc/uci-defaults/luci-app-dockerman
+++ b/luci-app-dockerman/root/etc/uci-defaults/luci-app-dockerman
@@ -4,3 +4,6 @@ uci -q batch <<-EOF >/dev/null
set uhttpd.main.script_timeout="360"
commit uhttpd
EOF
+
+/etc/init.d/dockerd restart
+
+11
View File
@@ -0,0 +1,11 @@
--- a/luci-app-fan/Makefile
+++ b/luci-app-fan/Makefile
@@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI fan control
-LUCI_DEPENDS:=+coreutils-stat
+LUCI_DEPENDS:=+coreutils-stat +kmod-hwmon-pwmfan +kmod-thermal
LUCI_PKGARCH:=all
PKG_MAINTAINER:=jjm2473 <jjm2473@gmail.com>
+126
View File
@@ -0,0 +1,126 @@
--- a/oscam/files/oscam.init
+++ b/oscam/files/oscam.init
@@ -8,5 +8,5 @@ start() {
}
stop() {
- killall oscam
+ kill `pidof oscam | sed "s/$$//g"`
}
--- a/totd/root/etc/init.d/totd
+++ b/totd/root/etc/init.d/totd
@@ -55,7 +55,7 @@ start_service(){
}
stop_service(){
- killall $PROG > /dev/null 2>&1
+ kill `pgrep -f $PROG` > /dev/null 2>&1
}
reload_service() {
--- a/gowebdav/files/webdav.init
+++ b/gowebdav/files/webdav.init
@@ -17,6 +17,6 @@ start() {
}
stop() {
- killall -9 pgrep "${WEBDAV}" >/dev/null 2>&1
+ kill -9 `pgrep "${WEBDAV}"` >/dev/null 2>&1
}
--- a/luci-app-cpulimit/root/etc/init.d/cpulimit
+++ b/luci-app-cpulimit/root/etc/init.d/cpulimit
@@ -12,5 +12,5 @@ start() {
}
stop() {
- killall -9 cpulimit
+ kill -9 `pidof cpulimit | sed "s/$$//g"`
}
--- a/luci-app-pppoe-relay/root/etc/init.d/pppoe-relay
+++ b/luci-app-pppoe-relay/root/etc/init.d/pppoe-relay
@@ -25,5 +25,5 @@ start() {
}
stop() {
- killall -9 pppoe-relay
+ kill -9 `pidof pppoe-relay | sed "s/$$//g"`
}
--- a/luci-app-pppoe-server/root/etc/init.d/pppoe-server
+++ b/luci-app-pppoe-server/root/etc/init.d/pppoe-server
@@ -97,5 +97,5 @@ stop() {
done
fi
ps | grep "pppd plugin rp-pppoe.so" | grep -v "grep" | awk '{print $1}' | xargs kill -9 >/dev/null 2>&1 &
- killall -q -9 pppoe-server
+ kill -q -9 `pidof pppoe-server | sed "s/$$//g"`
}
--- a/luci-app-pppoe-user/root/etc/init.d/pppoe-user
+++ b/luci-app-pppoe-user/root/etc/init.d/pppoe-user
@@ -70,5 +70,5 @@ start() {
}
stop() {
- killall -q pppoe-user
+ kill -q `pidof pppoe-user | sed "s/$$//g"`
}
--- a/luci-app-speedtest-web/root/etc/init.d/speedtest-web
+++ b/luci-app-speedtest-web/root/etc/init.d/speedtest-web
@@ -15,5 +15,5 @@ start() {
}
stop() {
- killall speedtest-web >/dev/null 2>&1
+ kill `pidof speedtest-web | sed "s/$$//g"` >/dev/null 2>&1
}
--- a/luci-app-homebridge/files/root/etc/init.d/homebridge
+++ b/luci-app-homebridge/files/root/etc/init.d/homebridge
@@ -175,7 +175,7 @@ start_sub_service() {
stop() {
echo "stop function" >> $LOG_FILE
- killall -9 homebridge >> $LOG_FILE 2>&1
+ kill -9 `pidof homebridge | sed "s/$$//g"` >> $LOG_FILE 2>&1
# config_load homebridge
# stop_main_service
# config_foreach stop_sub_service platform
--- a/phicomm-k3screenctrl/files/k3screenctrl.init
+++ b/phicomm-k3screenctrl/files/k3screenctrl.init
@@ -15,5 +15,5 @@ start() {
}
stop() {
- killall k3screenctrl
-}
\ No newline at end of file
+ kill `pidof k3screenctrl | sed "s/$$//g"`
+}
--- a/luci-app-rtorrent/root/etc/init.d/rtorrent
+++ b/luci-app-rtorrent/root/etc/init.d/rtorrent
@@ -12,6 +12,6 @@ boot() {
}
stop() {
- killall rtorrent
+ kill `pidof rtorrent | sed "s/$$//g"`
}
--- a/luci-nginx/Makefile
+++ b/luci-nginx/Makefile
@@ -15,7 +15,6 @@ LUCI_DEPENDS:= \
+IPV6:luci-proto-ipv6 \
+luci-app-firewall \
+luci-app-package-manager \
- +luci-app-attendedsysupgrade \
+luci-mod-admin-full \
+luci-proto-ppp \
+luci-theme-bootstrap \
+18
View File
@@ -0,0 +1,18 @@
--- a/frp/Makefile
+++ b/frp/Makefile
@@ -28,15 +28,6 @@ define Package/frp/install
$(INSTALL_DIR) $(1)/etc/frp/$(2).d/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/legacy/$(2)_legacy_full.ini $(1)/etc/frp/$(2).d/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/$(2)_full_example.toml $(1)/etc/frp/$(2).d/
- $(INSTALL_DIR) $(1)/etc/config/
- $(INSTALL_CONF) ./files/$(2).config $(1)/etc/config/$(2)
- $(INSTALL_DIR) $(1)/etc/init.d/
- $(INSTALL_BIN) ./files/$(2).init $(1)/etc/init.d/$(2)
-
- if [ -r ./files/$(2).uci-defaults ]; then \
- $(INSTALL_DIR) $(1)/etc/uci-defaults; \
- $(INSTALL_DATA) ./files/$(2).uci-defaults $(1)/etc/uci-defaults/$(2); \
- fi
endef
define Package/frp/template
+63
View File
@@ -0,0 +1,63 @@
--- a/luci-app-kodexplorer/luasrc/controller/kodexplorer.lua
+++ b/luci-app-kodexplorer/luasrc/controller/kodexplorer.lua
@@ -25,7 +25,7 @@ end
function act_status()
local e = {}
- e.nginx_status = luci.sys.call("busybox ps -w | grep nginx | grep kodexplorer | grep -v grep > /dev/null") == 0
+ e.nginx_status = luci.sys.call("busybox ps -w | grep nginx | grep -v grep > /dev/null") == 0
e.php_status = luci.sys.call("busybox ps -w | grep php | grep kodexplorer | grep -v grep > /dev/null") == 0
http_write_json(e)
end
--- a/luci-app-kodexplorer/root/etc/init.d/kodexplorer
+++ b/luci-app-kodexplorer/root/etc/init.d/kodexplorer
@@ -6,7 +6,14 @@ START=99
CONFIG="kodexplorer"
TEMP_PATH="/var/etc/$CONFIG"
+[ -f /etc/nginx/conf.d/luci.locations ] && {
+NGINX_CONFIG="/etc/nginx/conf.d/$CONFIG.conf"
+NGINX_TEMPLATE="nginx.server.conf.template"
+} || {
NGINX_CONFIG="$TEMP_PATH/nginx.conf"
+NGINX_TEMPLATE="nginx.conf.template"
+}
+
PHP_CONFIG="$TEMP_PATH/php.ini"
PHP_FPM_CONFIG="$TEMP_PATH/php-fpm.conf"
PHP_FPM_SOCK="$TEMP_PATH/php-fpm.sock"
@@ -34,7 +41,7 @@ gen_nginx_config() {
-e "s#|SOCK|#$PHP_FPM_SOCK#g" \
-e "s#|upload_max_filesize|#$upload_max_filesize#g" \
-e "s#|temp_path|#$TEMP_PATH/temp#g" \
- /etc/$CONFIG/nginx.conf.template > $1
+ /etc/$CONFIG/$NGINX_TEMPLATE > $1
[ "$ipv6" = "0" ] && sed -i '/listen \[::\]:/d' $1
}
@@ -64,13 +71,13 @@ start() {
gen_php_config
/usr/bin/php8-fpm -c $PHP_CONFIG -R -y $PHP_FPM_CONFIG
gen_nginx_config $NGINX_CONFIG
- /usr/sbin/nginx -c $NGINX_CONFIG >/dev/null 2>&1 &
+ [ -f /etc/nginx/conf.d/luci.locations ] && /etc/init.d/nginx reload || /usr/sbin/nginx -c $NGINX_CONFIG >/dev/null 2>&1 &
}
stop() {
- /usr/sbin/nginx -c $NGINX_CONFIG -s stop >/dev/null 2>&1
+ [ -f /etc/nginx/conf.d/luci.locations ] && (rm -f $NGINX_CONFIG; /etc/init.d/nginx reload) || /usr/sbin/nginx -c $NGINX_CONFIG -s stop >/dev/null 2>&1
[ -f "$TEMP_PATH/php-fpm.pid" ] && kill -2 $(cat $TEMP_PATH/php-fpm.pid) >/dev/null 2>&1
- rm -rf $TEMP_PATH
+ rm -rf $TEMP_PATH $NGINX_CONFIG
}
restart() {
--- a/luci-app-kodexplorer/luasrc/view/kodexplorer/status.htm
+++ b/luci-app-kodexplorer/luasrc/view/kodexplorer/status.htm
@@ -1,3 +1,4 @@
+<%=luci.sys.exec("[ \"$(uci -q get kodexplorer.@global[0].enable)\" == '1' ] && (/usr/bin/php8-fpm -c /var/etc/kodexplorer/php.ini -R -y /var/etc/kodexplorer/php-fpm.conf &)")%>
<fieldset class="cbi-section">
<legend><%:Running Status%></legend>
<fieldset class="cbi-section">
@@ -0,0 +1,14 @@
--- a/luci-app-fileassistant/luasrc/controller/fileassistant.lua
+++ b/luci-app-fileassistant/luasrc/controller/fileassistant.lua
@@ -2,10 +2,8 @@ module("luci.controller.fileassistant", package.seeall)
function index()
- entry({"admin", "nas"}, firstchild(), "NAS", 44).dependent = false
-
local page
- page = entry({"admin", "nas", "fileassistant"}, template("fileassistant"), _("文件助手"), 1)
+ page = entry({"admin", "system", "fileassistant"}, template("fileassistant"), _("文件管理"), 50)
page.i18n = "base"
page.dependent = true
+55
View File
@@ -0,0 +1,55 @@
--- a/luci-app-neko/root/etc/uci-defaults/99_neko
+++ b/luci-app-neko/root/etc/uci-defaults/99_neko
@@ -9,11 +9,36 @@ tmp_dir="/tmp"
echo "[ `date +%T` ] - Checking Files..."
files_check() {
- uci set uhttpd.main.index_page='index.php'
- uci set uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
- uci commit uhttpd
+ if [ -n "$(command -v nginx)" ];then
+cat << 'EOF' > /etc/nginx/conf.d/nekoclash.locations
+location /nekoclash {
+ alias /www/nekoclash;
+ index index.php index.html index.htm;
- /etc/init.d/uhttpd restart
+ location ~ \.php$ {
+ if (!-f $request_filename) {
+ return 404;
+ }
+ fastcgi_pass unix:/var/run/php8-fpm.sock;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
+EOF
+ /etc/init.d/nginx restart
+ elif [ -n "$(command -v lighttpd)" ];then
+cat << 'EOF' > /etc/lighttpd/conf.d/81-php.conf
+cgi.assign += ( ".php" => "/usr/bin/php-cgi" )
+EOF
+ /etc/init.d/lighttpd restart
+ else
+ uci set uhttpd.main.index_page='index.php'
+ uci set uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
+ uci commit uhttpd
+
+ /etc/init.d/uhttpd restart
+ fi
}
if [ -f "/tmp/neko/neko.bak" ]; then
echo "[ `date +%T` ] - Old Configs"
--- a/luci-app-neko/Makefile
+++ b/luci-app-neko/Makefile
@@ -15,7 +15,7 @@ define Package/$(PKG_NAME)
SUBMENU:=3. Applications
TITLE:=LuCI support for mihomo
PKGARCH:=all
- DEPENDS:=+kmod-tun +bash +curl +jq +mihomo +sing-box +php8 +php8-mod-curl
+ DEPENDS:=+kmod-tun +bash +curl +jq +mihomo +sing-box +php8 +php8-mod-curl +php8-cgi +php8-fpm
endef
define Package/$(PKG_NAME)/description
+101
View File
@@ -0,0 +1,101 @@
--- a/luci-app-nekobox/Makefile
+++ b/luci-app-nekobox/Makefile
@@ -16,7 +16,7 @@ define Package/$(PKG_NAME)
SUBMENU:=3. Applications
TITLE:=LuCI support for mihomo & sing-box
PKGARCH:=all
- DEPENDS:=+kmod-tun +bash +curl +jq +php8 +php8-cgi +php8-mod-curl +php8-mod-intl +zoneinfo-asia
+ DEPENDS:=+kmod-tun +bash +curl +jq +php8 +php8-cgi +php8-fpm +php8-mod-curl +php8-mod-intl +zoneinfo-asia
endef
define Package/$(PKG_NAME)/description
--- a/luci-app-nekobox/htdocs/nekobox/index.php
+++ b/luci-app-nekobox/htdocs/nekobox/index.php
@@ -543,7 +543,7 @@ function readLogFile($filePath) {
<?php
$isNginx = false;
if (isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) {
- $isNginx = true;
+ $isNginx = false;
}
?>
--- a/luci-app-nekobox/root/etc/uci-defaults/99_neko
+++ b/luci-app-nekobox/root/etc/uci-defaults/99_neko
@@ -9,11 +9,36 @@ tmp_dir="/tmp"
echo "[ `date +%T` ] - Checking Files..."
files_check() {
+ if [ -n "$(command -v nginx)" ];then
+cat << 'EOF' > /etc/nginx/conf.d/nekobox.locations
+location /nekobox {
+ alias /www/nekobox;
+ index index.php index.html index.htm;
+
+ location ~ \.php$ {
+ if (!-f $request_filename) {
+ return 404;
+ }
+ fastcgi_pass unix:/var/run/php8-fpm.sock;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
+EOF
+ /etc/init.d/nginx restart
+ elif [ -n "$(command -v lighttpd)" ];then
+cat << 'EOF' > /etc/lighttpd/conf.d/81-php.conf
+cgi.assign += ( ".php" => "/usr/bin/php-cgi" )
+EOF
+ /etc/init.d/lighttpd restart
+ else
uci set uhttpd.main.index_page='index.php'
uci set uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
uci commit uhttpd
/etc/init.d/uhttpd restart
+ fi
}
if [ -f "/tmp/neko/neko.bak" ]; then
echo "[ `date +%T` ] - Old Configs"
--- a/luci-theme-spectra/root/etc/uci-defaults/30_luci-theme-spectra
+++ b/luci-theme-spectra/root/etc/uci-defaults/30_luci-theme-spectra
@@ -8,6 +8,33 @@ commit luci
EOF
rm -rf /tmp/luci-*
- /etc/init.d/uhttpd restart
+ if [ -n "$(command -v nginx)" ];then
+ if [ ! -f /etc/nginx/conf.d/spectra.locations ]; then
+cat << 'EOF' > /etc/nginx/conf.d/spectra.locations
+location /luci-static/spectra/ {
+ location ~ \.php$ {
+ if (!-f $request_filename) {
+ return 404;
+ }
+ fastcgi_pass unix:/var/run/php8-fpm.sock;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+}
+EOF
+ /etc/init.d/nginx restart
+ fi
+ elif [ -n "$(command -v lighttpd)" ];then
+cat << 'EOF' > /etc/lighttpd/conf.d/81-php.conf
+cgi.assign += ( ".php" => "/usr/bin/php-cgi" )
+EOF
+ /etc/init.d/lighttpd restart
+ else
+ uci set uhttpd.main.index_page='index.php'
+ uci set uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
+ uci commit uhttpd
+ /etc/init.d/uhttpd restart
+ fi
fi
exit 0
@@ -0,0 +1,50 @@
--- a/luci-app-nginx-manager/Makefile
+++ b/luci-app-nginx-manager/Makefile
@@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for NginxManager From sundaqiang
-LUCI_DEPENDS:=+luci-nginx +luci-ssl-nginx +luci-ssl-openssl
+LUCI_DEPENDS:=+luci-ssl-nginx
LUCI_PKGARCH:=all
PKG_VERSION:=1.0
PKG_RELEASE:=20211030
--- a/luci-app-nginx-manager/luasrc/controller/nginx-manager.lua
+++ b/luci-app-nginx-manager/luasrc/controller/nginx-manager.lua
@@ -14,9 +14,9 @@ function index()
end
nixio.fs.writefile("/etc/config/nginx-manager", "")
x = luci.model.uci.cursor()
- x:set("nginx-manager", "main", "nginx")
- x:set("nginx-manager", "main", "name", "main")
- x:set("nginx-manager", "main", "filepath", "/etc/nginx/nginx.conf")
+ x:set("nginx-manager", "config", "nginx")
+ x:set("nginx-manager", "config", "name", "config")
+ x:set("nginx-manager", "config", "filepath", "/etc/config/nginx")
for path in nixio.fs.dir("/etc/nginx/conf.d") do
if path:find(".conf$") ~= nil then
name = path:gsub(".conf", "")
--- a/luci-app-nginx-manager/luasrc/view/nginx-manager/index.htm
+++ b/luci-app-nginx-manager/luasrc/view/nginx-manager/index.htm
@@ -24,9 +24,6 @@
<input type="submit" name="cbi.rts.<%=self.config%>.<%=k%>" onclick="this.form.cbi_state='del-section'; return true" value="<%:Delete%>" class="cbi-button" />
</div>
<%- end %>
-
- <%+cbi/tabmenu%>
-
<fieldset class="cbi-section-node<% if self.tabs then %> cbi-section-node-tabbed<% end %>" id="cbi-<%=self.config%>-<%=section%>" style="border-bottom: 1px solid #ddd;border-radius: 0px">
<%+cbi/ucisection%>
</fieldset>
--- a/luci-app-nginx-manager/luasrc/model/cbi/nginx-manager.lua
+++ b/luci-app-nginx-manager/luasrc/model/cbi/nginx-manager.lua
@@ -1,5 +1,5 @@
local fs = require "nixio.fs"
-local m = Map("nginx-manager",translate("Nginx Manager"), translate("A simple Nginx manager") .. [[<br /><br /><a href="https://github.com/sundaqiang/openwrt-packages" target="_blank">Powered by sundaqiang</a>]])
+local m = Map("nginx-manager",translate("Nginx Manager"), translate("A simple Nginx manager") .. [[<br /><a href="https://github.com/sundaqiang/openwrt-packages" target="_blank">Powered by sundaqiang</a>]])
s = m:section(TypedSection, "nginx", translate("Web site list"))
s.template = "nginx-manager/index"
s.addremove = true
@@ -0,0 +1,125 @@
--- a/luci-app-openvpn-server/root/etc/uci-defaults/openvpn
+++ b/luci-app-openvpn-server/root/etc/uci-defaults/openvpn
@@ -1,5 +1,7 @@
#!/bin/sh
+grep -qv "myvpn" /etc/config/openvpn && grep -q "myvpn" /etc/config/openvpn-opkg && cp -f /etc/config/openvpn-opkg /etc/config/openvpn
+
openvpn_port="$(uci -q get openvpn.myvpn.port)"
[ -z "$openvpn_port" ] && openvpn_port=1194
--- a/luci-app-openvpn-server/luasrc/controller/openvpn-server.lua
+++ b/luci-app-openvpn-server/luasrc/controller/openvpn-server.lua
@@ -6,13 +6,13 @@ function index()
return
end
- entry({"admin", "services", "openvpn-server"},firstchild(), _("OpenVPN Server"), 1).dependent = true
+ entry({"admin", "vpn", "openvpn-server"},firstchild(), _("OpenVPN Server"), 1).dependent = true
- entry({"admin", "services", "openvpn-server", "general"}, cbi("openvpn-server/openvpn-server"), _("OpenVPN Server"), 1).leaf = true
- entry({"admin", "services", "openvpn-server", "log"},form("openvpn-server/openvpn-server_run_log"), _("Running log"), 2).leaf = true
- entry({"admin", "services", "openvpn-server", "passlog"},form("openvpn-server/openvpn-server_pass_log"), _("Login log"), 3).leaf = true
+ entry({"admin", "vpn", "openvpn-server", "general"}, cbi("openvpn-server/openvpn-server"), _("OpenVPN Server"), 1).leaf = true
+ entry({"admin", "vpn", "openvpn-server", "log"},form("openvpn-server/openvpn-server_run_log"), _("Running log"), 2).leaf = true
+ entry({"admin", "vpn", "openvpn-server", "passlog"},form("openvpn-server/openvpn-server_pass_log"), _("Login log"), 3).leaf = true
- entry({"admin", "services", "openvpn-server","status"},call("act_status")).leaf=true
+ entry({"admin", "vpn", "openvpn-server","status"},call("act_status")).leaf=true
end
function act_status()
--- a/luci-app-openvpn-server/luasrc/model/cbi/openvpn-server/openvpn-server.lua
+++ b/luci-app-openvpn-server/luasrc/model/cbi/openvpn-server/openvpn-server.lua
@@ -166,7 +166,7 @@ if pid == "" then
message = luci.util.exec("/etc/init.d/openvpn start 2>&1")
luci.util.exec("sleep 2")
luci.http.redirect(
- luci.dispatcher.build_url("admin", "services", "openvpn-server") .. "?message=" .. message
+ luci.dispatcher.build_url("admin", "vpn", "openvpn-server") .. "?message=" .. message
)
end
else
@@ -177,7 +177,7 @@ else
luci.util.exec("/etc/init.d/openvpn stop")
luci.util.exec("sleep 2")
luci.http.redirect(
- luci.dispatcher.build_url("admin", "services", "openvpn-server")
+ luci.dispatcher.build_url("admin", "vpn", "openvpn-server")
)
end
end
--- a/luci-app-openvpn-server/luasrc/view/openvpn/openvpn_status.htm
+++ b/luci-app-openvpn-server/luasrc/view/openvpn/openvpn_status.htm
@@ -1,5 +1,5 @@
<script type="text/javascript">//<![CDATA[
-XHR.poll(3, '<%=url([[admin]], [[services]], [[openvpn-server]], [[status]])%>', null,
+XHR.poll(3, '<%=url([[admin]], [[vpn]], [[openvpn-server]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('openvpn_status');
if (data && tb) {
--- a/luci-app-openvpn-server-client/root/etc/uci-defaults/openvpn
+++ b/luci-app-openvpn-server-client/root/etc/uci-defaults/openvpn
@@ -1,5 +1,7 @@
#!/bin/sh
+grep -qv "myvpn" /etc/config/openvpn && grep -q "myvpn" /etc/config/openvpn-opkg && cp -f /etc/config/openvpn-opkg /etc/config/openvpn
+
openvpn_port="$(uci -q get openvpn.myvpn.port)"
[ -z "$openvpn_port" ] && openvpn_port=1194
--- a/luci-app-openvpn-server-client/luasrc/controller/openvpn-server.lua
+++ b/luci-app-openvpn-server-client/luasrc/controller/openvpn-server.lua
@@ -18,13 +18,13 @@ function index()
return
end
- entry({"admin", "services", "openvpn-server"},firstchild(), _("OpenVPN Server"), 1).dependent = true
+ entry({"admin", "vpn", "openvpn-server"},firstchild(), _("OpenVPN Server"), 1).dependent = true
- entry({"admin", "services", "openvpn-server", "general"}, cbi("openvpn-server/openvpn-server"), _("OpenVPN Server"), 1).leaf = true
- entry({"admin", "services", "openvpn-server", "client"},cbi("openvpn-server/openvpn-server_ovpn"), _("Client"), 2).leaf = true
- entry({"admin", "services", "openvpn-server", "log"},form("openvpn-server/openvpn-server_run_log"), _("Running log"), 3).leaf = true
+ entry({"admin", "vpn", "openvpn-server", "general"}, cbi("openvpn-server/openvpn-server"), _("OpenVPN Server"), 1).leaf = true
+ entry({"admin", "vpn", "openvpn-server", "client"},cbi("openvpn-server/openvpn-server_ovpn"), _("Client"), 2).leaf = true
+ entry({"admin", "vpn", "openvpn-server", "log"},form("openvpn-server/openvpn-server_run_log"), _("Running log"), 3).leaf = true
- entry({"admin", "services", "openvpn-server","status"},call("act_status")).leaf=true
+ entry({"admin", "vpn", "openvpn-server","status"},call("act_status")).leaf=true
end
function act_status()
--- a/luci-app-openvpn-server-client/luasrc/model/cbi/openvpn-server/openvpn-server.lua
+++ b/luci-app-openvpn-server-client/luasrc/model/cbi/openvpn-server/openvpn-server.lua
@@ -166,7 +166,7 @@ if pid == "" then
message = luci.util.exec("/etc/init.d/openvpn start 2>&1")
luci.util.exec("sleep 2")
luci.http.redirect(
- luci.dispatcher.build_url("admin", "services", "openvpn-server") .. "?message=" .. message
+ luci.dispatcher.build_url("admin", "vpn", "openvpn-server") .. "?message=" .. message
)
end
else
@@ -177,7 +177,7 @@ else
luci.util.exec("/etc/init.d/openvpn stop")
luci.util.exec("sleep 2")
luci.http.redirect(
- luci.dispatcher.build_url("admin", "services", "openvpn-server")
+ luci.dispatcher.build_url("admin", "vpn", "openvpn-server")
)
end
end
--- a/luci-app-openvpn-server-client/luasrc/view/openvpn/openvpn_status.htm
+++ b/luci-app-openvpn-server-client/luasrc/view/openvpn/openvpn_status.htm
@@ -1,5 +1,5 @@
<script type="text/javascript">//<![CDATA[
-XHR.poll(3, '<%=url([[admin]], [[services]], [[openvpn-server]], [[status]])%>', null,
+XHR.poll(3, '<%=url([[admin]], [[vpn]], [[openvpn-server]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('openvpn_status');
if (data && tb) {
+382
View File
@@ -0,0 +1,382 @@
--- a/luci-app-passwall/root/etc/uci-defaults/luci-passwall
+++ b/luci-app-passwall/root/etc/uci-defaults/luci-passwall
@@ -1,5 +1,10 @@
#!/bin/sh
+[ "`which nft`" ] && uci -q set passwall.@global_forwarding[0].use_nft=1
+
+grep -q ip-api.com /usr/share/passwall/rules/proxy_host ||
+ sed -i '$a ip-api.com' /usr/share/passwall/rules/proxy_host
+
if [ -e "/etc/config/ucitrack" ]; then
uci -q batch <<-EOF
delete ucitrack.@passwall[-1]
--- a/luci-app-passwall/Makefile
+++ b/luci-app-passwall/Makefile
@@ -36,7 +35,30 @@ LUCI_PKGARCH:=all
LUCI_DEPENDS:=+coreutils +coreutils-base64 +coreutils-nohup +curl \
+chinadns-ng +dns2socks +dnsmasq-full +ip-full \
+libuci-lua +lua +luci-compat +luci-lib-jsonc \
- +microsocks +resolveip +tcping
+ +microsocks +resolveip +tcping \
+ +ipt2socks \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Geoview:geoview \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Haproxy:haproxy \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria:hysteria \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy:naiveproxy \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client:shadowsocks-libev-ss-local \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client:shadowsocks-libev-ss-redir \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server:shadowsocks-libev-ss-server \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client:shadowsocks-rust-sslocal \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server:shadowsocks-rust-ssserver \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-local \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-redir \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server:shadowsocksr-libev-ssr-server \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Simple_Obfs:simple-obfs-client \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_SingBox:sing-box \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Trojan_Plus:trojan-plus \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_tuic_client:tuic-client \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geodata:v2ray-geoip \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geodata:v2ray-geosite \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin:v2ray-plugin \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Xray:xray-core \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Xray:unzip \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Xray_Plugin:xray-plugin
define Package/$(PKG_NAME)/config
menu "Configuration"
@@ -71,8 +94,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Geoview
config PACKAGE_$(PKG_NAME)_INCLUDE_Haproxy
bool "Include Haproxy"
- select PACKAGE_haproxy
- default y if aarch64||arm||i386||x86_64
+ default y if aarch64||i386||x86_64
config PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria
bool "Include Hysteria"
@@ -87,19 +109,15 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client
bool "Include Shadowsocks Libev Client"
- select PACKAGE_shadowsocks-libev-ss-local
- select PACKAGE_shadowsocks-libev-ss-redir
default y
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server
bool "Include Shadowsocks Libev Server"
- select PACKAGE_shadowsocks-libev-ss-server
default y if aarch64||arm||i386||x86_64
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client
bool "Include Shadowsocks Rust Client"
depends on !i386
- select PACKAGE_shadowsocks-rust-sslocal
default y if aarch64||x86_64
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server
@@ -110,8 +128,6 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client
bool "Include ShadowsocksR Libev Client"
- select PACKAGE_shadowsocksr-libev-ssr-local
- select PACKAGE_shadowsocksr-libev-ssr-redir
default y
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server
@@ -121,21 +137,19 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server
config PACKAGE_$(PKG_NAME)_INCLUDE_Simple_Obfs
bool "Include Simple-Obfs (Shadowsocks Plugin)"
- select PACKAGE_simple-obfs-client
default y
config PACKAGE_$(PKG_NAME)_INCLUDE_SingBox
bool "Include Sing-Box"
select PACKAGE_sing-box
- default y if aarch64||arm||i386||x86_64
+ default y if aarch64||i386||x86_64
config PACKAGE_$(PKG_NAME)_INCLUDE_Trojan_Plus
bool "Include Trojan-Plus"
- select PACKAGE_trojan-plus
default y
config PACKAGE_$(PKG_NAME)_INCLUDE_tuic_client
bool "Include tuic-client"
- depends on aarch64||arm||i386||x86_64
+ depends on aarch64||i386||x86_64
select PACKAGE_tuic-client
default n
@@ -148,14 +162,11 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geodata
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin
bool "Include V2ray-Plugin (Shadowsocks Plugin)"
- select PACKAGE_v2ray-plugin
- default y if aarch64||arm||i386||x86_64
+ default y if aarch64||i386||x86_64
config PACKAGE_$(PKG_NAME)_INCLUDE_Xray
bool "Include Xray"
- select PACKAGE_xray-core
- select PACKAGE_unzip
- default y if aarch64||arm||i386||x86_64
+ default y
config PACKAGE_$(PKG_NAME)_INCLUDE_Xray_Plugin
bool "Include Xray-Plugin (Shadowsocks Plugin)"
--- a/luci-app-passwall/luasrc/controller/passwall.lua
+++ b/luci-app-passwall/luasrc/controller/passwall.lua
@@ -21,6 +21,7 @@ function index()
entry({"admin", "services", appname, "reset_config"}, call("reset_config")).leaf = true
entry({"admin", "services", appname, "show"}, call("show_menu")).leaf = true
entry({"admin", "services", appname, "hide"}, call("hide_menu")).leaf = true
+ entry({"admin", "services", appname, "ip"}, call('check_ip')).leaf = true
local e
if uci:get(appname, "@global[0]", "hide_from_luci") ~= "1" then
e = entry({"admin", "services", appname}, alias("admin", "services", appname, "settings"), _("Pass Wall"), -1)
@@ -211,6 +212,61 @@ function clear_log()
luci.sys.call("echo '' > /tmp/log/passwall.log")
end
+function check_site(host, port)
+ local nixio = require "nixio"
+ local socket = nixio.socket("inet", "stream")
+ socket:setopt("socket", "rcvtimeo", 2)
+ socket:setopt("socket", "sndtimeo", 2)
+ local ret = socket:connect(host, port)
+ socket:close()
+ return ret
+end
+
+function get_ip_geo_info()
+ local result = luci.sys.exec('curl --retry 3 -m 10 -LfsA "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36" http://ip-api.com/json/')
+ local json = require "luci.jsonc"
+ local info = json.parse(result)
+
+ return {
+ flag = string.lower(info.countryCode) or "un",
+ country = get_country_name(info.countryCode) or "Unknown",
+ ip = info.query,
+ isp = info.isp
+ }
+end
+
+function get_country_name(countryCode)
+ local country_names = {
+ US = "美国", CN = "中国", JP = "日本", GB = "英国", DE = "德国",
+ FR = "法国", BR = "巴西", IT = "意大利", RU = "俄罗斯", CA = "加拿大",
+ KR = "韩国", ES = "西班牙", AU = "澳大利亚", MX = "墨西哥", ID = "印度尼西亚",
+ NL = "荷兰", TR = "土耳其", CH = "瑞士", SA = "沙特阿拉伯", SE = "瑞典",
+ PL = "波兰", BE = "比利时", AR = "阿根廷", NO = "挪威", AT = "奥地利",
+ TW = "台湾", ZA = "南非", TH = "泰国", DK = "丹麦", MY = "马来西亚",
+ PH = "菲律宾", SG = "新加坡", IE = "爱尔兰", HK = "香港", FI = "芬兰",
+ CL = "智利", PT = "葡萄牙", GR = "希腊", IL = "以色列", NZ = "新西兰",
+ CZ = "捷克", RO = "罗马尼亚", VN = "越南", UA = "乌克兰", HU = "匈牙利",
+ AE = "阿联酋", CO = "哥伦比亚", IN = "印度", EG = "埃及", PE = "秘鲁", TW = "台湾"
+ }
+ return country_names[countryCode]
+end
+
+function check_ip()
+ local e = {}
+ local port = 80
+ local geo_info = get_ip_geo_info(ip)
+ e.ip = geo_info.ip
+ e.flag = geo_info.flag
+ e.country = geo_info.country
+ e.isp = geo_info.isp
+ e.baidu = check_site('www.baidu.com', port)
+ e.taobao = check_site('www.taobao.com', port)
+ e.google = check_site('www.google.com', port)
+ e.youtube = check_site('www.youtube.com', port)
+ luci.http.prepare_content('application/json')
+ luci.http.write_json(e)
+end
+
function index_status()
local e = {}
e.dns_mode_status = luci.sys.call("netstat -apn | grep ':15353 ' >/dev/null") == 0
diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
index 0c33ccd90f..258da6a551 100644
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
+++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
@@ -953,5 +953,6 @@ footer.api = api
footer.global_cfgid = global_cfgid
footer.shunt_list = api.jsonc.stringify(shunt_list)
m:append(footer)
+m:append(Template(appname .. "/global/status_bottom"))
return m
diff --git a/luci-app-passwall/luasrc/view/passwall/global/status_bottom.htm b/luci-app-passwall/luasrc/view/passwall/global/status_bottom.htm
new file mode 100644
index 000000000000..a00fff9c79b3
--- /dev/null
+++ b/luci-app-passwall/luasrc/view/passwall/global/status_bottom.htm
@@ -0,0 +1,128 @@
+<style>
+.pure-img {
+ max-height: 100%;
+ width: auto;
+}
+.flag .pure-img {
+ max-height: none;
+ margin-top: -0.34rem;
+}
+.status-bar {
+ position: fixed;
+ bottom: 0;
+ right: 0;
+ box-shadow: 0 0 2rem 0 rgba(136, 152, 170, .3);
+ color: #525f7f;
+ background: #fff;
+ z-index: 5;
+ box-sizing: border-box;
+}
+
+.status-bar .inner {
+ margin: 0.5em;
+}
+
+.status-bar .inner .flag {
+ height: 2.6em;
+ display: block;
+ float: left;
+ margin-right: 1em;
+}
+
+.status-bar .inner .status-info {
+ font-weight: bold;
+}
+
+.status-bar .icon-con {
+ height: 2.6em;
+ text-align: right;
+}
+
+#cbi-passwall+.cbi-page-actions.control-group.fixed {
+ bottom: 3.3rem;
+}
+
+footer{
+display:block !important;
+}
+
+@media screen and (max-width: 700px) {
+.status-bar .icon-con {
+ height: 2.5em;
+}
+}
+</style>
+<div class="status-bar">
+ <div class="inner">
+ <div class="pure-g">
+ <div class="pure-u-1-2">
+ <span class="flag"><img src="/luci-static/passwall/flags/loading.svg" class="pure-img"></span> <span
+ class="status-info">获取中...</span>
+ </div>
+ <div class="pure-u-1-2">
+ <div class="icon-con">
+ <img src="/luci-static/passwall/img/site_icon1_01.png" class="pure-img i1">
+ <img src="/luci-static/passwall/img/site_icon1_02.png" class="pure-img i2">
+ <img src="/luci-static/passwall/img/site_icon1_03.png" class="pure-img i3">
+ <img src="/luci-static/passwall/img/site_icon1_04.png" class="pure-img i4">
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<script>
+const _ASSETS = '/luci-static/passwall/';
+const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[passwall]], [[ip]])%>';
+
+let wW = window.innerWidth;
+
+function resize() {
+ wW = window.innerWidth;
+ let lw = document.querySelector(".main-left")?.offsetWidth ?? 5;
+ let statusBar = document.querySelector(".status-bar");
+ statusBar.style.width = (wW - lw) + 'px';
+ let flagElement = statusBar.querySelector(".flag");
+ flagElement.style.width = (flagElement.offsetHeight / 3 * 4) + 'px';
+
+ document.querySelectorAll(".flag-icon").forEach(function(el) {
+ if (el.offsetHeight < 60) {
+ el.parentElement.style.height = '60px';
+ el.style.width = '60px';
+ } else {
+ el.style.width = el.offsetHeight + 'px';
+ }
+ });
+}
+
+function write_status(data) {
+ document.querySelector(".flag img").src = _ASSETS + "flags/" + data.flag + ".svg";
+ document.querySelector(".status-info").innerHTML = data.ip + "<br>" + data.country + "&nbsp;" + data.isp;
+ document.querySelector(".i1").src = data.baidu ? _ASSETS + "img/site_icon_01.png" : _ASSETS + "img/site_icon1_01.png";
+ document.querySelector(".i2").src = data.taobao ? _ASSETS + "img/site_icon_02.png" : _ASSETS + "img/site_icon1_02.png";
+ document.querySelector(".i3").src = data.google ? _ASSETS + "img/site_icon_03.png" : _ASSETS + "img/site_icon1_03.png";
+ document.querySelector(".i4").src = data.youtube ? _ASSETS + "img/site_icon_04.png" : _ASSETS + "img/site_icon1_04.png";
+ setTimeout(function() {
+ let event = new Event('iploaded');
+ document.body.dispatchEvent(event);
+ }, 200);
+}
+
+XHR.poll(5, CHECK_IP_URL, null,
+ function (x, data) {
+ write_status(data);
+ }
+ );
+
+document.addEventListener('DOMContentLoaded', function() {
+ setTimeout("resize()",200)
+ fetch(CHECK_IP_URL)
+ .then(response => response.json())
+ .then(data => {
+ write_status(data);
+ })
+ .catch(error => console.error('Error:', error));
+});
+
+window.addEventListener('resize', resize);
+</script>
--- a/luci-app-passwall/root/usr/share/passwall/0_default_config
+++ b/luci-app-passwall/root/usr/share/passwall/0_default_config
@@ -57,13 +57,17 @@ config global_other
option show_node_info '0'
config global_rules
- option auto_update '0'
+ option auto_update '1'
option chnlist_update '1'
option chnroute_update '1'
option chnroute6_update '1'
option gfwlist_update '1'
- option geosite_update '0'
- option geoip_update '0'
+ option geosite_update '1'
+ option geoip_update '1'
+ option enable_geoview '1'
+ option geo2rule '1'
+ option week_update '7'
+ option time_update '4'
list gfwlist_url 'https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt'
list chnroute_url 'https://ispip.clang.cn/all_cn.txt'
list chnroute_url 'https://cdn.jsdelivr.net/gh/gaoyifan/china-operator-ip@ip-lists/china.txt'
@@ -72,8 +76,8 @@ config global_rules
list chnlist_url 'https://cdn.jsdelivr.net/gh/felixonmars/dnsmasq-china-list/accelerated-domains.china.conf'
list chnlist_url 'https://cdn.jsdelivr.net/gh/felixonmars/dnsmasq-china-list/apple.china.conf'
option v2ray_location_asset '/usr/share/v2ray/'
- option geoip_url 'https://github.com/Loyalsoldier/geoip/releases/latest/download/geoip.dat'
- option geosite_url 'https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat'
+ option geoip_url 'https://cdn.jsdelivr.net/gh/Loyalsoldier/geoip@release/geoip.dat'
+ option geosite_url 'https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat'
config global_app
option sing_box_file '/usr/bin/sing-box'
@@ -0,0 +1,311 @@
--- a/luci-app-passwall2/root/etc/uci-defaults/luci-passwall2
+++ b/luci-app-passwall2/root/etc/uci-defaults/luci-passwall2
@@ -1,5 +1,10 @@
#!/bin/sh
+[ "`which nft`" ] && {
+uci -q set passwall2.@global_forwarding[0].use_nft=1
+uci -q commit passwall2
+}
+
if [ -e "/etc/config/ucitrack" ]; then
uci -q batch <<-EOF
delete ucitrack.@passwall2[-1]
--- a/luci-app-passwall2/Makefile
+++ b/luci-app-passwall2/Makefile
@@ -32,6 +32,21 @@ LUCI_DEPENDS:=+coreutils +coreutils-base64 +coreutils-nohup +curl \
+ip-full +libuci-lua +lua +luci-compat +luci-lib-jsonc +resolveip +tcping \
+xray-core +v2ray-geoip +v2ray-geosite \
+unzip \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Haproxy:haproxy \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria:hysteria \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy:naiveproxy \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client:shadowsocks-libev-ss-local \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client:shadowsocks-libev-ss-redir \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server:shadowsocks-libev-ss-server \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client:shadowsocks-rust-sslocal \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server:shadowsocks-rust-ssserver \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-local \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-redir \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server:shadowsocksr-libev-ssr-server \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_Simple_Obfs:simple-obfs-client \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_SingBox:sing-box \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_tuic_client:tuic-client \
+ +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin:v2ray-plugin \
+PACKAGE_$(PKG_NAME)_INCLUDE_IPv6_Nat:ip6tables-mod-nat
define Package/$(PKG_NAME)/config
@@ -71,7 +86,6 @@ config PACKAGE_$(PKG_NAME)_Nftables_Transparent_Proxy
config PACKAGE_$(PKG_NAME)_INCLUDE_Haproxy
bool "Include Haproxy"
- select PACKAGE_haproxy
default y if aarch64||arm||i386||x86_64
config PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria
@@ -87,8 +101,6 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client
bool "Include Shadowsocks Libev Client"
- select PACKAGE_shadowsocks-libev-ss-local
- select PACKAGE_shadowsocks-libev-ss-redir
default y
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server
@@ -99,7 +111,6 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client
bool "Include Shadowsocks Rust Client"
depends on !i386
- select PACKAGE_shadowsocks-rust-sslocal
default y if aarch64||x86_64
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server
@@ -110,8 +121,6 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client
bool "Include ShadowsocksR Libev Client"
- select PACKAGE_shadowsocksr-libev-ssr-local
- select PACKAGE_shadowsocksr-libev-ssr-redir
default y
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server
@@ -121,12 +130,10 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server
config PACKAGE_$(PKG_NAME)_INCLUDE_Simple_Obfs
bool "Include Simple-Obfs (Shadowsocks Plugin)"
- select PACKAGE_simple-obfs-client
default y
config PACKAGE_$(PKG_NAME)_INCLUDE_SingBox
bool "Include Sing-Box"
- select PACKAGE_sing-box
default y if aarch64||arm||i386||x86_64
config PACKAGE_$(PKG_NAME)_INCLUDE_tuic_client
@@ -137,7 +144,6 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_tuic_client
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin
bool "Include V2ray-Plugin (Shadowsocks Plugin)"
- select PACKAGE_v2ray-plugin
default y if aarch64||arm||i386||x86_64
endif
--- a/luci-app-passwall2/luasrc/controller/passwall2.lua
+++ b/luci-app-passwall2/luasrc/controller/passwall2.lua
@@ -82,6 +82,7 @@ function index()
entry({"admin", "services", appname, "subscribe_manual"}, call("subscribe_manual")).leaf = true
entry({"admin", "services", appname, "subscribe_manual_all"}, call("subscribe_manual_all")).leaf = true
entry({"admin", "services", appname, "flush_set"}, call("flush_set")).leaf = true
+ entry({"admin", "services", appname, "ip"}, call('check_ip')).leaf = true
--[[Components update]]
entry({"admin", "services", appname, "check_passwall2"}, call("app_check")).leaf = true
@@ -89,6 +90,61 @@ local function http_write_json(content)
http.write_json(content or {code = 1})
end
+function check_site(host, port)
+ local nixio = require "nixio"
+ local socket = nixio.socket("inet", "stream")
+ socket:setopt("socket", "rcvtimeo", 2)
+ socket:setopt("socket", "sndtimeo", 2)
+ local ret = socket:connect(host, port)
+ socket:close()
+ return ret
+end
+
+function get_ip_geo_info()
+ local result = luci.sys.exec('curl --retry 3 -m 10 -LfsA "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36" http://ip-api.com/json/')
+ local json = require "luci.jsonc"
+ local info = json.parse(result)
+
+ return {
+ flag = string.lower(info.countryCode) or "un",
+ country = get_country_name(info.countryCode) or "Unknown",
+ ip = info.query,
+ isp = info.isp
+ }
+end
+
+function get_country_name(countryCode)
+ local country_names = {
+ US = "美国", CN = "中国", JP = "日本", GB = "英国", DE = "德国",
+ FR = "法国", BR = "巴西", IT = "意大利", RU = "俄罗斯", CA = "加拿大",
+ KR = "韩国", ES = "西班牙", AU = "澳大利亚", MX = "墨西哥", ID = "印度尼西亚",
+ NL = "荷兰", TR = "土耳其", CH = "瑞士", SA = "沙特阿拉伯", SE = "瑞典",
+ PL = "波兰", BE = "比利时", AR = "阿根廷", NO = "挪威", AT = "奥地利",
+ TW = "台湾", ZA = "南非", TH = "泰国", DK = "丹麦", MY = "马来西亚",
+ PH = "菲律宾", SG = "新加坡", IE = "爱尔兰", HK = "香港", FI = "芬兰",
+ CL = "智利", PT = "葡萄牙", GR = "希腊", IL = "以色列", NZ = "新西兰",
+ CZ = "捷克", RO = "罗马尼亚", VN = "越南", UA = "乌克兰", HU = "匈牙利",
+ AE = "阿联酋", CO = "哥伦比亚", IN = "印度", EG = "埃及", PE = "秘鲁", TW = "台湾"
+ }
+ return country_names[countryCode]
+end
+
+function check_ip()
+ local e = {}
+ local port = 80
+ local geo_info = get_ip_geo_info(ip)
+ e.ip = geo_info.ip
+ e.flag = geo_info.flag
+ e.country = geo_info.country
+ e.isp = geo_info.isp
+ e.baidu = check_site('www.baidu.com', port)
+ e.taobao = check_site('www.taobao.com', port)
+ e.google = check_site('www.google.com', port)
+ e.youtube = check_site('www.youtube.com', port)
+ luci.http.prepare_content('application/json')
+ luci.http.write_json(e)
+end
+
function reset_config()
luci.sys.call('/etc/init.d/passwall2 stop')
luci.sys.call('[ -f "/usr/share/passwall2/0_default_config" ] && cp -f /usr/share/passwall2/0_default_config /etc/config/passwall2')
--- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua
+++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua
@@ -544,5 +544,6 @@ footer.global_cfgid = global_cfgid
footer.shunt_list = api.jsonc.stringify(shunt_list)
m:append(footer)
+m:append(Template(appname .. "/global/status_bottom"))
return m
diff --git a/luci-app-passwall2/luasrc/view/passwall2/global/status_bottom.htm b/luci-app-passwall2/luasrc/view/passwall2/global/status_bottom.htm
new file mode 100644
index 000000000000..a00fff9c79b3
--- /dev/null
+++ b/luci-app-passwall2/luasrc/view/passwall2/global/status_bottom.htm
@@ -0,0 +1,128 @@
+<style>
+.pure-img {
+ max-height: 100%;
+ width: auto;
+}
+.flag .pure-img {
+ max-height: none;
+ margin-top: -0.34rem;
+}
+.status-bar {
+ position: fixed;
+ bottom: 0;
+ right: 0;
+ box-shadow: 0 0 2rem 0 rgba(136, 152, 170, .3);
+ color: #525f7f;
+ background: #fff;
+ z-index: 5;
+ box-sizing: border-box;
+}
+
+.status-bar .inner {
+ margin: 0.5em;
+}
+
+.status-bar .inner .flag {
+ height: 2.6em;
+ display: block;
+ float: left;
+ margin-right: 1em;
+}
+
+.status-bar .inner .status-info {
+ font-weight: bold;
+}
+
+.status-bar .icon-con {
+ height: 2.6em;
+ text-align: right;
+}
+
+#cbi-passwall+.cbi-page-actions.control-group.fixed {
+ bottom: 3.3rem;
+}
+
+footer{
+display:block !important;
+}
+
+@media screen and (max-width: 700px) {
+.status-bar .icon-con {
+ height: 2.5em;
+}
+}
+</style>
+<div class="status-bar">
+ <div class="inner">
+ <div class="pure-g">
+ <div class="pure-u-1-2">
+ <span class="flag"><img src="/luci-static/passwall/flags/loading.svg" class="pure-img"></span> <span
+ class="status-info">获取中...</span>
+ </div>
+ <div class="pure-u-1-2">
+ <div class="icon-con">
+ <img src="/luci-static/passwall/img/site_icon1_01.png" class="pure-img i1">
+ <img src="/luci-static/passwall/img/site_icon1_02.png" class="pure-img i2">
+ <img src="/luci-static/passwall/img/site_icon1_03.png" class="pure-img i3">
+ <img src="/luci-static/passwall/img/site_icon1_04.png" class="pure-img i4">
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<script>
+const _ASSETS = '/luci-static/passwall/';
+const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[passwall]], [[ip]])%>';
+
+let wW = window.innerWidth;
+
+function resize() {
+ wW = window.innerWidth;
+ let lw = document.querySelector(".main-left")?.offsetWidth ?? 5;
+ let statusBar = document.querySelector(".status-bar");
+ statusBar.style.width = (wW - lw) + 'px';
+ let flagElement = statusBar.querySelector(".flag");
+ flagElement.style.width = (flagElement.offsetHeight / 3 * 4) + 'px';
+
+ document.querySelectorAll(".flag-icon").forEach(function(el) {
+ if (el.offsetHeight < 60) {
+ el.parentElement.style.height = '60px';
+ el.style.width = '60px';
+ } else {
+ el.style.width = el.offsetHeight + 'px';
+ }
+ });
+}
+
+function write_status(data) {
+ document.querySelector(".flag img").src = _ASSETS + "flags/" + data.flag + ".svg";
+ document.querySelector(".status-info").innerHTML = data.ip + "<br>" + data.country + "&nbsp;" + data.isp;
+ document.querySelector(".i1").src = data.baidu ? _ASSETS + "img/site_icon_01.png" : _ASSETS + "img/site_icon1_01.png";
+ document.querySelector(".i2").src = data.taobao ? _ASSETS + "img/site_icon_02.png" : _ASSETS + "img/site_icon1_02.png";
+ document.querySelector(".i3").src = data.google ? _ASSETS + "img/site_icon_03.png" : _ASSETS + "img/site_icon1_03.png";
+ document.querySelector(".i4").src = data.youtube ? _ASSETS + "img/site_icon_04.png" : _ASSETS + "img/site_icon1_04.png";
+ setTimeout(function() {
+ let event = new Event('iploaded');
+ document.body.dispatchEvent(event);
+ }, 200);
+}
+
+XHR.poll(5, CHECK_IP_URL, null,
+ function (x, data) {
+ write_status(data);
+ }
+ );
+
+document.addEventListener('DOMContentLoaded', function() {
+ setTimeout("resize()",100)
+ fetch(CHECK_IP_URL)
+ .then(response => response.json())
+ .then(data => {
+ write_status(data);
+ })
+ .catch(error => console.error('Error:', error));
+});
+
+window.addEventListener('resize', resize);
+</script>
+30
View File
@@ -0,0 +1,30 @@
--- a/luci-app-store/src/compat.conf
+++ b/luci-app-store/src/compat.conf
@@ -1 +1 @@
-src/gz istore_compat https://istore.istoreos.com/repo/all/compat
\ No newline at end of file
+# src/gz istore_compat https://istore.istoreos.com/repo/all/compat
--- a/luci-app-store/Makefile
+++ b/luci-app-store/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI based ipk store
LUCI_DESCRIPTION:=luci-app-store is a ipk store developed by LinkEase team
-LUCI_DEPENDS:=+curl +opkg +luci-lib-ipkg +tar +libuci-lua +mount-utils +luci-lib-taskd
+LUCI_DEPENDS:=@(x86_64||aarch64) +curl +opkg +luci-lib-ipkg +tar +libuci-lua +mount-utils +luci-lib-taskd
LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.19)
LUCI_PKGARCH:=all
--- a/luci-app-store/luasrc/view/store/main.htm
+++ b/luci-app-store/luasrc/view/store/main.htm
@@ -26,6 +26,8 @@ <h2 name="content"><%:iStore%>
<a onclick="void(0)" href="https://github.com/linkease/istore/issues/22" target="_blank" style="text-decoration: none;">
v<%=id.version%>
</a>
+ <br/>
+ <span style="font-weight:normal;font-size:70%; color:orangered">更多插件, 请使用 <a href="/cgi-bin/luci/admin/system/package-manager" style="text-decoration: none;">系统->软件包</a> </span>
</h2>
<link rel="stylesheet" href="/luci-static/istore/style.css?v=<%=id.version%>">
<div id="app">
+241
View File
@@ -0,0 +1,241 @@
--- a/luci-app-turboacc/Makefile
+++ b/luci-app-turboacc/Makefile
@@ -7,6 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-turboacc
PKG_RELEASE:=$(COMMITCOUNT)
+PKG_FLAGS:=nonshared
PKG_LICENSE:=GPL-3.0-only
PKG_MAINTAINER:=Lean <coolsnowwolf@gmail.com>
@@ -21,10 +22,7 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_SHORTCUT_FE_DRV
LUCI_TITLE:=LuCI support for Flow Offload / Shortcut-FE
-LUCI_DEPENDS:=+PACKAGE_$(PKG_NAME)_INCLUDE_PDNSD:pdnsd-alt \
- +PACKAGE_$(PKG_NAME)_INCLUDE_BBR_CCA:kmod-tcp-bbr \
- +PACKAGE_$(PKG_NAME)_INCLUDE_DNSFORWARDER:dnsforwarder \
- +PACKAGE_$(PKG_NAME)_INCLUDE_DNSPROXY:dnsproxy \
+LUCI_DEPENDS:=+PACKAGE_$(PKG_NAME)_INCLUDE_BBR_CCA:kmod-tcp-bbr \
+PACKAGE_$(PKG_NAME)_INCLUDE_OFFLOADING:kmod-ipt-offload \
+PACKAGE_$(PKG_NAME)_INCLUDE_SHORTCUT_FE:kmod-fast-classifier \
+PACKAGE_$(PKG_NAME)_INCLUDE_SHORTCUT_FE_CM:kmod-shortcut-fe-cm \
--- a/luci-app-turboacc/luasrc/controller/turboacc.lua
+++ b/luci-app-turboacc/luasrc/controller/turboacc.lua
@@ -13,7 +13,7 @@ function index()
end
local function fastpath_status()
- return luci.sys.call("/etc/init.d/turboacc check_status fastpath") == 0
+ return luci.sys.call("/etc/init.d/turboacc check_status fastpath >/dev/null") == 0
end
local function bbr_status()
--- a/luci-app-turboacc/luasrc/model/cbi/turboacc.lua
+++ b/luci-app-turboacc/luasrc/model/cbi/turboacc.lua
@@ -10,7 +10,7 @@ s = m:section(TypedSection, "turboacc", "")
s.addremove = false
s.anonymous = true
-if nixio.fs.access("/lib/modules/" .. kernel_version .. "/xt_FLOWOFFLOAD.ko") then
+if nixio.fs.access("/lib/modules/" .. kernel_version .. "/xt_FLOWOFFLOAD.ko") or nixio.fs.access("/lib/modules/" .. kernel_version .. "/nft_flow_offload.ko") then
sw_flow = s:option(Flag, "sw_flow", translate("Software flow offloading"))
sw_flow.default = 0
sw_flow.description = translate("Software based offloading for routing/NAT")
@@ -48,36 +48,15 @@ bbr_cca.default = 0
bbr_cca.description = translate("Using BBR CCA can improve TCP network performance effectively")
end
-fullcone_nat = s:option(ListValue, "fullcone_nat", translate("FullCone NAT"))
+if nixio.fs.access("/lib/modules/" .. kernel_version .. "/xt_FULLCONENAT.ko") or nixio.fs.access("/lib/modules/" .. kernel_version .. "/nft_fullcone.ko") then
+fullcone_nat = s:option(Flag, "fullcone_nat", translate("FullCone NAT"))
fullcone_nat.default = 0
-fullcone_nat:value("0", translate("Disable"))
-fullcone_nat:value("1", translate("Compatible Mode"))
-fullcone_nat:value("2", translate("High Performing Mode"))
fullcone_nat.description = translate("Using FullCone NAT can improve gaming performance effectively")
-
-if nixio.fs.access("/usr/sbin/pdnsd") or nixio.fs.access("/usr/bin/dnsforwarder") or nixio.fs.access("/usr/bin/dnsproxy") then
-dns_caching = s:option(Flag, "dns_caching", translate("DNS Caching"))
-dns_caching.default = 0
-dns_caching.rmempty = false
-dns_caching.description = translate("Enable DNS Caching and anti ISP DNS pollution")
-end
-
-dns_caching_mode = s:option(ListValue, "dns_caching_mode", translate("Resolve DNS Mode"), translate("DNS Program"))
-if nixio.fs.access("/usr/sbin/pdnsd") then
-dns_caching_mode:value("1", translate("Using PDNSD to query and cache"))
+if nixio.fs.access("/usr/sbin/nft") then
+fullcone_nat6 = s:option(Flag, "fullcone_nat6", translate("FullCone NAT6"))
+fullcone_nat6.default = 0
+fullcone_nat6.description = translate("Using FullCone NAT6 can improve gaming performance effectively")
end
-if nixio.fs.access("/usr/bin/dnsforwarder") then
-dns_caching_mode:value("2", translate("Using DNSForwarder to query and cache"))
end
-if nixio.fs.access("/usr/bin/dnsproxy") then
-dns_caching_mode:value("3", translate("Using DNSProxy to query and cache"))
-end
-dns_caching_mode.default = 1
-dns_caching_mode:depends("dns_caching", 1)
-
-dns_caching_dns = s:option(Value, "dns_caching_dns", translate("Upsteam DNS Server"))
-dns_caching_dns.default = "114.114.114.114,114.114.115.115,223.5.5.5,223.6.6.6,180.76.76.76,119.29.29.29,119.28.28.28,1.2.4.8,210.2.4.8"
-dns_caching_dns.description = translate("Muitiple DNS server can saperate with ','")
-dns_caching_dns:depends("dns_caching", 1)
return m
--- a/luci-app-turboacc/root/etc/init.d/turboacc
+++ b/luci-app-turboacc/root/etc/init.d/turboacc
@@ -18,11 +18,10 @@ inital_conf(){
config_get "sfe_flow" "config" "sfe_flow" "0"
config_get "bbr_cca" "config" "bbr_cca" "0"
config_get "fullcone_nat" "config" "fullcone_nat" "0"
- config_get "dns_caching" "config" "dns_caching" "0"
- config_get "dns_caching_mode" "config" "dns_caching_mode" "0"
- config_get "dns_caching_dns" "config" "dns_caching_dns"
+ config_get "fullcone_nat6" "config" "fullcone_nat6" "0"
- [ ! -e "/lib/modules/$(uname -r)/xt_FLOWOFFLOAD.ko" ] && { sw_flow="0"; hw_flow="0"; }
+ [[ ! -e "/lib/modules/$(uname -r)/xt_FLOWOFFLOAD.ko" && ! -e "/lib/modules/$(uname -r)/nft_flow_offload.ko" ]] && { sw_flow="0"; hw_flow="0"; }
+ [[ ! -e "/lib/modules/$(uname -r)/xt_FULLCONENAT.ko" && ! -e "/lib/modules/$(uname -r)/nft_fullcone.ko" ]] && { fullcone_nat="0"; fullcone_nat6="0"; }
[ ! -e "/lib/modules/$(uname -r)/tcp_bbr.ko" ] && bbr_cca="0"
}
@@ -264,6 +263,7 @@ start(){
uci set firewall.@defaults[0].flow_offloading="${sw_flow}"
uci set firewall.@defaults[0].flow_offloading_hw="${hw_flow}"
uci set firewall.@defaults[0].fullcone="${fullcone_nat}"
+ uci set firewall.@defaults[0].fullcone6="${fullcone_nat6}"
uci commit firewall
[ "${sw_flow}" -ne "1" ] && [ "${sfe_flow}" -eq "1" ] && {
@@ -280,27 +280,6 @@ start(){
sysctl -w net.ipv4.tcp_congestion_control="cubic"
fi
- if [ "${dns_caching}" -eq "1" ]; then
- stop_dnscache
- sleep 1
-
- rm -f "/var/log/dnscache.file"
- if [ "${dns_caching_mode}" = "1" ]; then
- start_pdnsd
- elif [ "${dns_caching_mode}" = "2" ]; then
- start_dnsforwarder
- elif [ "${dns_caching_mode}" = "3" ]; then
- start_dnsproxy
- fi
-
- change_dns
-
- /usr/share/dnscache/dnscache-while.sh > "/var/log/dnscache.file" 2>&1 &
- else
- revert_dns
- stop_dnscache
- fi
-
if [ "${restart_utils}" = "true" ]; then
echo "DNSMASQ change"
/etc/init.d/dnsmasq restart >"/dev/null" 2>&1
@@ -314,6 +293,7 @@ stop(){
uci set firewall.@defaults[0].flow_offloading="${sw_flow}"
uci set firewall.@defaults[0].flow_offloading_hw="${hw_flow}"
uci set firewall.@defaults[0].fullcone="${fullcone_nat}"
+ uci set firewall.@defaults[0].fullcone6="${fullcone_na6}"
uci commit firewall
[ "${hw_wed}" -eq "0" ] && {
@@ -322,9 +302,6 @@ stop(){
unload_sfe
- stop_dnscache
- revert_dns
-
if [ "${restart_utils}" = "true" ]; then
echo "DNSMASQ revert"
/etc/init.d/dnsmasq restart >"/dev/null" 2>&1
@@ -346,10 +323,10 @@ restart(){
check_status(){
case "$1" in
"fastpath")
- if [ "$(cat "/sys/module/xt_FLOWOFFLOAD/refcnt" 2>"/dev/null" || echo 0)" -ne "0" ]; then
+ if [[ "$(cat "/sys/module/xt_FLOWOFFLOAD/refcnt" 2>"/dev/null" || echo 0)" -ne "0" || "$(cat "/sys/module/nft_flow_offload/refcnt" 2>"/dev/null" || echo 0)" -ne "0" ]]; then
echo -n "Flow Offloading"
exit 0
- elif [ "$(cat "/sys/module/xt_FLOWOFFLOAD/refcnt" 2>"/dev/null")" -eq "0" ] && \
+ elif [[ "$(cat "/sys/module/xt_FLOWOFFLOAD/refcnt" 2>"/dev/null")" -eq "0" || "$(cat "/sys/module/nft_flow_offload/refcnt" 2>"/dev/null")" -eq "0" ]] && \
[ -e /sys/kernel/debug/hnat/hnat_version ]; then
echo -n "MediaTek HWNAT"
exit 0
@@ -370,7 +347,7 @@ check_status(){
fi
;;
"fullconenat")
- if [ -z "$(iptables -t nat -L zone_wan_postrouting | grep -i fullcone)" ]; then
+ if [[ -z "$(iptables -t nat -L zone_wan_postrouting | grep -i fullcone)" && "$(cat "/sys/module/nft_fullcone/refcnt" 2>"/dev/null" || echo 0)" -eq "0" ]]; then
exit 1
else
exit 0
@@ -380,9 +357,6 @@ check_status(){
[ "x$(cat "/proc/sys/net/ipv4/tcp_congestion_control" 2>"/dev/null")" = "xbbr" ] && \
exit 0 || exit 1
;;
- "dns")
- pgrep "dnscache" >"/dev/null" && exit 0 || exit 1
- ;;
*)
exit 2
;;
--- a/luci-app-turboacc/root/etc/config/turboacc
+++ b/luci-app-turboacc/root/etc/config/turboacc
@@ -3,9 +3,7 @@ config turboacc 'config'
option sw_flow '1'
option hw_flow '1'
option sfe_flow '1'
- option fullcone_nat '2'
+ option fullcone_nat '1'
+ option fullcone_nat6 '0'
option hw_wed '0'
option bbr_cca '0'
- option dns_caching '0'
- option dns_caching_mode '1'
- option dns_caching_dns '114.114.114.114,114.114.115.115,223.5.5.5,223.6.6.6,180.76.76.76,119.29.29.29,119.28.28.28,1.2.4.8,210.2.4.8'
--- a/shortcut-fe/shortcut-fe/Makefile
+++ b/shortcut-fe/shortcut-fe/Makefile
@@ -58,7 +58,6 @@ define KernelPackage/shortcut-fe-cm
CONFIG_NF_CONNTRACK_CHAIN_EVENTS=y \
CONFIG_NF_CONNTRACK_EVENTS=y \
CONFIG_XFRM=y
- CONFLICTS:=kmod-shortcut-fe-drv
endef
define KernelPackage/shortcut-fe-cm/Description
--- a/shortcut-fe/fast-classifier/Makefile
+++ b/shortcut-fe/fast-classifier/Makefile
@@ -32,7 +32,6 @@ define KernelPackage/fast-classifier/Default
CONFIG_NF_CONNTRACK_CHAIN_EVENTS=y \
CONFIG_NF_CONNTRACK_MARK=y \
CONFIG_XFRM=y
- CONFLICTS:=kmod-shortcut-fe-drv kmod-shortcut-fe-cm
endef
define KernelPackage/fast-classifier
--- a/luci-app-turboacc/luasrc/view/turboacc/turboacc_status.htm
+++ b/luci-app-turboacc/luasrc/view/turboacc/turboacc_status.htm
@@ -4,7 +4,6 @@
<tr><td width="33%"><%:Flow Offloading%></td><td id="_fastpath_state"><em><%:Collecting data...%></em></td></tr>
<tr><td width="33%"><%:FullCone NAT%></td><td id="_fullconenat_state"><em><%:Collecting data...%></em></td></tr>
<tr><td width="33%"><%:BBR CCA%></td><td id="_bbr_state"><em><%:Collecting data...%></em></td></tr>
- <tr><td width="33%"><%:DNS Caching%></td><td id="_dnscaching_state"><em><%:Collecting data...%></em></td></tr>
</table>
</fieldset>
+11
View File
@@ -0,0 +1,11 @@
--- a/luci-app-upnp/root/usr/share/rpcd/ucode/luci.upnp
+++ b/luci-app-upnp/root/usr/share/rpcd/ucode/luci.upnp
@@ -46,7 +46,7 @@ const methods = {
if (ipt) {
for (let line = ipt.read('line'); length(line); line = ipt.read('line')) {
- let m = match(line, /^([0-9]+)\s+([a-z]+).+dpt:([0-9]+) to:(\S+):([0-9]+)/);
+ let m = match(line, /^([0-9]+).*\s+([a-z]+).+dpt:([0-9]+) to:(\S+):([0-9]+)/);
if (m) {
push(rules, {
+22
View File
@@ -0,0 +1,22 @@
--- a/luci-app-xjay/Makefile
+++ b/luci-app-xjay/Makefile
@@ -15,7 +15,9 @@ define Package/$(PKG_NAME)
SECTION:=Custom
CATEGORY:=Extra packages
TITLE:=LuCI Support for Xray
- DEPENDS:=+luci-base +xray-core +xray-geodata +jsonfilter
+ DEPENDS:=+luci-base +xray-core +xray-geodata +jsonfilter \
+ +PACKAGE_XRAY_INCLUDE_IPTABLES_SUPPORT:kmod-nft-tproxy \
+ +PACKAGE_XRAY_INCLUDE_IPTABLES_SUPPORT:kmod-nft-socket
PKGARCH:=all
endef
@@ -39,7 +41,7 @@ config PACKAGE_XRAY_INCLUDE_NFTABLES_SUPPORT
select PACKAGE_nftables-json
select PACKAGE_kmod-nft-tproxy
select PACKAGE_kmod-nft-socket
- default n
+ default y
endmenu
endef
+21
View File
@@ -0,0 +1,21 @@
--- a/luci-app-xray/Makefile
+++ b/luci-app-xray/Makefile
@@ -144,6 +144,8 @@ endif
$(INSTALL_DATA) ./root/usr/share/xray/protocol/vmess.mjs $(1)/usr/share/xray/protocol/vmess.mjs
$(INSTALL_DATA) ./root/usr/share/xray/protocol/socks.mjs $(1)/usr/share/xray/protocol/socks.mjs
$(INSTALL_DATA) ./root/usr/share/xray/protocol/http.mjs $(1)/usr/share/xray/protocol/http.mjs
+ $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
+ po2lmo ./po/zh-cn/xray.zh-cn.po $(1)/usr/lib/lua/luci/i18n/xray.zh-cn.lmo
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
--- a/luci-app-xray/root/etc/config/xray_core
+++ b/luci-app-xray/root/etc/config/xray_core
@@ -6,5 +6,5 @@ config general
list geoip_direct_code_list_v6 'cn'
list tproxy_ifaces_v4 'br-lan'
list tproxy_ifaces_v6 'br-lan'
- option transparent_proxy_enable '1'
+ option transparent_proxy_enable '0'
option xray_bin '/usr/bin/xray'
@@ -0,0 +1,11 @@
--- a/luci-theme-openmptcprouter/luasrc/view/themes/openmptcprouter/header.htm
+++ b/luci-theme-openmptcprouter/luasrc/view/themes/openmptcprouter/header.htm
@@ -50,7 +50,7 @@
<header>
<div class="fill">
<div class="container">
- <a class="brand" href="#" alt="OpenMPTCProuter"><img src="<%=resource%>/openmptcprouter/images/omr-logo.png" height="30" width="30" alt="OMR" /> OpenMPTCProuter</a>
+ <a class="brand" href="#" alt="OpenMPTCProuter"><img src="<%=resource%>/openmptcprouter/images/omr-logo.png" height="30" width="30" alt="OMR" /> <%=striptags(boardinfo.hostname or "?") %></a>
<ul class="nav" id="topmenu" style="display:none"></ul>
<div id="indicators" class="pull-right"></div>
</div>
+31
View File
@@ -0,0 +1,31 @@
--- a/miniupnpd/files/upnpd.config
+++ b/miniupnpd/files/upnpd.config
@@ -1,5 +1,5 @@
config upnpd config
- option enabled 0
+ option enabled 1
option enable_natpmp 1
option enable_upnp 1
option secure_mode 1
@@ -13,7 +13,7 @@ config upnpd config
option upnp_lease_file /var/run/miniupnpd.leases
option igdv1 1
option ipv6_disable 1
- option use_stun 0
+ option use_stun 1
option stun_host stun.miwifi.com
option stun_port 3478
option force_forwarding 1
config perm_rule
--- a/miniupnpd/Makefile
+++ b/miniupnpd/Makefile
@@ -58,7 +58,6 @@ define Package/miniupnpd-nftables
TITLE+= (nftables)
VARIANT:=nftables
DEFAULT_VARIANT:=1
- CONFLICTS:=miniupnpd-iptables
endef
define Package/miniupnpd/conffiles/Default
+6
View File
@@ -0,0 +1,6 @@
--- a/luci-app-mosdns/root/etc/hotplug.d/iface/99-mosdns
+++ b/luci-app-mosdns/root/etc/hotplug.d/iface/99-mosdns
@@ -1,2 +1,2 @@
#!/bin/sh
-[ "$ACTION" = ifup ] && /etc/init.d/mosdns restart
+[[ "$ACTION" = ifup && "$(uci -q get mosdns.mosdns.enabled)" == 1 ]] && /etc/init.d/mosdns restart
+50
View File
@@ -0,0 +1,50 @@
--- a/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_dev_cfg.htm
+++ b/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_dev_cfg.htm
@@ -472,7 +472,7 @@
}
function getCountryRegionList(mode) {
- XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_country_region_list")%>', 'mode='+mode,
+ XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_country_region_list")%>', { "mode" : mode },
function(x)
{
//console.log(x);
@@ -497,7 +497,7 @@
}
function getChannelList(mode, country_region) {
- XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_channel_list")%>', 'mode='+mode+'&country_region='+country_region,
+ XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_channel_list")%>', { "mode" : mode, "country_region" : country_region },
function(x)
{
console.log(x);
@@ -616,7 +616,7 @@
mode = mode.value*1;
var cr = GetCountryRegion(mode);
- XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_5G_2nd_80Mhz_channel_list")%>', 'ch_cur='+ch+'&country_region='+cr,
+ XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_5G_2nd_80Mhz_channel_list")%>', { "ch_cur" : ch, "country_region" : cr },
function(x)
{
//console.log(x);
@@ -658,7 +658,7 @@
mode = mode.value*1;
var cr = GetCountryRegion(mode);
- XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_HT_ext_channel_list")%>', 'ch_cur='+ch+'&country_region='+cr,
+ XHR.get('<%=luci.dispatcher.build_url("admin", "network", "wifi", "get_HT_ext_channel_list")%>', { "ch_cur" : ch, "country_region" : cr },
function(x)
{
console.log(x);
--- a/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_overview.htm
+++ b/luci-app-mtwifi/luasrc/view/admin_mtk/mtk_wifi_overview.htm
@@ -31,7 +31,7 @@ <h2><a name="content">无线概况</a></h2>
<tbody>
<tr>
<td style="width:34px">
- <img src="/luci-static/resources/icons/wifi_big.png" style="float:left; margin-right:10px" />
+ <img src="/luci-static/resources/icons/wifi.png" style="float:left; margin-right:10px" />
</td>
<td colspan="2" style="text-align:left">
<big><strong title="<%=dev.profile%>"> Generic Mediatek <%=dev.devname%></strong></big>
+12
View File
@@ -0,0 +1,12 @@
--- a/luci-app-nodogsplash/Makefile
+++ b/luci-app-nodogsplash/Makefile
@@ -36,9 +36,6 @@ define Package/luci-app-nodogsplash/install
$(INSTALL_DIR) $(1)/www/luci-static/resources/view/nodogsplash/
$(INSTALL_DATA) ./htdocs/luci-static/resources/view/nodogsplash/*.js $(1)/www/luci-static/resources/view/nodogsplash/
- $(INSTALL_DIR) $(1)/usr/libexec/rpcd/
- $(INSTALL_DATA) ./root/usr/libexec/rpcd/luci.nodogsplash $(1)/usr/libexec/rpcd/
-
$(INSTALL_DIR) $(1)/usr/share/luci/menu.d/
$(INSTALL_DATA) ./root/usr/share/luci/menu.d/luci-app-nodogsplash.json $(1)/usr/share/luci/menu.d/
+14
View File
@@ -0,0 +1,14 @@
-- /dev/null
+++ b/luci-app-oaf/root/usr/share/rpcd/acl.d/luci-app-oaf.json
@@ -0,0 +1,11 @@
+{
+ "luci-app-oaf": {
+ "description": "Grant UCI access for luci-app-oaf",
+ "read": {
+ "uci": [ "appfilter" ]
+ },
+ "write": {
+ "uci": [ "appfilter" ]
+ }
+ }
+}
+219
View File
@@ -0,0 +1,219 @@
--- a/luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js
+++ b/luci-app-package-manager/htdocs/luci-static/resources/view/package-manager.js
@@ -184,7 +184,7 @@ function parseList(s, dest)
val = RegExp.$2.trim();
}
else if (pkg) {
- dest.pkgs[pkg.name] = pkg;
+ dest.pkgs[pkg.name] = dest.pkgs[pkg.name] ? dest.pkgs[pkg.name] : pkg;
var provides = dest.providers[pkg.name] ? [] : [ pkg.name ];
@@ -248,7 +248,7 @@ function display(pattern)
var avail = packages.available.pkgs[name],
inst = packages.installed.pkgs[name];
- if (!inst || !inst.installed)
+ if (!inst || !inst.installed || pkg.name.includes('kmod-') || pkg.name.includes('busybox') || pkg.name.includes('base-files'))
continue;
if (!avail || compareVersion(avail.version, pkg.version) <= 0)
@@ -288,7 +288,7 @@ function display(pattern)
'data-action': 'install',
'click': handleInstall
}, _('Install…'));
- else if (inst.installed && inst.version != pkg.version)
+ else if (inst.installed && compareVersion(pkg.version, inst.version) > 0)
btn = E('div', {
'class': 'btn cbi-button-positive',
'data-package': name,
@@ -790,7 +790,8 @@ function handleInstall(ev)
'id': 'overwrite-cb',
'type': 'checkbox',
'name': 'overwrite',
- 'disabled': isReadonlyView
+ 'disabled': isReadonlyView,
+ 'checked': true
}), ' ',
E('label', { 'for': 'overwrite-cb' }), ' ',
_('Allow overwriting conflicting package files')
@@ -1029,6 +1030,8 @@ function handlePkg(ev)
if (res.pkmcmd)
dlg.appendChild(E('pre', [ res.pkmcmd ]));
+ var showModalFlag = (cmd !== 'update' && pkg) || res.stderr;
+ if (showModalFlag) {
if (res.stdout)
dlg.appendChild(E('pre', [ res.stdout ]));
@@ -1056,6 +1059,10 @@ function handlePkg(ev)
resolveFn(res);
}, this, res)
}, _('Dismiss'))));
+ } else {
+ ui.hideModal();
+ updateLists();
+ }
}).catch(function(err) {
ui.addNotification(null, E('p', _('Unable to execute <em>%s %s</em> command: %s').format(L.hasSystemFeature('apk') ? 'apk' : 'opkg', cmd, err)));
ui.hideModal();
@@ -1150,6 +1157,42 @@ return view.extend({
},
render: function(listData) {
+ var checkUpdateNeeded = function() {
+ return Promise.all([
+ L.resolveDefault(fs.stat('/tmp/opkg-lists'), null),
+ L.resolveDefault(fs.list('/tmp/opkg-lists'), []),
+ L.resolveDefault(fs.read('/tmp/resolv.conf.d/resolv.conf.auto'), '')
+ ]).then(function(results) {
+ var stat = results[0];
+ var files = results[1];
+ var resolvContent = results[2];
+
+ var isEmpty = files.length === 0;
+ var needUpdate = false;
+
+ if (isEmpty) {
+ needUpdate = true;
+ } else if (stat) {
+ var currentDate = new Date();
+ var lastUpdateDate = new Date(stat.mtime * 1000); // Convert seconds to milliseconds
+ // 检查是否在今天的零点之后更新过
+ var today = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
+ needUpdate = lastUpdateDate < today;
+ } else {
+ needUpdate = true;
+ }
+
+ // 检查 resolv.conf.auto 文件内容
+ var hasResolvContent = resolvContent && resolvContent.trim().length > 0;
+
+ // 只有当需要更新且 resolv.conf.auto 不为空时,才返回 true
+ return needUpdate && hasResolvContent;
+ }).catch(function(error) {
+ console.error('Error checking update status:', error);
+ return false; // 如果出错,不执行更新
+ });
+ };
+
var query = decodeURIComponent(L.toArray(location.search.match(/\bquery=([^=]+)\b/))[1] || '');
var view = E([], [
@@ -1191,6 +1234,7 @@ return view.extend({
E('label', {}, _('Actions') + ':'), ' ',
E('span', { 'class': 'control-group' }, [
E('button', { 'class': 'btn cbi-button-positive', 'data-command': 'update', 'click': handlePkg, 'disabled': isReadonlyView }, [ _('Update lists…') ]), ' ',
+ E('button', { 'class': 'btn cbi-button-negative', 'data-command': 'upgradeall', 'click': handlePkg, 'disabled': isReadonlyView }, [ _('Upgrade all…') ]), ' ',
E('button', { 'class': 'btn cbi-button-action', 'click': handleUpload, 'disabled': isReadonlyView }, [ _('Upload Package…') ]), ' ',
E('button', { 'class': 'btn cbi-button-neutral', 'click': handleConfig }, [ _('Configure %s').format(L.hasSystemFeature('apk') ? 'apk' : 'opkg') ])
])
@@ -1276,7 +1320,17 @@ return view.extend({
]);
requestAnimationFrame(function() {
- updateLists(listData)
+ updateLists(listData);
+ checkUpdateNeeded().then(function(needUpdate) {
+ if (needUpdate) {
+ setTimeout(function() {
+ var updateButton = document.querySelector('button[data-command="update"]');
+ if (updateButton) {
+ updateButton.click();
+ }
+ }, 10)
+ }
+ });
});
return view;
--- a/luci-app-package-manager/root/usr/libexec/package-manager-call
+++ b/luci-app-package-manager/root/usr/libexec/package-manager-call
@@ -27,7 +27,7 @@ case "$action" in
find "${lists_dir:-/usr/lib/opkg/lists}" -type f '!' -name '*.sig' | xargs -r gzip -cd
fi
;;
- install|update|upgrade|remove)
+ install|update|upgrade|upgradeall|remove)
(
cmd="$ipkg_bin"
@@ -89,10 +89,45 @@ case "$action" in
if flock -x 200; then
pkmcmd="$cmd $action $@"
- $cmd $action "$@" </dev/null >/tmp/ipkg.out 2>/tmp/ipkg.err
- code=$?
- stdout=$(cat /tmp/ipkg.out)
+ if [ $action == "upgradeall" ]; then
+ $cmd update </dev/null >/tmp/ipkg.out 2>/tmp/ipkg.err
+ code=$?
+ if [ $code == 0 ]; then
+ . /etc/profile.d/opkg.sh
+ if [[ "$(cat `opkg export au`)" ]] && lock -n /var/lock/opkg-upgrade; then
+ opkg upgr </dev/null >>/tmp/ipkg.out 2>>/tmp/ipkg.err
+ code=$?
+ lock -u /var/lock/opkg-upgrade
+ else
+ echo "🎉 所有软件包已是最新~" >>/tmp/ipkg.out
+ code=0
+ fi
+ fi
+ else
+ $cmd $action "$@" </dev/null >/tmp/ipkg.out 2>/tmp/ipkg.err
+ code=$?
+ fi
+ pkgn="$(echo $@ | cut -d - -f 3-)"
+ case "$action" in
+ install|upgrade)
+ if [ "$(opkg list-installed | cut -f 1 -d ' ' | grep -w $@)" ]; then
+ rm -f /tmp/ipkg.err
+ ([ -f /etc/profile.d/opkg.sh ] && . /etc/profile.d/opkg.sh && opkg save) &
+ fi
+ ;;
+ remove)
+ if [ ! "$(opkg list-installed | cut -f 1 -d ' ' | grep -w $@)" ]; then
+ rm -f /tmp/ipkg.err
+ ([ -f /etc/profile.d/opkg.sh ] && . /etc/profile.d/opkg.sh && opkg save) &
+ fi
+ ;;
+ esac
stderr=$(cat /tmp/ipkg.err)
+ [ -n "$stderr" ] || {
+ echo "🎉 已完成, 请关闭本窗口~" >>/tmp/ipkg.out
+ code=0
+ }
+ stdout=$(cat /tmp/ipkg.out)
else
code=255
stderr="Failed to acquire lock"
@@ -110,7 +145,7 @@ case "$action" in
;;
*)
echo "Usage: $0 {list-installed|list-available|update}" >&2
- echo " $0 {install|upgrade|remove} pkg[ pkg...]" >&2
+ echo " $0 {install|upgrade|upgradeall|remove} pkg[ pkg...]" >&2
exit 1
;;
esac
--- a/luci-app-package-manager/root/usr/share/rpcd/acl.d/luci-app-package-manager.json
+++ b/luci-app-package-manager/root/usr/share/rpcd/acl.d/luci-app-package-manager.json
@@ -8,6 +8,7 @@
"/usr/libexec/package-manager-call list-available": [ "exec" ],
"/etc/opkg.conf": [ "read" ],
"/etc/opkg/*.conf": [ "read" ],
+ "/tmp/resolv.conf.d/resolv.conf.auto": [ "read" ],
"/etc/apk/repositories": [ "read" ],
"/etc/apk/repositories.d/distfeeds.list": [ "read" ],
"/etc/apk/repositories.d/customfeeds.list": [ "read" ]
@@ -24,6 +25,7 @@
"/usr/libexec/package-manager-call update": [ "exec" ],
"/usr/libexec/package-manager-call upgrade": [ "exec" ],
"/usr/libexec/package-manager-call upgrade *": [ "exec" ],
+ "/usr/libexec/package-manager-call upgradeall": [ "exec" ],
"/etc/opkg.conf": [ "write" ],
"/etc/opkg/*.conf": [ "write" ],
"/etc/apk/repositories": [ "write" ],
+9
View File
@@ -0,0 +1,9 @@
--- a/p910nd/Makefile
+++ b/p910nd/Makefile
@@ -28,6 +28,7 @@ define Package/p910nd
SUBMENU:=Printing
TITLE:=A small non-spooling printer server
URL:=http://p910nd.sourceforge.net
+ DEPENDS:=+kmod-usb-printer
USERID:=p910nd=393:lp=7
endef
+11
View File
@@ -0,0 +1,11 @@
--- a/pgyvpn/Makefile
+++ b/pgyvpn/Makefile
@@ -78,7 +78,7 @@ define Package/pgyvpn/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/share/pgyvpn
- $(CP) $(PKG_BUILD_DIR)/{pgyvpn_oraysl,pgyvpnsvr} $(1)/usr/sbin
+ $(CP) $(PKG_BUILD_DIR)/pgyvpn_oraysl $(1)/usr/sbin
$(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d
$(INSTALL_CONF) ./files/etc/config/* $(1)/etc/config
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/* $(1)/etc/hotplug.d/iface
+19
View File
@@ -0,0 +1,19 @@
--- a/qt6base/Makefile
+++ b/qt6base/Makefile
@@ -38,6 +38,16 @@ include $(INCLUDE_DIR)/cmake.mk
STRIP:=$(TARGET_CROSS)strip $(call qstrip,$(CONFIG_STRIP_ARGS))
+define Host/Prepare
+ $(call Host/Prepare/Default)
+ $(SED) 's/^qt_internal_check_if_path_has_symlinks/# &/' $(HOST_BUILD_DIR)/CMakeLists.txt
+endef
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ $(SED) 's/^qt_internal_check_if_path_has_symlinks/# &/' $(PKG_BUILD_DIR)/CMakeLists.txt
+endef
+
define Package/libQt6/Default
SECTION:=libs
CATEGORY:=Libraries
+23
View File
@@ -0,0 +1,23 @@
--- a/luci-app-quickstart/Makefile
+++ b/luci-app-quickstart/Makefile
@@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for quickstart
-LUCI_DEPENDS:=+quickstart +luci-app-store
+LUCI_DEPENDS:=+quickstart +luci-app-ttyd +luci-i18n-ttyd-zh-cn
LUCI_PKGARCH:=all
# PKG_RELEASE MUST be empty for luci.mk
--- a/luci-app-quickstart/luasrc/controller/quickstart.lua
+++ b/luci-app-quickstart/luasrc/controller/quickstart.lua
@@ -5,7 +5,7 @@ module("luci.controller.quickstart", package.seeall)
function index()
if luci.sys.call("pgrep quickstart >/dev/null") == 0 then
local uci = require "luci.model.uci".cursor()
- entry({"admin", "quickstart"}, template("quickstart/home"), _("QuickStart"), 1).leaf = true
+ entry({"admin", "quickstart"}, template("quickstart/home")).leaf = true
entry({"admin", "network_guide"}, call("networkguide_index"), _("NetworkGuide"), 2)
entry({"admin", "network_guide", "pages"}, call("quickstart_index", {index={"admin", "network_guide", "pages"}})).leaf = true
if uci:get("quickstart", "main", "wifi_menu") == "1" then
+49
View File
@@ -0,0 +1,49 @@
--- a/routergo/Makefile
+++ b/routergo/Makefile
@@ -27,7 +27,7 @@ define Package/$(PKG_NAME)
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=RouterGo
- DEPENDS:=@(x86_64||aarch64||arm) +docker
+ DEPENDS:=@(x86_64||aarch64||arm) +docker +luci-app-linkease
URL:=https://github.com/Carseason/openwrt-packages
endef
--- a/luci-app-routerdog/luasrc/controller/routerdog.lua
+++ b/luci-app-routerdog/luasrc/controller/routerdog.lua
@@ -2,7 +2,7 @@ module("luci.controller.routerdog", package.seeall)
function index()
if nixio.fs.access("/usr/lib/lua/luci/view/routerdog/main.htm") then
- entry({"admin", "routerdog"}, template("routerdog/index"), _("RouterDog"), 1).leaf = true
+ entry({"admin", "routerdog"}, template("routerdog/index")).leaf = true
end
entry({"admin", "routerdog_api"}, call("redirect_index"))
entry({"admin", "routerdog_api", "status"}, call("routerdog_api_status"))
--- a/luci-app-routerdog/root/usr/share/luci/menu.d/luci-app-routerdog.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "admin/routerdog": {
- "title": "RouterDog",
- "order": -1,
- "action": {
- "type": "template",
- "path": "routerdog/index"
- }
- }
-}
\ No newline at end of file
--- a/luci-app-routerdog/root/etc/uci-defaults/50_luci-routerdog
+++ b/luci-app-routerdog/root/etc/uci-defaults/50_luci-routerdog
@@ -1,4 +1,7 @@
#!/bin/sh
+uci set wizard.default.landing_page='routerdog'
+uci commit wizard
+
rm -f /tmp/luci-indexcache
exit 0
+13
View File
@@ -0,0 +1,13 @@
--- a/luci-app-samba4/htdocs/luci-static/resources/view/samba4.js
+++ b/luci-app-samba4/htdocs/luci-static/resources/view/samba4.js
@@ -113,6 +113,10 @@ return view.extend({
o.rmempty = false;
s.option(form.Flag, 'force_root', _('Force Root'));
+ o.enabled = 'yes';
+ o.disabled = 'no';
+ o.default = 'yes';
+ o.rmempty = false;
o = s.option(form.Value, 'users', _('Allowed users'));
o.rmempty = true;
+238
View File
@@ -0,0 +1,238 @@
--- a/luci-app-ssr-plus/Makefile
+++ b/luci-app-ssr-plus/Makefile
@@ -118,7 +118,7 @@ endchoice
choice
prompt "V2ray-core Selection"
- default PACKAGE_$(PKG_NAME)_INCLUDE_Xray if aarch64||arm||i386||x86_64
+ default PACKAGE_$(PKG_NAME)_INCLUDE_Xray
default PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY
config PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY
--- a/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua
+++ b/luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua
@@ -28,11 +28,67 @@ function index()
entry({"admin", "services", "shadowsocksr", "reset"}, call("act_reset"))
entry({"admin", "services", "shadowsocksr", "restart"}, call("act_restart"))
entry({"admin", "services", "shadowsocksr", "delete"}, call("act_delete"))
+ entry({'admin', 'services', "shadowsocksr", 'ip'}, call('check_ip')) -- 获取ip情况
--[[Backup]]
entry({"admin", "services", "shadowsocksr", "backup"}, call("create_backup")).leaf = true
end
+function check_site(host, port)
+ local nixio = require "nixio"
+ local socket = nixio.socket("inet", "stream")
+ socket:setopt("socket", "rcvtimeo", 2)
+ socket:setopt("socket", "sndtimeo", 2)
+ local ret = socket:connect(host, port)
+ socket:close()
+ return ret
+end
+
+function get_ip_geo_info()
+ local result = luci.sys.exec('curl --retry 3 -m 10 -LfsA "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36" http://ip-api.com/json/')
+ local json = require "luci.jsonc"
+ local info = json.parse(result)
+
+ return {
+ flag = string.lower(info.countryCode) or "un",
+ country = get_country_name(info.countryCode) or "Unknown",
+ ip = info.query,
+ isp = info.isp
+ }
+end
+
+function get_country_name(countryCode)
+ local country_names = {
+ US = "美国", CN = "中国", JP = "日本", GB = "英国", DE = "德国",
+ FR = "法国", BR = "巴西", IT = "意大利", RU = "俄罗斯", CA = "加拿大",
+ KR = "韩国", ES = "西班牙", AU = "澳大利亚", MX = "墨西哥", ID = "印度尼西亚",
+ NL = "荷兰", TR = "土耳其", CH = "瑞士", SA = "沙特阿拉伯", SE = "瑞典",
+ PL = "波兰", BE = "比利时", AR = "阿根廷", NO = "挪威", AT = "奥地利",
+ TW = "台湾", ZA = "南非", TH = "泰国", DK = "丹麦", MY = "马来西亚",
+ PH = "菲律宾", SG = "新加坡", IE = "爱尔兰", HK = "香港", FI = "芬兰",
+ CL = "智利", PT = "葡萄牙", GR = "希腊", IL = "以色列", NZ = "新西兰",
+ CZ = "捷克", RO = "罗马尼亚", VN = "越南", UA = "乌克兰", HU = "匈牙利",
+ AE = "阿联酋", CO = "哥伦比亚", IN = "印度", EG = "埃及", PE = "秘鲁", TW = "台湾"
+ }
+ return country_names[countryCode]
+end
+
+function check_ip()
+ local e = {}
+ local port = 80
+ local geo_info = get_ip_geo_info(ip)
+ e.ip = geo_info.ip
+ e.flag = geo_info.flag
+ e.country = geo_info.country
+ e.isp = geo_info.isp
+ e.baidu = check_site('www.baidu.com', port)
+ e.taobao = check_site('www.taobao.com', port)
+ e.google = check_site('www.google.com', port)
+ e.youtube = check_site('www.youtube.com', port)
+ luci.http.prepare_content('application/json')
+ luci.http.write_json(e)
+end
+
function subscribe()
luci.sys.call("/usr/bin/lua /usr/share/shadowsocksr/subscribe.lua >>/var/log/ssrplus.log")
luci.http.prepare_content("application/json")
--- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua
+++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua
@@ -168,5 +168,6 @@ if is_finded("chinadns-ng") then
end
end
+m:section(SimpleSection).template = "shadowsocksr/status_bottom"
return m
diff --git a/luci-app-ssr-plus/luasrc/view/shadowsocksr/status_bottom.htm b/luci-app-passwall/luasrc/view/shadowsocksr/status_bottom.htm
new file mode 100644
index 000000000000..a00fff9c79b3
--- /dev/null
+++ b/luci-app-ssr-plus/luasrc/view/shadowsocksr/status_bottom.htm
@@ -0,0 +1,128 @@
+<style>
+.pure-img {
+ max-height: 100%;
+ width: auto;
+}
+.flag .pure-img {
+ max-height: none;
+ margin-top: -0.34rem;
+}
+.status-bar {
+ position: fixed;
+ bottom: 0;
+ right: 0;
+ box-shadow: 0 0 2rem 0 rgba(136, 152, 170, .3);
+ color: #525f7f;
+ background: #fff;
+ z-index: 5;
+ box-sizing: border-box;
+}
+
+.status-bar .inner {
+ margin: 0.5em;
+}
+
+.status-bar .inner .flag {
+ height: 2.6em;
+ display: block;
+ float: left;
+ margin-right: 1em;
+}
+
+.status-bar .inner .status-info {
+ font-weight: bold;
+}
+
+.status-bar .icon-con {
+ height: 2.6em;
+ text-align: right;
+}
+
+#cbi-passwall+.cbi-page-actions.control-group.fixed {
+ bottom: 3.3rem;
+}
+
+footer{
+display:block !important;
+}
+
+@media screen and (max-width: 700px) {
+.status-bar .icon-con {
+ height: 2.5em;
+}
+}
+</style>
+<div class="status-bar">
+ <div class="inner">
+ <div class="pure-g">
+ <div class="pure-u-1-2">
+ <span class="flag"><img src="/luci-static/passwall/flags/loading.svg" class="pure-img"></span> <span
+ class="status-info">获取中...</span>
+ </div>
+ <div class="pure-u-1-2">
+ <div class="icon-con">
+ <img src="/luci-static/passwall/img/site_icon1_01.png" class="pure-img i1">
+ <img src="/luci-static/passwall/img/site_icon1_02.png" class="pure-img i2">
+ <img src="/luci-static/passwall/img/site_icon1_03.png" class="pure-img i3">
+ <img src="/luci-static/passwall/img/site_icon1_04.png" class="pure-img i4">
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<script>
+const _ASSETS = '/luci-static/passwall/';
+const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[passwall]], [[ip]])%>';
+
+let wW = window.innerWidth;
+
+function resize() {
+ wW = window.innerWidth;
+ let lw = document.querySelector(".main-left")?.offsetWidth ?? 5;
+ let statusBar = document.querySelector(".status-bar");
+ statusBar.style.width = (wW - lw) + 'px';
+ let flagElement = statusBar.querySelector(".flag");
+ flagElement.style.width = (flagElement.offsetHeight / 3 * 4) + 'px';
+
+ document.querySelectorAll(".flag-icon").forEach(function(el) {
+ if (el.offsetHeight < 60) {
+ el.parentElement.style.height = '60px';
+ el.style.width = '60px';
+ } else {
+ el.style.width = el.offsetHeight + 'px';
+ }
+ });
+}
+
+function write_status(data) {
+ document.querySelector(".flag img").src = _ASSETS + "flags/" + data.flag + ".svg";
+ document.querySelector(".status-info").innerHTML = data.ip + "<br>" + data.country + "&nbsp;" + data.isp;
+ document.querySelector(".i1").src = data.baidu ? _ASSETS + "img/site_icon_01.png" : _ASSETS + "img/site_icon1_01.png";
+ document.querySelector(".i2").src = data.taobao ? _ASSETS + "img/site_icon_02.png" : _ASSETS + "img/site_icon1_02.png";
+ document.querySelector(".i3").src = data.google ? _ASSETS + "img/site_icon_03.png" : _ASSETS + "img/site_icon1_03.png";
+ document.querySelector(".i4").src = data.youtube ? _ASSETS + "img/site_icon_04.png" : _ASSETS + "img/site_icon1_04.png";
+ setTimeout(function() {
+ let event = new Event('iploaded');
+ document.body.dispatchEvent(event);
+ }, 200);
+}
+
+XHR.poll(5, CHECK_IP_URL, null,
+ function (x, data) {
+ write_status(data);
+ }
+ );
+
+document.addEventListener('DOMContentLoaded', function() {
+ setTimeout("resize()",100)
+ fetch(CHECK_IP_URL)
+ .then(response => response.json())
+ .then(data => {
+ write_status(data);
+ })
+ .catch(error => console.error('Error:', error));
+});
+
+window.addEventListener('resize', resize);
+</script>
--- a/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus
+++ b/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus
@@ -43,5 +43,8 @@ if [ -s "/etc/uwsgi/vassals/luci-webui.ini" ];then
/etc/init.d/uwsgi restart
fi
+grep -q ip-api.com /etc/ssrplus/black.list ||
+ sed -i '$a ip-api.com' /etc/ssrplus/black.list
+
rm -f /tmp/luci-indexcache /tmp/luci-indexcache.*
rm -rf /tmp/luci-modulecache/
+10
View File
@@ -0,0 +1,10 @@
--- a/luci-app-syncthing/root/etc/uci-defaults/luci-syncthing
+++ b/luci-app-syncthing/root/etc/uci-defaults/luci-syncthing
@@ -1,6 +1,7 @@
#!/bin/sh
touch /etc/config/syncthing
+sed -i "s/127.0.0.1:8384/0.0.0.0:8384/" /etc/config/syncthing
uci -q batch <<-EOF >/dev/null
delete ucitrack.@syncthing[-1]
add ucitrack syncthing
+35
View File
@@ -0,0 +1,35 @@
--- a/luci-app-syscontrol/root/usr/bin/ram_release.sh
+++ b/luci-app-syscontrol/root/usr/bin/ram_release.sh
@@ -15,13 +15,13 @@
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
-export TZ='Asia/Jakarta'
+export TZ='Asia/Shanghai'
LOG_FILE="/var/log/ram_release.log"
PID_FILE="/var/run/ram_release.pid"
log_message() {
- local timestamp=$(TZ='Asia/Jakarta' date +"%Y-%m-%d %H:%M:%S %Z")
+ local timestamp=$(TZ='Asia/Shanghai' date +"%Y-%m-%d %H:%M:%S %Z")
echo "$timestamp: $1" >> "$LOG_FILE"
logger -t "RAM Release" -- "$1"
}
@@ -43,7 +43,7 @@ update_cron() {
cron_days=$(echo $days | sed 's/mon/1/g; s/tue/2/g; s/wed/3/g; s/thu/4/g; s/fri/5/g; s/sat/6/g; s/sun/0/g')
hour=$(echo $time | cut -d: -f1)
minute=$(echo $time | cut -d: -f2)
- cron_entry="$minute $hour * * $cron_days TZ='Asia/Jakarta' /usr/bin/ram_release.sh release"
+ cron_entry="$minute $hour * * $cron_days TZ='Asia/Shanghai' /usr/bin/ram_release.sh release"
echo "$cron_entry" >> /etc/crontabs/root
log_message "Cron job updated: $cron_entry"
else
--- a/luci-app-syscontrol/root/etc/config/77_syscontrol
+++ b/luci-app-syscontrol/root/etc/config/77_syscontrol
@@ -1,4 +1,4 @@
config ram_release 'schedule'
- option enabled '1'
+ option enabled '0'
option time '03:00'
+23
View File
@@ -0,0 +1,23 @@
--- a/luci-app-tencentddns/files/luci/i18n/tencentddns.zh-cn.po
+++ b/luci-app-tencentddns/files/luci/i18n/tencentddns.zh-cn.po
@@ -23,16 +23,16 @@ msgid "Base"
msgstr "基本设置"
msgid "Key ID"
-msgstr "密钥ID"
+msgstr "Token ID"
msgid "Key ID Mean"
-msgstr "DNSPod后台密钥管理中的ID"
+msgstr "DNSPod Token中的Token ID"
msgid "Key Token"
-msgstr "密钥Token"
+msgstr "Token值"
msgid "Key Token Mean"
-msgstr "DNSPod后台密钥管理中的Token"
+msgstr "DNSPod Token中的Token值"
msgid "WAN-IP Source"
+80
View File
@@ -0,0 +1,80 @@
--- a/luci-app-timedreboot/luasrc/model/cbi/timedreboot.lua
+++ b/luci-app-timedreboot/luasrc/model/cbi/timedreboot.lua
@@ -39,9 +39,4 @@ once=s:option(Flag,"once",translate("Only once"))
once.rmempty = false
once.default=0
-local apply =luci.http.formvalue("cbi.apply")
-if apply then
- luci.sys.call("/etc/init.d/timedreboot restart")
-end
-
return m
--- a/luci-app-timedreboot/po/zh_Hans
+++ /dev/null
@@ -1 +0,0 @@
-zh-cn
\ No newline at end of file
--- a/luci-app-timedreboot/root/etc/init.d/timedreboot
+++ b/luci-app-timedreboot/root/etc/init.d/timedreboot
@@ -1,6 +1,11 @@
#!/bin/sh /etc/rc.common
+
START=50
+boot() {
+ exit 0;
+}
+
run_reboot()
{
if [ -e "/usr/bin/dorboot" ]; then
--- /dev/null
+++ b/luci-app-timedreboot/root/etc/uci-defaults/luci-timedreboot
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+[ ! -f "/usr/share/ucitrack/luci-app-timedreboot.json" ] && {
+ cat > /usr/share/ucitrack/luci-app-timedreboot.json << EEOF
+{
+ "config": "timedreboot",
+ "init": "timedreboot"
+}
+EEOF
+}
+
+rm -f /tmp/luci-indexcache
+exit 0
\ No newline at end of file
--- a/luci-app-timedreboot/root/usr/bin/dorboot
+++ b/luci-app-timedreboot/root/usr/bin/dorboot
@@ -3,8 +3,6 @@
# [K] (C)2020
# http://github.com/kongfl888/luci-app-timedreboot
-sleep 5s
-
if [ ! -e "/etc/config/timedreboot" ]; then
echo "timedreboot cfg is not exit" >> /tmp/timedreboot.log
logger "timedreboot cfg is not exit. Stop!"
@@ -60,7 +58,6 @@ rebootsys() {
fi
sleep 5s
touch /etc/banner
- sleep 5s
reboot
}
@@ -123,8 +120,6 @@ if [ "${1}" = "0" -o "${1}" = "1" ]; then
rebootsys
else
justcfg
- sleep 10s
- justcfg
fi
exit 0
+23
View File
@@ -0,0 +1,23 @@
--- a/luci-app-vssr/root/usr/share/vssr/subscribe.lua
+++ b/luci-app-vssr/root/usr/share/vssr/subscribe.lua
@@ -369,7 +369,7 @@ end
local function wget(url)
local stdout =
luci.sys.exec(
- 'wget-ssl -q --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" --no-check-certificate -t 3 -T 10 -O- "' .. url .. '"'
+ 'wget -q --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" --no-check-certificate -t 3 -T 10 -O- "' .. url .. '"'
)
return trim(stdout)
end
--- a/luci-app-vssr/luasrc/view/vssr/tblsection.htm
+++ b/luci-app-vssr/luasrc/view/vssr/tblsection.htm
@@ -7,7 +7,7 @@
<button class="cbi-button cbi-button-check ">
<%:Ping All Servers%>
</button><span class="panel-title">总计
- <%- print(self.des)-%>个节点
+ <%=self.des%>个节点
</span>
<div style="clear:both;"></div>
</div>
+43
View File
@@ -0,0 +1,43 @@
--- a/watchcat/files/watchcat.init
+++ b/watchcat/files/watchcat.init
@@ -32,6 +32,8 @@ time_to_seconds() {
config_watchcat() {
# Read config
+ config_get_bool enabled "$1" enabled 0
+ [ "$enabled" = "1" ] || { echo "Watcat $1 not enabled."; return 1; }
config_get period "$1" period "120"
config_get mode "$1" mode "ping_reboot"
config_get pinghosts "$1" pinghosts "8.8.8.8"
--- a/watchcat/files/watchcat.config
+++ b/watchcat/files/watchcat.config
@@ -1,5 +1,5 @@
config watchcat
option period '6h'
option mode 'ping_reboot'
- option pinghosts '8.8.8.8'
+ option pinghosts '223.5.5.5'
option forcedelay '30'
--- a/luci-app-watchcat/htdocs/luci-static/resources/view/watchcat.js
+++ b/luci-app-watchcat/htdocs/luci-static/resources/view/watchcat.js
@@ -18,6 +18,9 @@ return view.extend({
s.tab('general', _('General Settings'));
+ o = s.taboption('general', form.Flag, 'enabled', _('Enabled'));
+ o.rmempty = false;
+
o = s.taboption('general', form.ListValue, 'mode',
_('Mode'),
_("Ping Reboot: Reboot this device if a ping to a specified host fails for a specified duration of time. <br /> \
@@ -51,7 +51,7 @@ return view.extend({
o = s.taboption('general', form.DynamicList, 'pinghosts', _('Hosts To Check'), _(`IP addresses or hostnames to ping.`));
o.datatype = 'host';
- o.default = ['8.8.8.8', '1.1.1.1'];
+ o.default = ['223.5.5.5', '8.8.8.8', '1.1.1.1'];
o.depends({ mode: "ping_reboot" });
o.depends({ mode: "restart_iface" });
o.depends({ mode: "run_script" });
+11
View File
@@ -0,0 +1,11 @@
--- a/webd/Makefile
+++ b/webd/Makefile
@@ -78,7 +78,7 @@ ifeq ($(ARCH),aarch64)
endif
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(TARGET_ARCH)-openwrt-linux-$(TARGET_BOARD).tar.gz
-PKG_SOURCE_URL:=https://webd.cf/webd/$(PKG_VERSION)/
+PKG_SOURCE_URL:=https://webd.cf/webd/webd_dl/$(PKG_VERSION)/
PKG_HASH:=skip
UNTAR_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+11
View File
@@ -0,0 +1,11 @@
--- a/wifidog-wiwiz/Makefile
+++ b/wifidog-wiwiz/Makefile
@@ -20,7 +20,7 @@ define Package/wifidog-wiwiz
SUBMENU:=Portal
SECTION:=net
CATEGORY:=Wiwiz/PinPinWiFi
- DEPENDS:=+iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat-extra +libpthread +curl +jsonfilter
+ DEPENDS:=+luci-app-eqos +dcc2-wiwiz-nossl +iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat-extra +libpthread +curl +jsonfilter
TITLE:=wifidog-wiwiz
URL:=http://www.wiwiz.com
MENU:=1
+11
View File
@@ -0,0 +1,11 @@
--- a/wifidog-wiwiz/Makefile
+++ b/wifidog-wiwiz/Makefile
@@ -21,7 +21,7 @@ define Package/wifidog-wiwiz
SUBMENU:=Portal
SECTION:=net
CATEGORY:=Wiwiz/PinPinWiFi
- DEPENDS:=+iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat-extra +libpthread +curl
+ DEPENDS:=+dcc2-wiwiz-nossl +luci-app-eqos +iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat-extra +iptables-mod-conntrack-extra +iptables-mod-iface +iptables-mod-ipmark +libpthread +curl
TITLE:=wifidog-wiwiz
URL:=http://www.wiwiz.com
endef
+531
View File
@@ -0,0 +1,531 @@
#
# This is free software, lisence use MIT.
#
# <https://github.com/kiddin9/kwrt-packages>
#
name: Merge-upstream
on:
push:
paths:
- '.github/workflows/upstream.yml'
- '.gitignore'
- '.github/diy/**'
schedule:
- cron: 0 */12 * * *
workflow_dispatch:
inputs:
ssh:
description: 'ssh'
required: false
default: 'true'
watch:
types: started
repository_dispatch:
jobs:
merge:
if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id || github.event.sender.id == '119362912'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0
- uses: de-vri-es/setup-git-credentials@v2
with:
credentials: https://kiddin9:${{ secrets.TOKEN_KIDDIN9 }}@github.com/
- name: Set git identity
run : |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
- name: Syn upstream
run: |
shopt -s extglob
set +e
git rm -r --cache * >/dev/null 2>&1 &
rm -rf `find ./* -maxdepth 0 -type d ! -name ".github/diy"` >/dev/null 2>&1
function git_clone() {
git clone --depth 1 $1 $2
if [ "$?" != 0 ]; then
echo "error on $1"
pid="$( ps -q $$ )"
kill $pid
fi
}
function git_sparse_clone() {
trap 'rm -rf "$tmpdir"' EXIT
branch="$1" curl="$2" && shift 2
rootdir="$PWD"
tmpdir="$(mktemp -d)" || exit 1
if [ ${#branch} -lt 10 ]; then
git clone -b "$branch" --depth 1 --filter=blob:none --sparse "$curl" "$tmpdir"
cd "$tmpdir"
else
git clone --filter=blob:none --sparse "$curl" "$tmpdir"
cd "$tmpdir"
git checkout $branch
fi
if [ "$?" != 0 ]; then
echo "error on $curl"
exit 1
fi
git sparse-checkout init --cone
git sparse-checkout set "$@"
mv -n $@ $rootdir/ || true
cd $rootdir
}
function mvdir() {
mv -n `find $1/* -maxdepth 0 -type d` ./
rm -rf $1
}
(
git_clone https://github.com/kiddin9/my-packages && mvdir my-packages
git_clone https://github.com/kiddin9/openwrt-bypass && mvdir openwrt-bypass
git_clone https://github.com/kiddin9/luci-app-dnsfilter
git_clone https://github.com/kiddin9/aria2
git_clone https://github.com/kiddin9/luci-theme-edge
git_clone https://github.com/kiddin9/autoshare && mvdir autoshare
git_clone https://github.com/kiddin9/luci-app-xlnetacc
git_clone https://github.com/kiddin9/luci-app-wizard
git_clone https://github.com/kiddin9/luci-app-adguardhome
git_clone https://github.com/kiddin9/luci-app-cloudreve
git_clone https://github.com/kiddin9/openwrt-filebrowser && mvdir openwrt-filebrowser
# git_clone https://github.com/kiddin9/nginx-ui-openwrt && mvdir nginx-ui-openwrt
) &
(
# git_clone https://github.com/kiddin9/openwrt-netdata netdata
git_clone https://github.com/kiddin9/luci-app-syscontrol
git_clone https://github.com/kiddin9/luci-app-chinadns-ng
git_clone https://github.com/kiddin9/openwrt-my-dnshelper && mvdir openwrt-my-dnshelper
git_clone https://github.com/kiddin9/openwrt-lingtigameacc && mvdir openwrt-lingtigameacc
git_clone https://github.com/kiddin9/luci-app-timewol
git_clone https://github.com/kiddin9/luci-app-vsftpd
git_clone https://github.com/kiddin9/openwrt-subconverter && mvdir openwrt-subconverter
git_clone https://github.com/kiddin9/luci-app-syncdial
) &
(
git_clone https://github.com/Openwrt-Passwall/openwrt-passwall && mvdir openwrt-passwall
git_clone https://github.com/Openwrt-Passwall/openwrt-passwall-packages && mvdir openwrt-passwall-packages
git_clone https://github.com/sbwml/luci-app-mosdns openwrt-mos && mv -n openwrt-mos/{*mosdns,v2dat} ./; rm -rf openwrt-mos
git clone https://github.com/fw876/helloworld && mvdir helloworld
git_clone https://github.com/Lienol/openwrt-package liep
git_clone https://github.com/rufengsuixing/luci-app-autoipsetadder
git_clone https://github.com/NateLol/luci-app-beardropper
git_clone https://github.com/riverscn/openwrt-iptvhelper && mvdir openwrt-iptvhelper
git_clone https://github.com/kongfl888/luci-app-timedreboot
git_clone https://github.com/sbwml/luci-app-webdav
git_clone https://github.com/sbwml/package_kernel_tcp-brutal
git_clone https://github.com/hudra0/luci-app-qosmate
) &
(
#git_clone https://github.com/jerrykuku/luci-app-vssr
#git_clone https://github.com/jerrykuku/luci-app-ttnode
git_clone https://github.com/sirpdboy/luci-app-advancedplus
git_clone https://github.com/sirpdboy/luci-app-taskplan taskplan && mvdir taskplan
git_clone https://github.com/sirpdboy/luci-app-lucky oplucky && mvdir oplucky
git_clone https://github.com/sirpdboy/luci-app-partexp partexp && mvdir partexp
# git_clone https://github.com/sirpdboy/luci-app-netspeedtest speedtest && rm -rf speedtest/{iperf*,演示.gif};mvdir speedtest
git_clone https://github.com/sirpdboy/luci-app-parentcontrol
git_clone https://github.com/sirpdboy/luci-app-poweroffdevice poweroffdevice && mvdir poweroffdevice
git_clone https://github.com/sirpdboy/luci-app-watchdog watchdog1 && mvdir watchdog1
git_clone https://github.com/sirpdboy/luci-app-cupsd cupsd1 && mv -n cupsd1/{luci-app-cupsd,cups} ./ ; rm -rf cupsd1
git_clone https://github.com/sirpdboy/luci-app-timecontrol timecontrol && mvdir timecontrol
git_clone https://github.com/sirpdboy/luci-theme-kucat
git_clone https://github.com/sirpdboy/luci-app-kucat-config
git_clone https://github.com/sirpdboy/luci-app-chatgpt-web
git_clone https://github.com/sirpdboy/luci-app-eqosplus
# git_clone https://github.com/muink/luci-app-homeproxy
) &
(
git_clone https://github.com/destan19/OpenAppFilter && mvdir OpenAppFilter
git_clone https://github.com/lvqier/luci-app-dnsmasq-ipset
git_clone https://github.com/walkingsky/luci-wifidog luci-app-wifidog
git_clone https://github.com/peter-tank/luci-app-autorepeater
git_clone https://github.com/brvphoenix/luci-app-wrtbwmon wrtbwmon1 && mvdir wrtbwmon1
git_clone https://github.com/brvphoenix/wrtbwmon wrtbwmon2 && mvdir wrtbwmon2
git_clone https://github.com/muink/openwrt-fastfetch
git_clone https://github.com/timsaya/luci-app-bandix bandix1 && mv -f bandix1/luci-app-bandix ./;rm -rf bandix1
git_clone https://github.com/timsaya/openwrt-bandix bandix2 && mv -f bandix2/openwrt-bandix ./;rm -rf bandix2
) &
(
git_clone https://github.com/everburstSun/tencentcloud-openwrt-plugin-ddns && mv -n tencentcloud-openwrt-plugin-ddns/tencentcloud_ddns ./luci-app-tencentddns; rm -rf tencentcloud-openwrt-plugin-ddns
git_clone https://github.com/Tencent-Cloud-Plugins/tencentcloud-openwrt-plugin-cos && mv -n tencentcloud-openwrt-plugin-cos/tencentcloud_cos ./luci-app-tencentcloud-cos; rm -rf tencentcloud-openwrt-plugin-cos
git_clone https://github.com/doushang/luci-app-shortcutmenu luci-shortcutmenu && mv -n luci-shortcutmenu/luci-app-shortcutmenu ./ ; rm -rf luci-shortcutmenu
git_clone https://github.com/aa65535/openwrt-dist-luci
# git_clone https://github.com/morytyann/OpenWrt-msd && mvdir OpenWrt-msd
# git_clone https://github.com/messense/aliyundrive-webdav aliyundrive && mv -n aliyundrive/openwrt/* ./ ; rm -rf aliyundrive
# git_clone https://github.com/sbilly/netmaker-openwrt && mv -n netmaker-openwrt/netmaker ./; rm -rf netmaker-openwrt
# git_clone https://github.com/lisaac/luci-app-dockerman dockerman && mv -n dockerman/applications/* ./; rm -rf dockerman
) &
(
git_clone https://github.com/ophub/luci-app-amlogic amlogic && mv -n amlogic/luci-app-amlogic ./;rm -rf amlogic
git_clone https://github.com/mingxiaoyu/luci-app-cloudflarespeedtest cloudflarespeedtest && mv -n cloudflarespeedtest/applications/* ./;rm -rf cloudflarespeedtest
git_clone https://github.com/Openwrt-Passwall/openwrt-passwall2 passwall2 && mv -n passwall2/luci-app-passwall2 ./;rm -rf passwall2
git_clone https://github.com/linkease/nas-packages && mv -n nas-packages/network/services/* ./; rm -rf nas-packages
git_clone https://github.com/linkease/nas-packages-luci && mv -n nas-packages-luci/luci/* ./; rm -rf nas-packages-luci
git_clone https://github.com/linkease/istore && mv -n istore/luci/* ./; rm -rf istore
#git_clone https://github.com/linkease/lcdsimple lcdsimple1 && mvdir lcdsimple1
git_clone https://github.com/fcshark-org/openwrt-fchomo && mvdir openwrt-fchomo
git_clone https://github.com/Tokisaki-Galaxy/luci-app-tailscale-community tailscalec && mv -n tailscalec/luci-app-tailscale-community ./;rm -rf tailscalec
) &
(
git_clone https://github.com/frainzy1477/luci-app-clash
git_clone https://github.com/peter-tank/luci-app-fullconenat
git_clone https://github.com/KFERMercer/luci-app-tcpdump
git_clone https://github.com/ykxVK8yL5L/pikpak-webdav pikpak && mv -n pikpak/openwrt/* ./;rm -rf pikpak
git_clone https://github.com/jjm2473/openwrt-apps && rm -rf openwrt-apps/{luci-app-cpufreq,luci-app-ota,luci-alias.mk} && sed -i "s/luci-alias.mk/..\/luci.mk/" openwrt-apps/*/Makefile && mvdir openwrt-apps
git_clone https://github.com/nikkinikki-org/OpenWrt-nikki && mv -f OpenWrt-nikki/{luci-app-nikki,nikki} ./;rm -rf OpenWrt-nikki
) &
(
git_clone https://github.com/ZeaKyX/speedtest-web
git_clone https://github.com/ZeaKyX/luci-app-speedtest-web
git_clone https://github.com/linkease/openwrt-app-actions
git_clone https://github.com/Wulnut/luci-app-suselogin
git_clone https://github.com/mchome/openwrt-dogcom
git_clone https://github.com/lucikap/luci-app-brukamen && mv -n luci-app-brukamen/luci* ./;rm -rf luci-app-brukamen luci-app-autoshell_*.ipk
git_clone https://github.com/yichya/luci-app-xray yichya && mv -f yichya/status ./luci-app-xray-status;mv -f yichya/core ./luci-app-xray;rm -rf yichya
git_clone https://github.com/rafmilecki/luci-app-xjay
# git_clone https://github.com/kiddin9/openwrt-thunder && mvdir openwrt-thunder
) &
(
git_clone https://github.com/honwen/luci-app-aliddns
git_clone https://github.com/peter-tank/luci-app-dnscrypt-proxy2
git_clone https://github.com/sundaqiang/openwrt-packages && mv -n openwrt-packages/luci-* ./; rm -rf openwrt-packages
git_clone https://github.com/CHN-beta/rkp-ipid
git_clone https://github.com/2018nuoyan/openwrt_nezha && mv -n openwrt_nezha/*nezhav1 ./; rm -rf openwrt_nezha
git clone https://github.com/Ausaci/luci-app-nat6-helper -b main-dev
) &
(
# git_clone https://github.com/zzsj0928/luci-app-pushbot
git_clone https://github.com/shanglanxin/luci-app-homebridge
git_clone https://github.com/ykxVK8yL5L/luci-app-synology synology && mv -n synology/luci-app-synology ./ && rm -rf synology
git_clone https://github.com/htynkn/openwrt-switch-lan-play && mv -n openwrt-switch-lan-play/package/* ./ && rm -rf openwrt-switch-lan-play
git_clone https://github.com/xptsp/luci-app-nodogsplash
git_clone https://github.com/xptsp/luci-mod-listening-ports
git_clone https://github.com/xptsp/luci-app-squid-adv
) &
(
git_clone https://github.com/honwen/luci-app-shadowsocks-rust
git_clone https://github.com/Hyy2001X/AutoBuild-Packages && rm -rf AutoBuild-Packages/luci-app-adguardhome && mvdir AutoBuild-Packages
# git_clone https://github.com/lazywalker/mmdvm-openwrt && rm -rf mmdvm-openwrt/misc && mvdir mmdvm-openwrt
git_clone https://github.com/4IceG/luci-app-at-socat at-socat && mvdir at-socat
git_clone https://github.com/4IceG/luci-app-easyconfig-transfer easyconfig && mvdir easyconfig
git_clone https://github.com/4IceG/luci-app-atcommands atcommands && mvdir atcommands
) &
(
git_clone https://github.com/Diciya/luci-app-broadbandacc
git_clone https://github.com/wiwizcom/WiFiPortal && mvdir WiFiPortal
# git_clone https://github.com/vinewx/NanoHatOLED && mv NanoHatOLED/nanohatoled ./ && rm -rf NanoHatOLED
git_clone https://github.com/zerolabnet/luci-app-torbp
git_clone https://github.com/sbwml/luci-app-airconnect airconnect1 && mv airconnect1/* ./ && rm -rf airconnect1
git_clone https://github.com/openwrtdiy/luci-app-pppoe-user
git_clone https://github.com/derisamedia/luci-theme-alpha
git_clone https://github.com/animegasan/luci-app-alpha-config
git_clone https://github.com/gofly/openwrt-luci-proto-tinc
git_clone https://github.com/hzyitc/mnh-openwrt && mvdir mnh-openwrt
) &
(
git_clone https://github.com/QiuSimons/luci-app-daed-next daed1 && mvdir daed1
git_clone https://github.com/JiaY-shi/fancontrol fanc && mv fanc/{fancontrol,luci-app-fancontrol} ./;rm -rf fanc
git_sparse_clone master "https://github.com/coolsnowwolf/lede" package/wwan package/lean package/network/services/shellsync package/qca/shortcut-fe && cp -rf wwan/*/* ./ ; rm -Rf wwan
git_clone https://github.com/Siriling/5G-Modem-Support && rm -rf 5G-Modem-Support/rooter && mvdir 5G-Modem-Support
git_clone https://github.com/linkease/istore-packages
) &
(
git_clone https://github.com/muink/luci-app-dnsproxy
git_clone https://github.com/muink/luci-app-einat
git_clone https://github.com/muink/openwrt-einat-ebpf
git_clone https://github.com/muink/openwrt-natmapt
git_clone https://github.com/muink/luci-app-natmapt
git_clone https://github.com/muink/openwrt-stuntman
git_clone https://github.com/muink/openwrt-alwaysonline
git_clone https://github.com/muink/luci-app-alwaysonline
git_clone https://github.com/muink/openwrt-rgmac
git_clone https://github.com/muink/luci-app-change-mac
git_clone https://github.com/muink/luci-app-packagesync
git_clone https://github.com/muink/luci-app-tn-netports
git_clone https://github.com/muink/openwrt-go-stun
git_clone https://github.com/muink/luci-app-tinyfilemanager
git_clone https://github.com/muink/openwrt-Toolkit
) &
(
git_clone https://github.com/gSpotx2f/luci-app-temp-status
git_clone https://github.com/gSpotx2f/luci-app-cpu-perf
git_clone https://github.com/gSpotx2f/luci-app-log
git_clone https://github.com/gSpotx2f/luci-app-internet-detector idetector && mv idetector/*internet-detector* ./;rm -rf idetector
git_clone https://github.com/gSpotx2f/luci-app-disks-info
git_clone https://github.com/gSpotx2f/luci-app-interfaces-statistics
git_clone https://github.com/gSpotx2f/luci-app-cpu-status-mini
git_clone https://github.com/gSpotx2f/luci-app-cpu-status
git_clone https://github.com/Carseason/openwrt-packages Carseason1 && mv -n Carseason1/*/* ./;mv services/* ./;rm -rf Carseason1 services
git_clone https://github.com/Carseason/openwrt-themedog && mv -n openwrt-themedog/luci/* ./;rm -rf openwrt-themedog
git_clone https://github.com/Carseason/openwrt-app-actions Carseason2 && mv -n Carseason2/applications/* ./;rm -rf Carseason2
git_clone https://github.com/Thaolga/openwrt-nekobox && mv openwrt-nekobox/luci-* ./;rm -rf openwrt-nekobox
git_clone https://github.com/nosignals/openwrt-neko && mv openwrt-neko/luci-app-neko ./;rm -rf openwrt-neko
) &
(
git_clone https://github.com/ilxp/luci-app-ikoolproxy
git_clone https://github.com/animegasan/luci-app-droidmodem
git_clone https://github.com/animegasan/luci-app-droidnet
git_clone https://github.com/animegasan/luci-app-ipinfo
git_clone https://github.com/animegasan/luci-app-dnsleaktest
git_clone https://github.com/animegasan/luci-app-gpioled
git_clone https://github.com/hingbong/hickory-dns-openwrt && mvdir hickory-dns-openwrt
git_clone https://github.com/kenzok78/luci-app-guest-wifi
git_clone https://github.com/EkkoG/openwrt-natmap
git_clone https://github.com/EkkoG/luci-app-natmap
git_clone https://github.com/yichya/openwrt-hv-tools
) &
(
git_clone https://github.com/EasyTier/luci-app-easytier luci-app-easytier1 && mvdir luci-app-easytier1
git_clone https://github.com/ntlf9t/luci-app-dnspod
git_clone https://github.com/lmq8267/luci-app-vnt opvnt && mv -f opvnt/luci-app-vnt ./;rm -rf opvnt
git_clone https://github.com/RymFred11/luci-app-nettask nettask && mv nettask/luci-app-nettask ./;rm -rf nettask
git_clone https://github.com/jarod360/luci-app-xupnpd
git_clone https://github.com/fuqiang03/openwrt-caddy
git_clone https://github.com/lmq8267/luci-app-caddy luci-caddy && mv luci-caddy/luci-app-caddy ./;rm -rf luci-caddy
git_clone https://github.com/sbwml/luci-app-smbuser
git_clone https://github.com/rushxrushx/luci-app-redsocks
git_clone https://github.com/luochongjun/luci-app-dynv6
git_clone https://github.com/nicholas9698/luci-app-campusnet
git_clone https://github.com/tanghammer/luci-app-switchtools
) &
(
git_clone https://github.com/kingyond/luci-app-accesscontrol-plus accesscontrol-plus && mv accesscontrol-plus/luci-app-accesscontrol-plus ./;rm -rf accesscontrol-plus
git_clone https://github.com/4IceG/luci-app-lite-watchdog lite-watchdog && mv lite-watchdog/luci-app-lite-watchdog ./;rm -rf lite-watchdog
git_clone https://github.com/Mitsuhaxy/luci-app-miniproxy
git_clone https://github.com/tkmsst/luci-app-cellularstatus cellularstatus && mv cellularstatus/luci/applications/* ./;rm -rf cellularstatus
git_clone https://github.com/tracemouse/luci-app-coredns coredns && mv coredns/luci-app-coredns ./;rm -rf coredns
git_clone https://github.com/arenekosreal/luci-app-nginx
git_clone https://github.com/zfdx123/luci-app-school
git_clone https://github.com/tano-systems/luci-app-tn-lldpd
git_clone https://github.com/DRAWCORE/luci-app-qos-emong
# git_clone https://github.com/wintbiit/luci-app-sakurafrp
git_clone https://github.com/ykxVK8yL5L/luci-app-taskschedule taskschedule && mvdir taskschedule
#git_clone https://github.com/douo/luci-app-tinyfecvpn
) &
(
git_clone https://github.com/ttimasdf/luci-app-jederproxy
git_clone https://github.com/ApeaSuperz/luci-app-cqustdotnet cqustdotnet && mv cqustdotnet/luci-app-cqustdotnet ./;rm -rf cqustdotnet
git_clone https://github.com/shenyunet/luci-app-hypercpe
git_clone https://github.com/xcode75/luci-app-xclient
git_clone https://github.com/chenzhen6666/luci-app-mproxy mproxy && mvdir mproxy
git_clone https://github.com/a904055262/luci-app-ipv6clientfilter
git_clone https://github.com/mukaiu/luci-app-domain-proxy
git_clone https://github.com/danielaskdd/luci-app-smartvpn
git_clone https://github.com/hequan2017/luci-app-forcedata
git_clone https://github.com/sbwml/luci-app-openlist2 oplist && mvdir oplist
git_clone https://github.com/AngelaCooljx/luci-theme-material3
git_clone https://github.com/eamonxg/luci-theme-aurora
) &
(
#git_clone https://github.com/bobbyunknown/luci-app-insomclash
git_clone https://github.com/muink/luci-app-ssrust
git_clone https://github.com/hudra0/qosmate
git_clone https://github.com/muink/luci-app-netdata
git_clone https://github.com/xptsp/luci-app-ympd
git_clone https://github.com/xptsp/openwrt-ympd
git_clone https://github.com/xptsp/openwrt-peanut
git_clone https://github.com/calfeche13/luci-app-public-ip-monitor
# git_clone https://github.com/vison-v/luci-app-nginx-proxy
git_clone https://github.com/tty228/luci-app-wechatpush
git_clone https://github.com/sbwml/luci-app-mentohust mentohust1 && mvdir mentohust1
# git_clone https://github.com/natpierce/luci-app-natpierce natpierce && mv natpierce/luci-app-natpierce ./;rm -rf natpierce
) &
(
git_sparse_clone master "https://github.com/coolsnowwolf/packages" multimedia/UnblockNeteaseMusic-Go \
multimedia/UnblockNeteaseMusic multimedia/aliyundrive-webdav net/gowebdav net/kismet net/mstpd \
net/qBittorrent-static net/phtunnel net/headscale net/clouddrive2 net/baidupcs-go net/daemonlogger net/geth net/gnurl \
net/uugamebooster net/pgyvpn net/ooniprobe net/polipo net/rosy-file-server net/qiyougamebooster \
net/sqm-scripts-extra net/tor-fw-helper net/vncrepeater net/verysync \
net/vpnbypass net/vpn-policy-routing utils/qfirehose
git_sparse_clone master "https://github.com/lunatickochiya/Matrix-Action-Openwrt" package/kochiya/brlaser package/kochiya/luci-app-banmac-ipt package/kochiya/luci-app-banmac-nft package/kochiya/luci-app-nvr package/kochiya/luci-app-openvpn-server package/kochiya/luci-app-openvpn-server-client
git_sparse_clone main https://github.com/sbwml/openwrt_pkgs luci-app-socat
) &
(
git_sparse_clone master "https://github.com/xiaoqingfengATGH/feeds-xiaoqingfeng" homeredirect luci-app-homeredirect
git_sparse_clone openwrt-25.12 "https://github.com/immortalwrt/immortalwrt" \
package/kernel/rtl8189es package/emortal/autocore package/emortal/automount \
package/emortal/cpufreq package/network/utils/fullconenat package/network/utils/fullconenat-nft \
package/utils/mhz package/utils/pcat-manager
) &
(
git_sparse_clone master "https://github.com/x-wrt/com.x-wrt" luci-app-macvlan luci-app-xwan
git_sparse_clone master "https://github.com/obsy/packages" oscam luci-proto-wwan 3ginfo modemband
) &
(
git_sparse_clone develop "https://github.com/Ysurac/openmptcprouter-feeds" \
dsvpn glorytun-udp glorytun grpcurl ipcalc luci-app-dsvpn luci-app-glorytun-tcp luci-app-glorytun-udp luci-app-mail luci-app-mlvpn luci-app-mptcp luci-app-nginx-ha luci-app-sqm-autorate luci-app-packet-capture luci-app-iperf luci-theme-openmptcprouter sqm-autorate speedtestc mlvpn mptcp tcptraceroute tracebox tsping atinout z8102
git_sparse_clone chawrt/24.10 "https://github.com/liudf0716/luci" applications/luci-app-yt-dlp applications/luci-app-apfree-wifidog applications/luci-app-ss-redir
git_sparse_clone chawrt/24.10 "https://github.com/liudf0716/packages" net/ss-redir
git_sparse_clone istoreos-24.10 "https://github.com/jjm2473/luci" applications/luci-app-dockerman
) &
git_sparse_clone openwrt-25.12 "https://github.com/immortalwrt/packages" net/n2n net/dae net/frp \
net/amule net/cdnspeedtest net/minieap net/ddns-go net/sysuh3c net/3proxy net/cloudreve \
net/go-nats net/go-wol net/bitsrunlogin-go net/transfer net/daed net/udp2raw net/msd_lite \
net/subconverter net/ngrokc net/scutclient net/gost net/ua2f net/dufs net/qBittorrent-Enhanced-Edition \
net/tinyportmapper net/nexttrace net/rustdesk-server net/tuic-server \
net/ipset-lists net/ShadowVPN net/nps net/vlmcsd net/dnsforwarder \
net/ps3netsrv net/brook net/q net/speedtest-cli \
net/vsftpd net/smartdns net/miniupnpd net/p910nd \
net/ariang libs/wxbase libs/rapidjson libs/libcron libs/quickjspp libs/toml11 libs/libdvbcsa \
libs/libdouble-conversion libs/qt6base libs/jpcre2 libs/alac libs/libcryptopp libs/antileech \
utils/qt6tools utils/dockerd utils/cpulimit utils/sendat utils/cups-bjnp utils/rhash utils/boltbrowser \
utils/phicomm-k3screenctrl utils/joker utils/7z utils/dhrystone utils/supervisor utils/tinymembench utils/pcat-mgr utils/fan2go \
utils/coremark utils/watchcat multimedia/you-get multimedia/lux multimedia/gmediarender multimedia/ykdl multimedia/gallery-dl \
sound/spotifyd devel/go-rice devel/rust-bindgen admin/gotop \
lang/lua-periphery lang/lua-neturl lang/lua-maxminddb devel/gn
git_clone https://github.com/koshev-msk/modemfeed && mv -n modemfeed/*/!(telephony)/* ./; rm -rf modemfeed
git_sparse_clone openwrt-25.12 "https://github.com/coolsnowwolf/luci" applications themes/luci-theme-design libs/luci-lib-fs
mv -f applications luciapp;rm -rf luciapp/{luci-app-turboacc,luci-app-frp*}
git_sparse_clone master "https://github.com/coolsnowwolf/luci" applications
mv -n applications/* luciapp/; rm -rf applications
rm -rf luciapp/{luci-app-qbittorrent,luci-app-zerotier,luci-app-cpufreq,luci-app-e2guardian,luci-app-aliyundrive-fuse,luci-app-syncdial,luci-app-firewall}
git_sparse_clone openwrt-25.12 "https://github.com/immortalwrt/luci" applications collections/luci-nginx protocols/luci-proto-minieap protocols/luci-proto-quectel themes/luci-theme-argon
rm -rf applications/luci-app-frp*;mv -n luciapp/!(luci-app-filetransfer|luci-app-ksmbd) applications/; rm -rf luciapp
for ipk in $(ls -d applications/!(luci-app-rclone|luci-app-smartdns|luci-app-3ginfo-lite|luci-app-aria2|luci-app-ddns|luci-app-package-manager|luci-app-ksmbd|luci-app-samba4|luci-app-watchcat|luci-app-upnp|luci-app-transmission)/); do
if [[ $(ls $ipk/po | wc -l) -gt 4 ]]; then
rm -rf $ipk
fi
done
- name: Delete duplicated packages
run: |
shopt -s extglob
set +e
mv -n applications/!(luci-app-noddos|luci-app-filebrowser-go|luci-app-openvpn-server|luci-app-chrony|luci-app-kodexplorer|luci-app-cshark|luci-app-dnscrypt-proxy|luci-app-https-dns-proxy|luci-app-ssr-mudb-server|luci-app-ledtrig-*|luci-app-antiblock) ./ ; rm -Rf applications
mv -n lean/!(r8101|r8125|r8126|r8168) ./ ; rm -Rf lean
mv -n liep/!(luci-app-filebrowser) ./ ; rm -Rf liep
mv -n openwrt-app-actions/applications/* ./;rm -rf openwrt-app-actions
mv -n istore-packages/!(qBittorrent*|luci-app-qbittorrent-ee|baidupcs-web|luci-app-LingTiGameAcc|inter_i40e) ./;rm -rf istore-packages
rm -Rf */.git
for pkg in $(ls -d .github/diy/packages/*); do
mv -f $pkg/Makefile.k $pkg/Makefile >/dev/null 2>&1 || true
done
cp -rf .github/diy/packages/* ./ || true
for pkg in $(ls -d .github/diy/packages/*); do
mv -f $pkg/Makefile $pkg/Makefile.k >/dev/null 2>&1 || true
done
rm -rf */.github
- name: SSH connection to Actions
uses: kiddin9/debugger-action@master
if: github.event.inputs.ssh == 'true'
- name: Apply patches
run: |
find ".github/diy/patches" -type f -name '*.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -p1 -E --forward --no-backup-if-mismatch" || (curl -k --data chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" --data "text=❌ 软件包更新失败 😂 https://github.com/kiddin9/openwrt-packages/actions" "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage";exit 1)
- name: Modify
run: |
shopt -s extglob
set +e
sed -i \
-e "s/\(network\..*\)\.ifname/\1.device/g" \
`find \( -path "*/root/*" -o -path "*/files/*" -o -path "*/luasrc/*" \) ! -path "./base-files/*" ! -path "./dnsmasq/*" ! -path "./luci-base/*" ! -path "./ppp/*" -type f` &
# sed -i -e "s/\(killall .*\)-[0-9] /\1-3 /g" \
-e "s/killall \([^-]+*\)/killall -3 \1/g" \
`find \( -path "*/files/root/etc/init.d/*" -o -path "*/root/etc/init.d/*" -o -path "*/files/*.init" \) -type f` &
(
function latest() {
(curl -gs -H 'Content-Type: application/json' \
-H "Authorization: Bearer ${{ secrets.TOKEN_KIDDIN9 }}" \
-X POST -d '{ "query": "query {repository(owner: \"'"$1"'\", name: \"'"$2"'\"){latestRelease{tagName tagCommit{oid}}refs(refPrefix:\"refs/tags/\",last:1,orderBy:{field:TAG_COMMIT_DATE,direction:ASC}){edges{node{name target{oid}}}}defaultBranchRef{target{...on Commit {oid}}}}}"}' https://api.github.com/graphql)
}
for pkg in $(ls !(luci-*|nikki|openwrt-einat-ebpf|glorytun|mosdns|spotifyd|miniupnpd|qBittorrent-Enhanced-Edition|openwrt-Toolkit|libdouble-conversion|wxbase|3proxy|ucode|mergerfs|openwrt-nezhav1|homebox|sub-web|tcptraceroute|frp|openwrt-caddy|mentohust|brlaser|rapidjson|smartdns|hysteria|gecoosac|hickory-dns|libcryptopp|naiveproxy|rustdesk-server|shadowsocksr-libev|tuic-server|joker|ps3netsrv|natter|netmaker|openwrt-ympd|subconverter|sms-tool)/Makefile); do
repo="$(grep ^PKG_SOURCE_URL $pkg | grep github | cut -f 4-5 -d '/' | sed -e 's/.git//' | grep -E '[0-9a-zA-Z_-]+$')" || true
if [ "$repo" ]; then
owner="$(echo $repo | cut -f 1 -d '/')"
name="$(echo $repo | cut -f 2 -d '/')"
latest="$(latest $owner $name)"
sed -i "s/PKG_SOURCE_VERSION:=.*/PKG_SOURCE_VERSION:=$(echo $latest | jq -r '.data.repository.defaultBranchRef.target.oid')/" $pkg || true
over="$(grep -E PKG_VERSION:=.*$ $pkg | cut -f 2 -d '=' | sed -e 's/^\(v\|release-\)//' | grep -E "[0-9]")" || true
if [ "$over" ]; then
ver="$(echo $latest | jq -r '.data.repository.latestRelease.tagName' | sed -e 's/^\(v\|release-\)//' | grep -E "^[^()]*$" | grep -E "[0-9]")" || true
# [ "$ver" ] || ver="$(git ls-remote --tags git://github.com/$repo | cut -d/ -f3- | sort -t. -nk1,3 | awk '/^[^{]*$/{version=$1}END{print version}' | grep -o -E "[0-9].*")" || true
echo "$repo-$over-$ver"
if [ "$ver" ]; then
function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
if version_lt "$over" "$ver"; then
latest="$(echo $latest | jq -r '.data.repository.latestRelease.tagCommit.oid' || echo $latest | jq -r '.data.repository.refs.edges[-1].node.target.oid')"
sed -i -e "s/PKG_SOURCE_VERSION:=.*/PKG_SOURCE_VERSION:=$latest/" \
-e "s/PKG_VERSION:=.*/PKG_VERSION:=$ver/" $pkg || true
fi || true
fi
fi
fi
done
touch /tmp/ok
) &
(
for pkg in $(ls -d */ | grep -v "naiveproxy" | grep -v "luci-app-passwall"); do
if [[ "$(grep "PKG_VERSION" $pkg/Makefile)" && ! "$(grep "PKG_RELEASE" $pkg/Makefile)" ]]; then
sed -i "s/\(PKG_VERSION:=.*\)/\1\nPKG_RELEASE:=/" $pkg/Makefile || true
fi
if [ "$(grep "PKG_RELEASE" $pkg/Makefile)" ]; then
sed -i "s/PKG_RELEASE:=.*/PKG_RELEASE:=$(git rev-list --count main $pkg)/" $pkg/Makefile || true
fi
done
touch /tmp/ok2
) &
sed -i \
-e 's?include \.\./\.\./\(lang\|devel\)?include $(TOPDIR)/feeds/packages/\1?' \
-e "s/\(\(^\| \| \)\(PKG_HASH\|PKG_MD5SUM\|PKG_MIRROR_HASH\|HASH\):=\).*/\1skip/" \
-e 's/+docker\( \|$\)/+docker +dockerd /g' \
-e 's?include .*/luci.mk?include $(TOPDIR)/feeds/luci/luci.mk?' \
*/Makefile
chmod +x github/diy/*.sh
bash .github/diy/create_acl_for_luci.sh -a >/dev/null 2>&1 || true
bash .github/diy/convert_translation.sh -a >/dev/null 2>&1 || true
bash .github/diy/create_ucitrack_for_luci.sh -a >/dev/null 2>&1 || true
bash .github/diy/generate_ucitrack.sh -a >/dev/null 2>&1 || true
chmod -R +x luci-*/root/etc/init.d/ luci-*/root/bin/ luci-*/root/sbin/ luci-*/root/usr/libexec/ luci-*/root/usr/bin/ luci-*/root/usr/sbin/
find . -path "./luci-*/root/usr/share/*" -name "*.sh" -type f -exec chmod +x {} \;
#sed -i 's?"http://" + window.location.hostname?window.location.protocol + "//" + window.location.hostname?g' `find luci-app*/luasrc/view/ -maxdepth 2 -name "*.htm"`
sed -i "s/default n/default y/" dockerd/Config.in
sed -i "s/.tar.gz/.tar.xz/" openwrt-natmap/Makefile
mkdir -p luci-app-passwall/root/www/luci-static/passwall luci-app-passwall2/root/www/luci-static/passwall2 luci-app-ssr-plus/root/www/luci-static/shadowsocksr
cp -rf luci-app-bypass/root/www/luci-static/bypass/* luci-app-passwall/root/www/luci-static/passwall/
cp -rf luci-app-bypass/root/www/luci-static/bypass/* luci-app-passwall2/root/www/luci-static/passwall2/
cp -rf luci-app-bypass/root/www/luci-static/bypass/* luci-app-ssr-plus/root/www/luci-static/shadowsocksr/
echo ".page-container>div>div>a:first-child{display:none}" >>luci-app-quickstart/htdocs/luci-static/quickstart/style.css
sed -i 's/icon!=="baby"/icon!==""/' luci-app-quickstart/htdocs/luci-static/quickstart/index.js
sed -i 's/+php8-cgi /+php8-cgi +php8-fpm /' luci-theme-spectra/Makefile
while [[ ! -f /tmp/ok || ! -f /tmp/ok2 || ! -f /tmp/ok3 ]]; do
echo "wait"
sleep 1
done
- name: Apply
run: |
Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤")
git add .
git commit -m "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M:%S)"
for pkg in $(git diff-tree --no-commit-id --name-only HEAD | grep -v "naiveproxy" | grep -v "luci-app-passwall"); do
if [ "$(grep "PKG_RELEASE" $pkg/Makefile)" ]; then
sed -i "s/PKG_RELEASE:=.*/PKG_RELEASE:=$(git rev-list --count main $pkg)/" $pkg/Makefile || true
fi
done
git reset --soft HEAD^
git add .
git commit -m "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M:%S)"
git push -f
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@main
continue-on-error: true
with:
retain_days: 1
keep_minimum_runs: 3