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

Add back gateway for DHCP and fix get public IP and netstat

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-08-07 08:05:51 +02:00
parent 7165fb2df1
commit 35d65227ac
4 changed files with 29 additions and 8 deletions

View file

@ -1,5 +1,6 @@
<%#
Copyright 2010 Jo-Philipp Wich <jow@openwrt.org>
Copyright 2019 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter project
Licensed to the public under the Apache License 2.0.
-%>
@ -10,7 +11,7 @@ local fs = require "nixio.fs"
local has_ping6 = fs.access("/bin/ping6") or fs.access("/usr/bin/ping6")
local has_traceroute6 = fs.access("/bin/traceroute6") or fs.access("/usr/bin/traceroute6")
local has_speedtest = fs.access("/usr/sbin/speedtestc")
local has_curl = fs.access("/usr/bin/curl")
local has_wget = fs.access("/usr/bin/wget")
local has_netstat = fs.access("/bin/netstat")
local dns_host = luci.config.diag and luci.config.diag.dns or "dev.openwrt.org"
@ -103,14 +104,8 @@ local getip_host = luci.config.diag and luci.config.diag.getip or "ifconfig.co"
<input style="margin: 5px 0" type="text" value="<%=dns_host%>" name="nslookup" /><br />
<input type="button" value="<%:Nslookup%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.nslookup)" />
</div>
<% if has_speedtest and false then %>
<div class="td left">
<input style="margin: 5px 0" type="text" value="" name="speedtest" placeholder="alternate server" /><br />
<input type="button" value="<%:Speedtest%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.speedtest)" />
</div>
<% end %>
<% if has_curl then %>
<% if has_wget then %>
<div class="td left">
<input style="margin: 5px 0" type="hidden" value="<%=getip_host%>" name="getip" /><br />
<input type="button" value="<%:Get public IP%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.getip)" />