mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 02:51:50 +00:00
Update wizard
This commit is contained in:
parent
06e3d7f63e
commit
ec93142814
2 changed files with 13 additions and 4 deletions
|
@ -71,13 +71,12 @@ function interfaces_status()
|
||||||
-- Check that requester is in same network
|
-- Check that requester is in same network
|
||||||
mArray.openmptcprouter["service_addr"] = uci:get("shadowsocks", "proxy", "server") or "0.0.0.0"
|
mArray.openmptcprouter["service_addr"] = uci:get("shadowsocks", "proxy", "server") or "0.0.0.0"
|
||||||
mArray.openmptcprouter["local_addr"] = uci:get("network", "lan", "ipaddr")
|
mArray.openmptcprouter["local_addr"] = uci:get("network", "lan", "ipaddr")
|
||||||
mArray.openmptcprouter["wan_addr"] = "0.0.0.0"
|
|
||||||
|
|
||||||
-- wanaddr
|
-- wanaddr
|
||||||
mArray.openmptcprouter["wan_addr"] = sys.exec("wget -4 -qO- -T 1 http://ip.openmptcprouter.com")
|
mArray.openmptcprouter["wan_addr"] = sys.exec("wget -4 -qO- -T 1 http://ip.openmptcprouter.com")
|
||||||
|
|
||||||
mArray.openmptcprouter["remote_addr"] = luci.http.getenv("REMOTE_ADDR") or ""
|
mArray.openmptcprouter["remote_addr"] = luci.http.getenv("REMOTE_ADDR") or ""
|
||||||
mArray.openmptcprouter["remote_from_lease"] = false
|
mArray.openmptcprouter["remote_from_lease"] = false
|
||||||
local leases=tools.dhcp_leases()
|
local leases=tools.dhcp_leases()
|
||||||
for _, value in pairs(leases) do
|
for _, value in pairs(leases) do
|
||||||
if value["ipaddr"] == mArray.openmptcprouter["remote_addr"] then
|
if value["ipaddr"] == mArray.openmptcprouter["remote_addr"] then
|
||||||
|
|
|
@ -47,18 +47,28 @@
|
||||||
<label class="cbi-value-title"><%:IPv4 address%></label>
|
<label class="cbi-value-title"><%:IPv4 address%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="text" name="cbid.network.<%=ifname%>.ipaddr" class="cbi-input-text" value="<%=uci:get("network",ifname,"ipaddr")%>" data-type="ip4addr">
|
<input type="text" name="cbid.network.<%=ifname%>.ipaddr" class="cbi-input-text" value="<%=uci:get("network",ifname,"ipaddr")%>" data-type="ip4addr">
|
||||||
|
<br />
|
||||||
|
<div class="cbi-value-description">
|
||||||
|
<span class="cbi-value-helpicon"><img src="/luci-static/resources/cbi/help.gif" alt="help" /></span>
|
||||||
|
<%:Set an IP in the same network as the modem%>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:IPv4 netmask%></label>
|
<label class="cbi-value-title"><%:IPv4 netmask%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="text" name="cbid.network.<%=ifname%>.netmask" class="cbi-input-text" value="<%=uci:get("network",ifname,"netmask")%>" data-type="ip4addr">
|
<input type="text" name="cbid.network.<%=ifname%>.netmask" class="cbi-input-text" value="<%=uci:get("network",ifname,"netmask") or "255.255.255.0"%>" data-type="ip4addr">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:IPv4 gateway%></label>
|
<label class="cbi-value-title"><%:IPv4 gateway%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="text" name="cbid.network.<%=ifname%>.gateway" class="cbi-input-text" value="<%=uci:get("network",ifname,"gateway")%>" data-type="ip4addr">
|
<input type="text" name="cbid.network.<%=ifname%>.gateway" class="cbi-input-text" value="<%=uci:get("network",ifname,"gateway")%>" data-type="ip4addr">
|
||||||
|
<br />
|
||||||
|
<div class="cbi-value-description">
|
||||||
|
<span class="cbi-value-helpicon"><img src="/luci-static/resources/cbi/help.gif" alt="help" /></span>
|
||||||
|
<%:Set here IP of the modem%>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%
|
<%
|
||||||
|
|
Loading…
Reference in a new issue