mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-02 06:30:53 +03:00
Update zapret-tpws.lua
fix return value
This commit is contained in:
parent
bc4ed19080
commit
bbb337e5d5
@ -1,5 +1,4 @@
|
|||||||
m = Map("zapret", translate("TPWS Proxy Settings"))
|
m = Map("zapret", translate("TPWS Proxy Settings"))c = m:section(NamedSection, "tpws", "zapret", translate("Configuration"))
|
||||||
c = m:section(NamedSection, "tpws", "zapret", translate("Configuration"))
|
|
||||||
opt = c:option(Value, "opts", translate("TPWS Options"))
|
opt = c:option(Value, "opts", translate("TPWS Options"))
|
||||||
opt.placeholder = "--split-pos=2"
|
opt.placeholder = "--split-pos=2"
|
||||||
function opt.validate(self, value)
|
function opt.validate(self, value)
|
||||||
@ -12,11 +11,11 @@ function opt.validate(self, value)
|
|||||||
-- Check each word
|
-- Check each word
|
||||||
for _, word in ipairs(words) do
|
for _, word in ipairs(words) do
|
||||||
if not word:sub(1, 2) == "--" then
|
if not word:sub(1, 2) == "--" then
|
||||||
return false, translate("Error: Not all words start with double minuses.")
|
return nil, translate("Error: Not all words start with double minuses.")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return value
|
||||||
end
|
end
|
||||||
|
|
||||||
b = c:option(Flag, "block_quic", "Block QUIC", translate("Block QUIC protocol to come outside"))
|
b = c:option(Flag, "block_quic", "Block QUIC", translate("Block QUIC protocol to come outside"))
|
||||||
|
Loading…
Reference in New Issue
Block a user