2018-04-12 13:18:56 +00:00
< %+header%>
< % if stderr and #stderr > 0 then %>< pre class = "error" > < %=pcdata(stderr)%>< / pre > < % end %>
< form class = "inline" method = "post" action = "<%=url('admin/system/openmptcprouter/settings_add')%>" >
< div class = "cbi-map" >
< h2 name = "content" > < %:Advanced Settings%>< / h2 >
< fieldset class = "cbi-section" id = "networks" >
2018-11-27 14:21:47 +00:00
< legend > < %:VPS settings%>< / legend >
< div class = "cbi-section-descr" > < / div >
< div class = "cbi-value" >
< label class = "cbi-value-title" > < %:Redirects all ports from VPS to OpenMPTCProuter%>< / label >
< div class = "cbi-value-field" >
< input type = "checkbox" name = "redirect_ports" class = "cbi-input-checkbox" value = "1" < % if luci . model . uci . cursor ( ) :get ( " openmptcprouter " , " vps " , " redirect_ports " ) = = " 1 " then % > checked< % end %>>
< / div >
< / div >
< div class = "cbi-value" >
< label class = "cbi-value-title" > < %:Enable ShadowSocks OBFS%>< / label >
< div class = "cbi-value-field" >
< input type = "checkbox" name = "obfs" class = "cbi-input-checkbox" value = "1" < % if luci . model . uci . cursor ( ) :get ( " shadowsocks-libev " , " tracker " , " obfs " ) = = " 1 " then % > checked< % end %>>
< br / >
< div class = "cbi-value-description" >
< %:OBFS will be enabled on both side%>
< / div >
< / div >
< / div >
< / fieldset >
< fieldset class = "cbi-section" id = "networks" >
2018-04-12 13:18:56 +00:00
< 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 + " ) ) % > ">
< / div >
< / div >
2018-07-22 13:23:02 +00:00
< 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 + " ) ) % > ">
< / div >
< / div >
2018-04-12 13:18:56 +00:00
< div class = "cbi-value" >
< label class = "cbi-value-title" > < %:Disable IPv6%>< / label >
< div class = "cbi-value-field" >
2018-04-13 12:26:50 +00:00
< input type = "checkbox" name = "disable_ipv6" class = "cbi-input-checkbox" value = "1" < % if tonumber ( ( luci . sys . exec ( " sysctl net . ipv6 . conf . all . disable_ipv6 " ) ) :match ( " % d + " ) ) = = 1 then % > checked< % end %>>
2018-04-12 13:18:56 +00:00
< / div >
< / div >
2018-10-31 11:39:40 +00:00
< div class = "cbi-value" >
< label class = "cbi-value-title" > < %:Dynamic master interface%>< / label >
< div class = "cbi-value-field" >
< input type = "checkbox" name = "master_type" class = "cbi-input-checkbox" value = "dynamic" < % if luci . model . uci . cursor ( ) :get ( " openmptcprouter " , " settings " , " master " ) = = " dynamic " then % > checked< % end %>>
2018-10-31 11:49:36 +00:00
< br / >
< div class = "cbi-value-description" >
< %:Connection with lowest RTT is used as master interface%>
< / div >
2018-07-09 12:55:42 +00:00
< / div >
< / div >
2018-04-12 13:18:56 +00:00
< / fieldset >
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 %>
2018-04-12 13:18:56 +00:00
< / div >
< div class = "cbi-page-actions" >
< input type = "hidden" name = "token" value = "<%=token%>" / >
2018-07-25 12:44:21 +00:00
< 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')%>'" / >
2018-04-12 13:18:56 +00:00
< / div >
< / form >
< %+footer%>