luci-app-clash: sync with upstream source
This commit is contained in:
parent
f38d4b3633
commit
6ef4a2b461
@ -106,9 +106,9 @@ define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/rules
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/rules/g_rules
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/dashboard
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/dashboard/img
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/dashboard/js
|
||||
$(INSTALL_DIR) $(1)/etc/clash/dashboard
|
||||
$(INSTALL_DIR) $(1)/etc/clash/dashboard/img
|
||||
$(INSTALL_DIR) $(1)/etc/clash/dashboard/js
|
||||
$(INSTALL_DIR) $(1)/usr/share/clash/yacd
|
||||
$(INSTALL_DIR) $(1)/etc/clash/clashtun
|
||||
$(INSTALL_DIR) $(1)/etc/clash/dtun
|
||||
@ -144,11 +144,11 @@ define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/logstatus_check $(1)/usr/share/clash/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/clash.txt $(1)/usr/share/clash/
|
||||
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/index.html $(1)/usr/share/clash/dashboard/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/main.772fa8c97df0c4f1549a.css $(1)/usr/share/clash/dashboard/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/img/ffac0fa1d89f15922b4594863b8b32e9.png $(1)/usr/share/clash/dashboard/img/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/1.bundle.772fa8c97df0c4f1549a.min.js $(1)/usr/share/clash/dashboard/js/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/bundle.772fa8c97df0c4f1549a.min.js $(1)/usr/share/clash/dashboard/js/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/index.html $(1)/etc/clash/dashboard/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/main.24f6f4760d8c66faaa74.css $(1)/etc/clash/dashboard/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/img/ffac0fa1d89f15922b4594863b8b32e9.png $(1)/etc/clash/dashboard/img/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/1.bundle.24f6f4760d8c66faaa74.min.js $(1)/etc/clash/dashboard/js/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/dashboard/js/bundle.24f6f4760d8c66faaa74.min.js $(1)/etc/clash/dashboard/js/
|
||||
$(INSTALL_BIN) ./root/usr/share/clash/yacd/* $(1)/usr/share/clash/yacd/
|
||||
|
||||
$(INSTALL_DATA) ./luasrc/clash.lua $(1)/usr/lib/lua/luci/
|
||||
|
||||
@ -38,6 +38,13 @@ cdns = s:option(Flag, "culan", translate("Enable Lan DNS"))
|
||||
cdns.default = 1
|
||||
cdns.description = translate("Enabling will set custom DNS Servers for Lan")
|
||||
|
||||
dns = s:option(DynamicList, "landns", translate("Lan DNS servers"))
|
||||
dns.description = translate("Set custom DNS Servers for Lan")
|
||||
dns.datatype = "ipaddr"
|
||||
dns.cast = "string"
|
||||
dns:depends("culan", 1)
|
||||
|
||||
|
||||
y = s:option(ListValue, "access_control", translate("Access Control"))
|
||||
y:value("0", translate("disabled"))
|
||||
y:value("1", translate("Whitelist IPs"))
|
||||
@ -67,12 +74,6 @@ end)
|
||||
o:depends("access_control", 2)
|
||||
|
||||
|
||||
dns = s:option(DynamicList, "landns", translate("Lan DNS servers"))
|
||||
dns.description = translate("Set custom DNS Servers for Lan")
|
||||
dns.datatype = "ipaddr"
|
||||
dns.cast = "string"
|
||||
dns:depends("culan", 1)
|
||||
|
||||
|
||||
md = s:option(Flag, "tun_mode", translate("Tun Mode DNS"))
|
||||
md.default = 0
|
||||
|
||||
@ -1 +1 @@
|
||||
<!doctype html><html lang="en" dir="ltr"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><link rel="icon" type="image/x-icon" href="https://cdn.jsdelivr.net/gh/Dreamacro/clash/docs/logo.png"/><title>Clash</title><link href="main.772fa8c97df0c4f1549a.css" rel="stylesheet"></head><body><div id="root"></div><script src="js/1.bundle.772fa8c97df0c4f1549a.min.js"></script><script src="js/bundle.772fa8c97df0c4f1549a.min.js"></script></body></html>
|
||||
<!doctype html><html lang="en" dir="ltr"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><link rel="icon" type="image/x-icon" href="https://cdn.jsdelivr.net/gh/Dreamacro/clash/docs/logo.png"/><title>Clash</title><link href="main.24f6f4760d8c66faaa74.css" rel="stylesheet"></head><body><div id="root"></div><script src="js/1.bundle.24f6f4760d8c66faaa74.min.js"></script><script src="js/bundle.24f6f4760d8c66faaa74.min.js"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -23,6 +23,6 @@
|
||||
.rule-provider{position:relative;display:flex;flex-direction:column;font-size:16px;padding:20px;color:#546b87}.rule-provider-header{display:flex;align-items:center;justify-content:space-between}.rule-provider-header-part{display:flex;align-items:center}.rule-provider-name{width:120px;margin-right:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rule-provider-behavior{width:80px;margin:0 20px 0 12px;background-color:#2c8af8;color:#fff}.rule-provider-spinner{transform:scale(0.4)}.rule-provider-proxies{list-style:none}.rule-provider-item{box-shadow:0 0 24px 0 rgba(44,138,248,.2)}.rule-provider-item:hover{box-shadow:0 0 24px 0 rgba(84,117,154,.4)}.rule-provider-update{line-height:14px;font-size:14px}.rule-provider-icon{display:block;margin-left:20px;cursor:pointer}.rule-provider-icon.rule-provider-loading::before{color:#909399;cursor:not-allowed;-webkit-animation:spinner 2s infinite linear;animation:spinner 2s infinite linear}@media(max-width: 768px){.rule-provider-header{flex-direction:column;align-items:flex-start}.rule-provider-header-part{margin:6px 0}}
|
||||
.rules-card{display:flex;flex-direction:column;flex:1;min-height:700px;margin-top:10px;padding:0}.rules-card:focus{outline:none}.rules-card .rules{flex:1 0 auto}.rule-item{line-height:30px;padding:5px 0;height:50px;overflow:hidden;list-style:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom:1px solid rgba(228,234,239,.5)}.rule-item .rule-item-row{padding:5px 0}.rule-item .drag-handler{cursor:row-resize;margin:0 10px;display:flex;justify-content:center}.rule-item .drag-handler>i{font-weight:bold;color:#b7c5d6}.rule-item .rule-type{font-size:14px;color:#54759a}.rule-item .rule-type>i{margin-left:5px;color:#54759a}.rule-item .payload{font-size:14px;color:#54759a;cursor:pointer}.rule-item .rule-proxy{font-size:14px;color:#54759a}.rule-item .delete-btn{opacity:0;transition:all 300ms ease}.rule-item .delete-btn span{font-size:14px;color:#f56c6c;cursor:pointer}.rule-item:last-child{border-bottom:none}.rule-item:hover .delete-btn{opacity:1}.rule-proxy-option{display:flex;align-items:center;overflow:hidden}.rule-proxy-option .label{margin-right:5px;height:20px;line-height:20px;padding:0 8px;font-size:10px;border-radius:10px;color:#fff;background:#b7c5d6}.rule-proxy-option .value{line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
.settings-card{margin-top:10px;padding:20px 0}.settings-card .column{font-weight:bold;align-items:center}.settings-card .value-column{justify-content:flex-end}.settings-card .label{font-size:14px;color:#54759a}.settings-card .external-controller{font-size:14px;color:#54759a;display:flex;justify-content:flex-end;font-weight:normal;line-height:17px}.settings-card .external-controller .modify-btn{color:#2c8af8;cursor:pointer}.clash-version{position:relative;margin-top:10px;padding:20px 45px;display:flex}.clash-version .check-icon{width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg, #57befc, #2c8af8);display:flex;justify-content:center;align-items:center}.clash-version .check-icon>i{transform:scale(0.5);color:#fff;font-weight:bold}.clash-version .version-info{margin-left:10px;font-size:14px;line-height:24px;color:#54759a}.clash-version .check-update-btn{position:absolute;right:45px;font-size:14px;line-height:24px;color:#b7c5d6;cursor:pointer;transition:all 150ms ease}.clash-version .check-update-btn:hover{color:#54759a}@media(max-width: 768px){.settings-card .row{flex-direction:column;padding-top:0;padding-bottom:0}.settings-card .row>.column{width:100%;margin:10px 0}}
|
||||
.sidebar{position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:140px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sidebar-logo{margin-top:50px;width:60px;height:60px}.sidebar-menu{display:flex;flex-direction:column;flex:1;margin-top:12px}.sidebar-menu .item{display:block;margin-top:18px}.sidebar-menu .item>a{display:block;width:120px;height:36px;line-height:36px;font-size:14px;border-radius:18px;text-align:center}.sidebar-menu .item>a,.sidebar-menu .item a:active,.sidebar-menu .item a:visited{color:#909399;text-decoration:none}.sidebar-menu .item>a.active{background:linear-gradient(135deg, #57befc, #2c8af8);color:#fff;box-shadow:0 2px 8px rgba(44,138,248,.5)}.sidebar-version{display:flex;flex-direction:column;align-items:center;padding-bottom:20px}.sidebar-version-label{font-size:14px;color:#2c8af8;text-shadow:0 2px 6px rgba(44,138,248,.4)}.sidebar-version-text{text-align:center;font-size:14px;margin:8px 0;color:#54759a}@media(max-width: 768px){.sidebar{width:100%;height:60px;flex-direction:row;background:#f4f5f6;z-index:10}.sidebar-logo{margin:0 15px;width:36px;height:36px}.sidebar-menu{flex:1;flex-direction:row;justify-content:center;margin-top:0;overflow-x:scroll;padding:10px}.sidebar-menu::-webkit-scrollbar{display:none}.sidebar-menu .item{margin:0 3px}.sidebar-menu .item>a{width:80px;height:32px;line-height:32px}.sidebar-menu .item.no-mobile{display:none}.sidebar-version{display:none}}
|
||||
.sidebar{position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:160px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sidebar-logo{margin-top:50px;width:60px;height:60px}.sidebar-menu{display:flex;flex-direction:column;flex:1;margin-top:12px}.sidebar-menu .item{display:block;margin-top:18px}.sidebar-menu .item>a{display:block;width:120px;height:36px;line-height:36px;font-size:14px;border-radius:18px;text-align:center}.sidebar-menu .item>a,.sidebar-menu .item a:active,.sidebar-menu .item a:visited{color:#909399;text-decoration:none}.sidebar-menu .item>a.active{background:linear-gradient(135deg, #57befc, #2c8af8);color:#fff;box-shadow:0 2px 8px rgba(44,138,248,.5)}.sidebar-version{display:flex;flex-direction:column;align-items:center;padding-bottom:20px}.sidebar-version-label{font-size:14px;color:#2c8af8;text-shadow:0 2px 6px rgba(44,138,248,.4)}.sidebar-version-text{text-align:center;font-size:14px;margin:8px 0;color:#54759a}@media(max-width: 768px){.sidebar{width:100%;height:60px;flex-direction:row;background:#f4f5f6;z-index:10}.sidebar-logo{margin:0 15px;width:36px;height:36px}.sidebar-menu{flex:1;flex-direction:row;justify-content:center;margin-top:0;overflow-x:scroll;padding:10px}.sidebar-menu::-webkit-scrollbar{display:none}.sidebar-menu .item{margin:0 3px}.sidebar-menu .item>a{width:80px;height:32px;line-height:32px}.sidebar-menu .item.no-mobile{display:none}.sidebar-version{display:none}}
|
||||
.connections-card{display:flex;flex-direction:column;flex:1;margin-top:10px;padding:0;overflow:hidden}.connections-card .connections{display:flex;flex-direction:column;width:100%;flex-grow:1;flex-basis:0;overflow:auto}.connections-card .connections-body{flex:1 0 auto}.connections-card .connections-th{position:relative;text-align:center;color:#909399;background:#f3f6f9;height:30px;line-height:30px;font-weight:500;font-size:14px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.connections-card .connections-resizer{position:absolute;opacity:0;right:-10px;top:8px;bottom:8px;width:20px;transition:opacity .3s ease;z-index:10;font-size:14px;font-weight:300}.connections-card .connections-resizer::before{content:"";display:block;position:absolute;left:10px;transform:translateX(-2px);width:2px;height:100%;background-color:rgba(144,147,153,.6)}.connections-card .connections-header{position:-webkit-sticky;position:sticky;top:0;white-space:nowrap}.connections-card .connections-header:hover .connections-resizer{opacity:1}.connections-card .connetions-item{height:36px}.connections-card .connections-block{display:flex;align-items:center;font-size:14px;line-height:36px;padding:0 10px;color:#54759a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.connections-card .connections-block.center{text-align:center}.connections-card .connections-block.completed{background-color:#e9eef4;color:rgba(84,117,154,.5)}.connections-filter{color:#2c8af8;font-size:14px;line-height:20px;margin-left:15px;text-shadow:0 0 6px rgba(44,138,248,.4);cursor:pointer}.connections-filter.dangerous{color:#f56c6c;text-shadow:0 0 6px rgba(87,190,252,.2)}.connections-filter.total{flex:1;cursor:unset}
|
||||
.external-controller .row{padding:0}.external-controller .alert{margin:10px 0}.external-controller .title,.external-controller .form{margin:15px 0}.external-controller .title{margin-top:15px;font-size:14px;font-weight:bold}@media(max-width: 768px){.external-controller .row{flex-direction:column;align-items:flex-start}.external-controller .title{margin:5px 0}.external-controller .form{margin:5px 0}.external-controller .column{width:100%}.external-controller .alert{display:none}}
|
||||
@ -360,7 +360,7 @@ EOF
|
||||
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"./dashboard\"" $TEMP_FILE 2>/dev/null
|
||||
sed -i "external-ui: \"/usr/share/clash/dashboard\"/a\ " $TEMP_FILE 2>/dev/null
|
||||
sed -i " /a\ " $TEMP_FILE 2>/dev/null
|
||||
else
|
||||
@ -368,7 +368,7 @@ EOF
|
||||
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"./dashboard\"" $TEMP_FILE 2>/dev/null
|
||||
fi
|
||||
sed -i '/#config-start-here/ d' $TEMP_FILE 2>/dev/null
|
||||
|
||||
|
||||
@ -727,7 +727,7 @@ EOF
|
||||
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"./dashboard\"" $TEMP_FILE 2>/dev/null
|
||||
sed -i "external-ui: \"/usr/share/clash/dashboard\"/a\ " $TEMP_FILE 2>/dev/null
|
||||
sed -i " /a\ " $TEMP_FILE 2>/dev/null
|
||||
else
|
||||
@ -735,7 +735,7 @@ EOF
|
||||
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $TEMP_FILE 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"./dashboard\"" $TEMP_FILE 2>/dev/null
|
||||
fi
|
||||
sed -i '/#config-start-here/ d' $TEMP_FILE 2>/dev/null
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ if [ "$core" -eq 1 ] || [ "$core" -eq 2 ];then
|
||||
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"./dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
|
||||
|
||||
else
|
||||
@ -89,7 +89,7 @@ if [ "$core" -eq 1 ] || [ "$core" -eq 2 ];then
|
||||
sed -i "/mode: Rule/a\log-level: ${log_level}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"./dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
|
||||
fi
|
||||
sed -i '/#=============/ d' $CONFIG_YAML 2>/dev/null
|
||||
@ -138,14 +138,14 @@ if [ "${core}" -eq 3 ] || [ "${core}" -eq 4 ];then
|
||||
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"./dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
|
||||
else
|
||||
sed -i "/allow-lan: ${allow_lan}/a\mode: Rule" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/mode: Rule/a\log-level: ${log_level}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"./dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
|
||||
fi
|
||||
sed -i '/#=============/ d' $CONFIG_YAML 2>/dev/null
|
||||
@ -192,14 +192,14 @@ else
|
||||
sed -i "/mode: ${p_mode}/a\log-level: ${log_level}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"./dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
|
||||
else
|
||||
sed -i "/allow-lan: ${allow_lan}/a\mode: Rule" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/mode: Rule/a\log-level: ${log_level}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/log-level: ${log_level}/a\external-controller: 0.0.0.0:${dash_port}" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/external-controller: 0.0.0.0:${dash_port}/a\secret: \"${da_password}\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"/usr/share/clash/dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i "/secret: \"${da_password}\"/a\external-ui: \"./dashboard\"" $CONFIG_YAML 2>/dev/null
|
||||
sed -i -e "\$a " $CONFIG_YAML 2>/dev/null
|
||||
fi
|
||||
sed -i '/#=============/ d' $CONFIG_YAML 2>/dev/null
|
||||
|
||||
Loading…
Reference in New Issue
Block a user