1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge pull request #343 from Ysurac/develop

sync
This commit is contained in:
suyuan 2023-08-12 11:13:19 +08:00 committed by GitHub
commit 9c971aed67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 147 additions and 21 deletions

View file

@ -556,17 +556,22 @@ function wizard_add()
vpn_intf = "bonding-omrvpn"
ucic:set("network","omrvpn","proto","bonding")
end
if downloadmax ~= 0 and uploadmax ~= 0 then
--ucic:set("sqm","omrvpn","enabled","1")
ucic:set("sqm","omrvpn","max_download",downloadmax)
ucic:set("sqm","omrvpn","max_upload",uploadmax)
ucic:set("sqm","omrvpn","download",math.ceil(downloadmax*50/100))
ucic:set("sqm","omrvpn","min_download",math.ceil(downloadmax*8/100))
ucic:set("sqm","omrvpn","upload",math.ceil(uploadmax*50/100))
ucic:set("sqm","omrvpn","min_upload",math.ceil(uploadmax*8/100))
else
ucic:set("sqm","omrvpn","enabled","0")
end
--if downloadmax ~= 0 and uploadmax ~= 0 then
-- ucic:set("sqm","omrvpn","enabled","1")
-- ucic:set("sqm","omrvpn","max_download",downloadmax)
-- ucic:set("sqm","omrvpn","max_upload",uploadmax)
-- ucic:set("sqm","omrvpn","download",math.ceil(downloadmax*50/100))
-- ucic:set("sqm","omrvpn","min_download",math.ceil(downloadmax*8/100))
-- ucic:set("sqm","omrvpn","upload",math.ceil(uploadmax*50/100))
-- ucic:set("sqm","omrvpn","min_upload",math.ceil(uploadmax*8/100))
--else
-- ucic:set("sqm","omrvpn","enabled","0")
--end
ucic:set("sqm","omrvpn","enabled","1")
ucic:set("sqm","omrvpn","download","0")
ucic:set("sqm","omrvpn","upload","0")
if vpn_intf ~= "" then
ucic:set("network","omrvpn","device",vpn_intf)
ucic:set("sqm","omrvpn","interface",vpn_intf)