openclash/luci-app-openclash/luasrc/model/cbi/openclash/other-file-edit.lua
xiexiaobao 6909ba0cea
Some checks failed
Clean jsDelivr Cache / jsDelivr (push) Has been cancelled
Sync Core and Package to Master When release / Sync_core_to_master (push) Has been cancelled
Compile The New Clash Core / Get-Commit-id (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[abi:1 goarch:loong64 goos:linux output:loong64-abi1 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goamd64:v1 goarch:amd64 goos:linux output:amd64-compatible upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goamd64:v1 goarch:amd64 goos:linux output:amd64-v1 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goamd64:v2 goarch:amd64 goos:linux output:amd64-v2 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goamd64:v3 goarch:amd64 goos:linux output:amd64 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goamd64:v3 goarch:amd64 goos:linux output:amd64-v3 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:386 goos:linux output:386 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:arm goarm:5 goos:linux output:armv5 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:arm goarm:6 goos:linux output:armv6 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:arm goarm:7 goos:linux output:armv7 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:arm64 goos:linux output:arm64 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:loong64 goos:linux output:loong64-abi2 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:mips gomips:hardfloat goos:linux output:mips-hardfloat upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:mips gomips:softfloat goos:linux output:mips-softfloat upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:mips64 goos:linux output:mips64 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:mips64le goos:linux output:mips64le upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:mipsle gomips:hardfloat goos:linux output:mipsle-hardfloat upxflag:--best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:mipsle gomips:softfloat goos:linux output:mipsle-softfloat upxflag:--best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:riscv64 goos:linux output:riscv64 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:meta-core goversion:1.26 repo:MetaCubeX/mihomo src:metacubex_src type:meta version_prefix:alpha-g], map[goarch:s390x goos:linux output:s390x upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[abi:1 goarch:loong64 goos:linux output:loong64-abi1 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goamd64:v1 goarch:amd64 goos:linux output:amd64-compatible upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goamd64:v1 goarch:amd64 goos:linux output:amd64-v1 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goamd64:v2 goarch:amd64 goos:linux output:amd64-v2 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goamd64:v3 goarch:amd64 goos:linux output:amd64 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goamd64:v3 goarch:amd64 goos:linux output:amd64-v3 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:386 goos:linux output:386 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:arm goarm:5 goos:linux output:armv5 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:arm goarm:6 goos:linux output:armv6 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:arm goarm:7 goos:linux output:armv7 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:arm64 goos:linux output:arm64 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:loong64 goos:linux output:loong64-abi2 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:mips gomips:hardfloat goos:linux output:mips-hardfloat upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:mips gomips:softfloat goos:linux output:mips-softfloat upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:mips64 goos:linux output:mips64 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:mips64le goos:linux output:mips64le upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:mipsle gomips:hardfloat goos:linux output:mipsle-hardfloat upxflag:--best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:mipsle gomips:softfloat goos:linux output:mipsle-softfloat upxflag:--best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:riscv64 goos:linux output:riscv64 upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Compile_Core (map[artifact:smart-core goversion:1.26 repo:vernesong/mihomo src:vernesong_src type:smart version_prefix:alpha-smart-g], map[goarch:s390x goos:linux output:s390x upxflag:--lzma --best]) (push) Has been cancelled
Compile The New Clash Core / Publish (push) Has been cancelled
Trim Core and Package History / trim (core) (push) Has been cancelled
Trim Core and Package History / trim (package) (push) Has been cancelled
Delete old workflow runs / del_runs (push) Has been cancelled
OpenClash v0.47.116
2026-07-10 16:46:39 +08:00

60 lines
1.4 KiB
Lua

local NXFS = require "nixio.fs"
local SYS = require "luci.sys"
local HTTP = require "luci.http"
local fs = require "luci.openclash"
local DISP = require "luci.dispatcher"
local file_path = fs.get_file_path_from_request()
if not file_path then
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "%s") % arg[1])
return
end
m = Map("openclash", translate("File Edit"))
m.pageaction = false
m.redirect = DISP.build_url("admin", "services", "openclash", "other-file-edit", "%s") % arg[1].."?file="..HTTP.urlencode(file_path)
s = m:section(TypedSection, "openclash")
s.anonymous = true
s.addremove=false
o = s:option(TextValue, "edit_file")
o.rows = 50
o.wrap = "off"
function o.write(self, section, value)
if value then
value = value:gsub("\r\n?", "\n")
local old_value = fs.readfile(file_path)
if value ~= old_value then
fs.writefile(file_path, value)
end
end
end
function o.cfgvalue(self, section)
return fs.readfile(file_path) or ""
end
local t = {
{Commit, Back}
}
a = m:section(Table, t)
o = a:option(Button, "Commit", " ")
o.inputtitle = translate("Commit Settings")
o.inputstyle = "apply"
o.write = function()
HTTP.redirect(m.redirect)
end
o = a:option(Button,"Back", " ")
o.inputtitle = translate("Back Settings")
o.inputstyle = "reset"
o.write = function()
HTTP.redirect(DISP.build_url("admin", "services", "openclash", "%s") % arg[1])
end
m:append(Template("openclash/config_editor"))
m:append(Template("openclash/toolbar_show"))
return m