parent
2f44521929
commit
9e64ef9815
@ -17,13 +17,13 @@ LOCK_FILE=/var/lock/ssrplus.lock
|
|||||||
LOG_FILE=/var/log/ssrplus.log
|
LOG_FILE=/var/log/ssrplus.log
|
||||||
TMP_PATH=/var/etc/ssrplus
|
TMP_PATH=/var/etc/ssrplus
|
||||||
TMP_BIN_PATH=$TMP_PATH/bin
|
TMP_BIN_PATH=$TMP_PATH/bin
|
||||||
# Get the default DNSMasq config ID from the UCI configuration
|
# 获取默认的 DNSMasq 配置 ID
|
||||||
DEFAULT_DNSMASQ_CFGID=$(uci show dhcp.@dnsmasq[0] | awk -F '.' '{print $2}' | awk -F '=' '{print $1}' | head -1)
|
DEFAULT_DNSMASQ_CFGID=$(uci show dhcp.@dnsmasq[0] | awk -F '.' '{print $2}' | awk -F '=' '{print $1}' | head -1)
|
||||||
# Locate the dnsmasq.conf file that contains the conf-dir option
|
# 查找包含 conf-dir 选项的 dnsmasq.conf 文件路径
|
||||||
DNSMASQ_CONF_PATH=$(grep -l "^conf-dir=" "/tmp/etc/dnsmasq.conf.${DEFAULT_DNSMASQ_CFGID}")
|
DNSMASQ_CONF_PATH=$(grep -l "^conf-dir=" "/tmp/etc/dnsmasq.conf.${DEFAULT_DNSMASQ_CFGID}")
|
||||||
# Extract the directory path from the conf-dir line
|
# 从 conf-dir 行中提取目录路径
|
||||||
DNSMASQ_CONF_DIR=$(grep '^conf-dir=' "$DNSMASQ_CONF_PATH" | cut -d'=' -f2 | head -n 1)
|
DNSMASQ_CONF_DIR=$(grep '^conf-dir=' "$DNSMASQ_CONF_PATH" | cut -d'=' -f2 | head -n 1)
|
||||||
# Check if a conf-dir value was found and set variables accordingly
|
# 设置 TMP_DNSMASQ_PATH,并去除路径末尾的斜杠
|
||||||
TMP_DNSMASQ_PATH=${DNSMASQ_CONF_DIR%*/}/dnsmasq-ssrplus.d
|
TMP_DNSMASQ_PATH=${DNSMASQ_CONF_DIR%*/}/dnsmasq-ssrplus.d
|
||||||
|
|
||||||
chain_config_file= #generate shadowtls chain proxy config file
|
chain_config_file= #generate shadowtls chain proxy config file
|
||||||
|
@ -9,8 +9,7 @@ require "luci.model.uci"
|
|||||||
local icount = 0
|
local icount = 0
|
||||||
local args = arg[1]
|
local args = arg[1]
|
||||||
local uci = luci.model.uci.cursor()
|
local uci = luci.model.uci.cursor()
|
||||||
local TMP_DNSMASQ_PATH = "${DNSMASQ_CONF_DIR%*/}/dnsmasq-ssrplus.d"
|
local TMP_DNSMASQ_PATH = luci.sys.exec("find /tmp/dnsmasq.*/dnsmasq-ssrplus.d -print 2>/dev/null | head -n 1"):gsub("%s+", "")
|
||||||
luci.sys.call("mkdir -p " .. TMP_DNSMASQ_PATH)
|
|
||||||
local TMP_PATH = "/var/etc/ssrplus"
|
local TMP_PATH = "/var/etc/ssrplus"
|
||||||
-- match comments/title/whitelist/ip address/excluded_domain
|
-- match comments/title/whitelist/ip address/excluded_domain
|
||||||
local comment_pattern = "^[!\\[@]+"
|
local comment_pattern = "^[!\\[@]+"
|
||||||
|
@ -462,7 +462,7 @@ index da30ffc..f97309b 100644
|
|||||||
msgstr "DNS 服务器 IP:Port"
|
msgstr "DNS 服务器 IP:Port"
|
||||||
|
|
||||||
diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
||||||
index 231dccc..f6e299e 100755
|
index 4029a07..93388ce 100755
|
||||||
--- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
--- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
||||||
+++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
+++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
||||||
@@ -185,23 +185,17 @@ ln_start_bin() {
|
@@ -185,23 +185,17 @@ ln_start_bin() {
|
||||||
|
Loading…
Reference in New Issue
Block a user