1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 11:01:50 +00:00
openmptcprouter-feeds/luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm

492 lines
23 KiB
HTML
Raw Normal View History

<%+header%>
<% if stderr and #stderr > 0 then %><pre class="error"><%=pcdata(stderr)%></pre><% end %>
<%
local latest_omr_version=luci.model.uci.cursor():get("openmptcprouter","latest_versions","vps")
2020-11-22 14:51:31 +00:00
local ucic = luci.model.uci.cursor()
menuentry = ucic:get("openmptcprouter","settings","menu") or "openmptcprouter"
omr_test = false
uci:foreach("openmptcprouter","server", function(s)
servername = s[".name"]
local omr_version=luci.model.uci.cursor():get("openmptcprouter",servername,"omr_version")
if omr_version ~= "" and latest_omr_version ~= "" and omr_version ~= latest_omr_version then
omr_test = true
end
end)
if omr_test == true then
%>
2020-11-22 14:51:31 +00:00
<form class="inline" method="post" action="<%=url('admin/system/' .. menuentry:lower() .. '/update_vps')%>">
<div class="cbi-map">
<h2 name="content"><%:Update server%></h2>
<fieldset class="cbi-section" id="update">
<div class="cbi-section-descr"><%:Update remotly servers to latest version and reboot them.%> <b><%:Beta%></b></div>
<div class="cbi-value">
2019-07-15 20:36:24 +00:00
<label class="cbi-value-title"><%:Update server%></label>
<div class="cbi-value-field">
<input type="hidden" name="token" value="<%=token%>" />
<input type="hidden" name="server" value="<%=servername%>" />
<input type="hidden" name="flash" value="1" />
<input type="submit" name="update_vps" class="cbi-button cbi-button-apply" value="<%:Update%>">
</div>
</div>
</div>
</form>
<%
end
%>
2020-10-01 15:16:14 +00:00
<hr />
2020-11-22 14:51:31 +00:00
<form class="inline" method="post" action="<%=url('admin/system/' .. menuentry:lower() .. '/settings_add')%>">
<div class="cbi-map">
<h2 name="content"><%:Advanced Settings%></h2>
<fieldset class="cbi-section" id="networks">
<legend><%:Server settings%></legend>
<%
uci:foreach("openmptcprouter","server", function(s)
servername = s[".name"]
%>
<h3><%=servername%></h3>
<div class="cbi-section-node">
<div class="cbi-section-descr"></div>
<div class="cbi-value">
2019-07-15 20:36:24 +00:00
<label class="cbi-value-title"><%:Redirects all ports from server to this router%></label>
2019-01-07 06:54:18 +00:00
<div class="cbi-value-field">
<input type="hidden" name="server.<%=servername%>" value="<%=servername%>" />
<input type="checkbox" name="redirect_ports.<%=servername%>" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter",servername,"redirect_ports") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:You shouldn't do that and you should redirect only needed ports%>
</div>
</div>
</div>
2019-10-01 17:43:36 +00:00
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable ports redirection defined in firewall from server to this router%></label>
<div class="cbi-value-field">
<input type="hidden" name="server.<%=servername%>" value="<%=servername%>" />
<input type="checkbox" name="nofwredirect.<%=servername%>" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter",servername,"nofwredirect") == "1" then %>checked<% end %>>
</div>
</div>
</div>
<%
end)
%>
<%
local obfs_installed = nixio.fs.access("/usr/bin/obfs-local")
2019-11-21 08:19:16 +00:00
local v2ray_installed = nixio.fs.access("/usr/bin/v2ray-plugin")
if obfs_installed or v2ray_installed then
%>
<div class="cbi-value">
2019-01-26 12:51:53 +00:00
<label class="cbi-value-title"><%:Enable ShadowSocks Obfuscating%></label>
<div class="cbi-value-field">
2019-11-26 18:17:41 +00:00
<input type="checkbox" name="obfs" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("shadowsocks-libev","sss0","obfs") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
2019-01-26 12:51:53 +00:00
<%:Obfuscating will be enabled on both side%>
</div>
2019-01-26 12:51:53 +00:00
</div>
2019-01-28 17:28:56 +00:00
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Obfuscating plugin%></label>
2019-01-26 12:51:53 +00:00
<div class="cbi-value-field">
<select class="cbi-input-select" name="obfs_plugin">
<%
if v2ray_installed then
%>
2019-11-26 18:17:41 +00:00
<option value="v2ray" <% if luci.model.uci.cursor():get("shadowsocks-libev","sss0","obfs_plugin") == "v2ray" then %>selected="selected"<% end %>>v2ray</option>
<%
end
if obfs_installed then
%>
2021-02-16 09:46:45 +00:00
<option value="obfs" <% if luci.model.uci.cursor():get("shadowsocks-libev","sss0","obfs_plugin") == "obfs" then %>selected="selected"<% end %>>simple-obfs</option>
<%
end
%>
2019-01-26 12:51:53 +00:00
</select>
2019-04-15 20:14:35 +00:00
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Obfuscating type%></label>
<div class="cbi-value-field">
<select class="cbi-input-select" name="obfs_type">
2021-03-03 10:31:47 +00:00
<option value="http" <% if luci.model.uci.cursor():get("shadowsocks-libev","tracker_sss0","obfs_type") == "http" then %>selected="selected"<% end %>>http</option>
<option value="tls" <% if luci.model.uci.cursor():get("shadowsocks-libev","tracker_sss0","obfs_type") == "tls" then %>selected="selected"<% end %>>tls</option>
2019-04-15 20:14:35 +00:00
</select>
2019-01-26 12:51:53 +00:00
</div>
</div>
<%
end
%>
</fieldset>
2020-10-01 15:16:14 +00:00
<hr />
<fieldset class="cbi-section" id="networks">
<legend><%:Networks settings%></legend>
<div class="cbi-section-descr"></div>
<div class="cbi-value">
<label class="cbi-value-title"><%:IPv4 TCP Keepalive time%></label>
<div class="cbi-value-field">
<input type="text" name="tcp_keepalive_time" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.tcp_keepalive_time")):match(" %d+"))%>">
<br />
<div class="cbi-value-description">
<%:How often TCP sends out keepalive messages when keepalive is enabled.%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:IPv4 TCP FIN timeout%></label>
<div class="cbi-value-field">
<input type="text" name="tcp_fin_timeout" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.tcp_fin_timeout")):match(" %d+"))%>">
<br />
<div class="cbi-value-description">
<%:The length of time an orphaned (no longer referenced by any application) connection will remain in the FIN_WAIT_2 state before it is aborted at the local end.%>
</div>
</div>
</div>
2018-12-23 13:14:28 +00:00
<div class="cbi-value">
<label class="cbi-value-title"><%:IPv4 TCP SYN retries%></label>
<div class="cbi-value-field">
<input type="text" name="tcp_syn_retries" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.tcp_syn_retries")):match(" %d+"))%>">
<br />
<div class="cbi-value-description">
<%:Number of times initial SYNs for an active TCP connection attempt will be retransmitted.%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:IPv4 TCP SYN retries1%></label>
<div class="cbi-value-field">
<input type="text" name="tcp_retries1" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.tcp_retries1")):match(" %d+"))%>">
<br />
<div class="cbi-value-description">
<%:This value influences the time, after which TCP decides, that something is wrong due to unacknowledged RTO retransmissions, and reports this suspicion to the network layer.%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:IPv4 TCP SYN retries2%></label>
<div class="cbi-value-field">
<input type="text" name="tcp_retries2" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.tcp_retries2")):match(" %d+"))%>">
<br />
<div class="cbi-value-description">
<%:This value influences the timeout of an alive TCP connection, when RTO retransmissions remain unacknowledged.%>
</div>
2018-12-23 13:14:28 +00:00
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:IPv4 TCP Fast Open%></label>
<div class="cbi-value-field">
<input type="text" name="tcp_fastopen" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.tcp_fastopen")):match(" %d+"))%>">
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:IPv4 IP default TTL%></label>
<div class="cbi-value-field">
<input type="text" name="ip_default_ttl" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.ip_default_ttl")):match(" %d+"))%>">
</div>
</div>
<div class="cbi-value">
2019-02-05 20:06:16 +00:00
<label class="cbi-value-title"><%:Enable IPv6%></label>
<div class="cbi-value-field">
2019-02-11 20:11:34 +00:00
<input type="checkbox" name="enableipv6" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disable_ipv6") == "0" then %>checked<% end %>>
</div>
</div>
<div class="cbi-value">
2024-09-18 17:36:14 +00:00
<label class="cbi-value-title"><%:Disable 6in4%></label>
2024-05-24 12:12:27 +00:00
<div class="cbi-value-field">
2024-09-18 17:36:14 +00:00
<input type="checkbox" name="enable6in4" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disable_6in4") == "1" then %>checked<% end %>>
2024-05-24 12:12:27 +00:00
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable external check%></label>
<div class="cbi-value-field">
<input type="checkbox" name="externalcheck" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","external_check") == "0" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:When enable check are done on external sites to get each WAN IP and the IP used to go outside.%>
</div>
</div>
</div>
2019-07-15 20:36:24 +00:00
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable TCP Fast Open%></label>
<div class="cbi-value-field">
<input type="checkbox" name="disablefastopen" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disable_fastopen") == "1" then %>checked<% end %>>
2019-07-15 20:36:24 +00:00
<br />
<div class="cbi-value-description">
2019-07-16 19:58:14 +00:00
<%:Disable TCP Fast Open on Linux and Shadowsocks configuration%>
2019-07-15 20:36:24 +00:00
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Enable TCP Low Latency%></label>
<div class="cbi-value-field">
<input type="checkbox" name="enablenodelay" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","enable_nodelay") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Optimize for latency instead of bandwidth%>
</div>
</div>
</div>
2022-05-18 19:06:09 +00:00
<div class="cbi-value">
<label class="cbi-value-title"><%:Enable SIP ALG%></label>
<div class="cbi-value-field">
<input type="checkbox" name="sipalg" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","sipalg") == "1" then %>checked<% end %>>
</div>
</div>
2020-10-19 14:19:46 +00:00
</fieldset>
<hr />
<fieldset class="cbi-section" id="other">
<legend><%:Other settings%></legend>
<div class="cbi-section-descr"></div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Save vnstats stats%></label>
<div class="cbi-value-field">
2020-08-26 08:45:09 +00:00
<input type="checkbox" name="savevnstat" class="cbi-input-checkbox" value="1" <% if luci.util.trim(luci.sys.exec("uci -q get openmptcprouter.settings.vnstat_backup")) == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Save vnstats statistics on disk%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable gateway ping%></label>
<div class="cbi-value-field">
<input type="checkbox" name="disablegwping" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disablegwping") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
2021-03-23 08:49:12 +00:00
<%:Disable gateway ping check in status page%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable server http test%></label>
<div class="cbi-value-field">
<input type="checkbox" name="disableserverhttptest" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disableserverhttptest") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
2022-05-29 18:49:43 +00:00
<%:Disable HTTP test on Server API%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:VPS checks timeout%></label>
<div class="cbi-value-field">
<input type="text" name="status_vps_timeout" class="cbi-input-text" value="<%=luci.model.uci.cursor():get("openmptcprouter","settings","status_vps_timeout")%>">
<br />
<div class="cbi-value-description">
<%:Timeout for VPS checks on status pages%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:WAN IPs retrieve timeout%></label>
<div class="cbi-value-field">
<input type="text" name="status_getip_timeout" class="cbi-input-text" value="<%=luci.model.uci.cursor():get("openmptcprouter","settings","status_getip_timeout")%>">
<br />
<div class="cbi-value-description">
<%:Timeout for retrieving WANs IP on status pages%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable interfaces auto rename%></label>
<div class="cbi-value-field">
<input type="checkbox" name="disableintfrename" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disableintfrename") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Disable renaming interfaces%>
</div>
</div>
</div>
2024-09-30 06:11:14 +00:00
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable ModemManager%></label>
<div class="cbi-value-field">
<input type="checkbox" name="disablemodemmanager" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disable_modemmanager") == "1" then %>checked<% end %>>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Shadowsocks UDP%></label>
<div class="cbi-value-field">
<input type="checkbox" name="shadowsocksudp" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","shadowsocksudp") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:When proxy shadowsocks is used, use it for UDP if VPN down%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:V2Ray/XRay UDP%></label>
<div class="cbi-value-field">
<input type="checkbox" name="v2rayudp" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("v2ray","main_transparent_proxy","redirect_udp") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:When proxy V2Ray/XRay VLESS, VMESS or Trojan is used, use it for UDP%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable default gateway%></label>
<div class="cbi-value-field">
<input type="checkbox" name="disabledefaultgw" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","defaultgw") == "0" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Disable default gateway, no internet if VPS are down%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable server ping%></label>
<div class="cbi-value-field">
<input type="checkbox" name="disableserverping" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disableserverping") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Disable server ping status check%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Restrict proxy to LAN zone%></label>
<div class="cbi-value-field">
<input type="checkbox" name="restricttolan" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","restrict_to_lan") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Authorize access to proxy only from LAN firewall zone%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable route loop detection%></label>
<div class="cbi-value-field">
<input type="checkbox" name="disableloopdetection" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disableloopdetection") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Disable route loop detection%>
</div>
</div>
</div>
2024-12-18 15:55:47 +00:00
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable OpenVPN multi clients%></label>
<div class="cbi-value-field">
<input type="checkbox" name="openvpnlb" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","openvpn_lb") == "0" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Disable OpenVPN multi clients to distribute connections and use more CPU cores%>
</div>
</div>
</div>
2020-08-19 13:44:52 +00:00
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable tracebox test%></label>
<div class="cbi-value-field">
<input type="checkbox" name="disabletracebox" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","tracebox") == "0" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Disable multipath test using tracebox%>
</div>
</div>
</div>
2021-05-28 15:48:24 +00:00
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable nDPI%></label>
<div class="cbi-value-field">
<input type="checkbox" name="ndpi" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","ndpi") == "0" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Disable nDPI, used for protocols in OMR-ByPass%>
</div>
</div>
</div>
2021-04-22 18:20:28 +00:00
<div class="cbi-value">
<label class="cbi-value-title"><%:Disable ModemManager%></label>
<div class="cbi-value-field">
2021-04-23 05:26:15 +00:00
<input type="checkbox" name="disablemodemmanager" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","modemmanager") == "0" then %>checked<% end %>>
2021-04-22 18:20:28 +00:00
<br />
<div class="cbi-value-description">
<%:Disable ModemManager%>
</div>
</div>
</div>
2020-07-10 13:45:17 +00:00
<div class="cbi-value">
<label class="cbi-value-title"><%:Debug%></label>
<div class="cbi-value-field">
<input type="checkbox" name="debug" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","debug") == "1" then %>checked<% end %>>
<br />
<div class="cbi-value-description">
<%:Enable debug logs%>
</div>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Master interface selection%></label>
<div class="cbi-value-field">
<select class="cbi-input-select" name="master_type">
<option value="change" <% if luci.model.uci.cursor():get("openmptcprouter","settings","master") == "change" then %>selected="selected"<% end %>><%:On wizard change%></option>
<option value="dynamic" <% if luci.model.uci.cursor():get("openmptcprouter","settings","master") == "dynamic" then %>selected="selected"<% end %>><%:Dynamic change%></option>
<option value="static" <% if luci.model.uci.cursor():get("openmptcprouter","settings","master") == "static" then %>selected="selected"<% end %>><%:No change%></option>
2020-03-27 09:25:51 +00:00
<option value="balancing" <% if luci.model.uci.cursor():get("openmptcprouter","settings","master") == "balancing" then %>selected="selected"<% end %>><%:Balancing%></option>
</select>
2018-07-09 12:55:42 +00:00
</div>
</div>
</fieldset>
<%
if nixio.fs.access("/lib/modules/" .. nixio.uname().release .. "/shortcut-fe.ko") then
%>
<hr />
<fieldset class="cbi-section" id="fe">
<legend><%:Qualcomm Shortcut FE driver%></legend>
<div class="cbi-section-descr"></div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Enable Fast Patch offloading for connections%></label>
<div class="cbi-value-field">
<input type="checkbox" name="sfe_enabled" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","sfe_enabled") == "1" then %>checked<% end %>>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Enable Bridge Acceleration%></label>
<div class="cbi-value-field">
<input type="checkbox" name="sfe_bridge" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","sfe_bridge") == "1" then %>checked<% end %>>
</div>
</div>
</fieldset>
<% end %>
2018-04-17 07:27:15 +00:00
<% if nixio.fs.access("/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq") then %>
<fieldset class="cbi-section" id="system">
<legend><%:Systems settings%></legend>
<div class="cbi-section-descr"></div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Minimum scaling CPU frequency%></label>
<div class="cbi-value-field">
2018-04-17 12:48:55 +00:00
<input type="text" name="scaling_min_freq" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq")):match("%d+"))%>">
2018-04-17 07:27:15 +00:00
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Maximum scaling CPU frequency%></label>
<div class="cbi-value-field">
2018-04-17 12:48:55 +00:00
<input type="text" name="scaling_max_freq" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq")):match("%d+"))%>">
2018-04-17 07:27:15 +00:00
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Scaling governor%></label>
<div class="cbi-value-field">
<select class="cbi-input-select" name="scaling_governor">
<%
2018-04-17 12:48:55 +00:00
governor=luci.util.trim(luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor"))
2018-04-17 07:27:15 +00:00
available_governors=luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors")
for gov in string.gmatch(available_governors, "[^%s]+") do
%>
2018-04-17 12:48:55 +00:00
<option value="<%=gov%>" <% if governor == gov then %>selected="selected"<% end %>><%=gov%></option>
2018-04-17 07:27:15 +00:00
<%
end
%>
</select>
</div>
</div>
</fieldset>
<% end %>
</div>
<div class="cbi-page-actions">
<input type="hidden" name="token" value="<%=token%>" />
<input class="cbi-button cbi-button-apply" type="submit" value="<%:Save & Apply%>" /> <input class="cbi-button cbi-button-reset" type="button" value="Reset" onclick="location.href='<%=url('admin/system/openmptcprouter/settings')%>'" />
</div>
</form>
<%+footer%>