Skip to content

Commit

Permalink
luci-app-ssr-plus: Fix when SOCKS5 is global server node cannot dis…
Browse files Browse the repository at this point in the history
…abled issue.
  • Loading branch information
zxlhhyccc committed Feb 13, 2025
1 parent b0bd48e commit 9d0589a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/advanced.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ o.rmempty = false
o.cfgvalue = function(self, section)
local enabled = m:get(section, "enabled")
if enabled == "0" then
return m:get(section, "old_server") or "same"
return m:get(section, "old_server")
end
return Value.cfgvalue(self, section) or "same" -- Default to `same` when enabled
return Value.cfgvalue(self, section) -- Default to `same` when enabled
end

o.write = function(self, section, value)
local enabled = m:get(section, "enabled")
if enabled == "0" then
local old_server = Value.cfgvalue(self, section) or "same"
local old_server = Value.cfgvalue(self, section)
if old_server ~= "nil" then
m:set(section, "old_server", old_server)
end
Expand Down

0 comments on commit 9d0589a

Please sign in to comment.