diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua (renamed from protocols/luci-proto-ipv6/luasrc/model/network/proto_aiccu.lua) | 16 | ||||
-rw-r--r-- | protocols/luci-proto-ipv6/Makefile | 2 | ||||
-rw-r--r-- | protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_aiccu.lua | 136 | ||||
-rw-r--r-- | protocols/luci-proto-ppp/luasrc/model/network/proto_ppp.lua | 8 |
4 files changed, 10 insertions, 152 deletions
diff --git a/protocols/luci-proto-ipv6/luasrc/model/network/proto_aiccu.lua b/protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua index e0d7fd3e21..b2454838f9 100644 --- a/protocols/luci-proto-ipv6/luasrc/model/network/proto_aiccu.lua +++ b/protocols/luci-proto-3g/luasrc/model/network/proto_3g.lua @@ -1,17 +1,17 @@ --- Copyright 2015 Paul Oranje <por@xs4all.nl> --- Licensed to the public under GPLv2 +-- Copyright 2018 Florian Eckert <fe@dev.tdt.de> +-- Licensed to the public under the Apache License 2.0. local netmod = luci.model.network local interface = luci.model.network.interface -local proto = netmod:register_protocol("aiccu") +local proto = netmod:register_protocol("3g") function proto.get_i18n(self) - return luci.i18n.translate("AICCU (SIXXS)") + return luci.i18n.translate("UMTS/GPRS/EV-DO") end function proto.ifname(self) - return "aiccu-" .. self.sid + return "3g-" .. self.sid end function proto.get_interface(self) @@ -19,11 +19,11 @@ function proto.get_interface(self) end function proto.is_installed(self) - return nixio.fs.access("/lib/netifd/proto/aiccu.sh") + return nixio.fs.access("/lib/netifd/proto/3g.sh") end function proto.opkg_package(self) - return "aiccu" + return "comgt" end function proto.is_floating(self) @@ -46,4 +46,4 @@ function proto.contains_interface(self, ifname) end end -netmod:register_pattern_virtual("^aiccu%-%w") +netmod:register_pattern_virtual("^3g%-%w") diff --git a/protocols/luci-proto-ipv6/Makefile b/protocols/luci-proto-ipv6/Makefile index 761ee2f9f5..b28c8d5895 100644 --- a/protocols/luci-proto-ipv6/Makefile +++ b/protocols/luci-proto-ipv6/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk -LUCI_TITLE:=Support for DHCPv6/6in4/6to4/6rd/DS-Lite/aiccu +LUCI_TITLE:=Support for DHCPv6/6in4/6to4/6rd/DS-Lite LUCI_DEPENDS:= PKG_LICENSE:=Apache-2.0 diff --git a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_aiccu.lua b/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_aiccu.lua deleted file mode 100644 index 7b5e6043cc..0000000000 --- a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_aiccu.lua +++ /dev/null @@ -1,136 +0,0 @@ --- Copyright 2015 Paul Oranje <por@xs4all.nl> --- Licensed to the public under the Apache License 2.0. - -local map, section, net = ... - --- config read by /lib/netifd/proto/aiccu.sh -local username, password, protocol, server, tunnelid, ip6prefix, requiretls, nat, heartbeat, - verbose, ntpsynctimeout, ip6addr, sourcerouting, defaultroute - --- generic parameters -local metric, ttl, mtu - - -username = section:taboption("general", Value, "username", - translate("Server username"), - translate("SIXXS-handle[/Tunnel-ID]")) -username.datatype = "string" - -password = section:taboption("general", Value, "password", - translate("Server password"), - translate("Server password, enter the specific password of the tunnel when the username contains the tunnel ID")) -password.datatype = "string" -password.password = true - - ---[[ SIXXS supports only TIC as tunnel broker protocol, no use setting it. -protocol = section:taboption("general", ListValue, "protocol", - translate("Tunnel broker protocol"), - translate("SIXXS supports TIC only, for static tunnels using IP protocol 41 (RFC4213) use 6in4 instead")) - -protocol:value("tic", "TIC") -protocol:value("tsp", "TSP") -protocol:value("l2tp", "L2TP") -protocol.default = "tic" -protocol.optional = true ---]] - - -server = section:taboption("general", Value, "server", - translate("Tunnel setup server"), - translate("Optional, specify to override default server (tic.sixxs.net)")) -server.datatype = "host(0)" -server.optional = true - - -tunnelid = section:taboption("general", Value, "tunnelid", - translate("Tunnel ID"), - translate("Optional, use when the SIXXS account has more than one tunnel")) -tunnelid.datatype = "string" -tunnelid.optional = true - - -local ip6prefix = section:taboption("general", Value, "ip6prefix", - translate("IPv6 prefix"), - translate("Routed IPv6 prefix for downstream interfaces")) -ip6prefix.datatype = "ip6addr" -ip6prefix.optional = true - - -heartbeat = s:taboption("general", ListValue, "heartbeat", - translate("Tunnel type"), - translate("Also see <a href=\"https://www.sixxs.net/faq/connectivity/?faq=comparison\">Tunneling Comparison</a> on SIXXS")) -heartbeat:value("0", translate("AYIYA")) -heartbeat:value("1", translate("Heartbeat")) -heartbeat.default = "0" - - -nat = section:taboption("general", Flag, "nat", - translate("Behind NAT"), - translate("The tunnel end-point is behind NAT, defaults to disabled and only applies to AYIYA")) -nat.optional = true -nat.default = nat.disabled - - -requiretls = section:taboption("general", Flag, "requiretls", - translate("Require TLS"), - translate("Connection to server fails when TLS cannot be used")) -requiretls.optional = true -requiretls.default = requiretls.disabled - - -verbose = section:taboption("advanced", Flag, "verbose", - translate("Verbose"), - translate("Verbose logging by aiccu daemon")) -verbose.optional = true -verbose.default = verbose.disabled - - -ntpsynctimeout = section:taboption("advanced", Value, "ntpsynctimeout", - translate("NTP sync time-out"), - translate("Wait for NTP sync that many seconds, seting to 0 disables waiting (optional)")) -ntpsynctimeout.datatype = "uinteger" -ntpsynctimeout.placeholder = "90" -ntpsynctimeout.optional = true - - -ip6addr = section:taboption("advanced", Value, "ip6addr", - translate("Local IPv6 address"), - translate("IPv6 address delegated to the local tunnel endpoint (optional)")) -ip6addr.datatype = "ip6addr" -ip6addr.optional = true - - -defaultroute = section:taboption("advanced", Flag, "defaultroute", - translate("Default route"), - translate("Whether to create an IPv6 default route over the tunnel")) -defaultroute.default = defaultroute.enabled -defaultroute.optional = true - - -sourcerouting = section:taboption("advanced", Flag, "sourcerouting", - translate("Source routing"), - translate("Whether to route only packets from delegated prefixes")) -sourcerouting.default = sourcerouting.enabled -sourcerouting.optional = true - - -metric = section:taboption("advanced", Value, "metric", - translate("Use gateway metric")) -metric.datatype = "uinteger" -metric.placeholder = "0" -metric:depends("defaultroute", defaultroute.enabled) - - -ttl = section:taboption("advanced", Value, "ttl", - translate("Use TTL on tunnel interface")) -ttl.datatype = "range(1,255)" -ttl.placeholder = "64" - - -mtu = section:taboption("advanced", Value, "mtu", - translate("Use MTU on tunnel interface"), - translate("minimum 1280, maximum 1480")) -mtu.datatype = "range(1280,1480)" -mtu.placeholder = "1280" - diff --git a/protocols/luci-proto-ppp/luasrc/model/network/proto_ppp.lua b/protocols/luci-proto-ppp/luasrc/model/network/proto_ppp.lua index 1bcbd4808a..3afb7de4f5 100644 --- a/protocols/luci-proto-ppp/luasrc/model/network/proto_ppp.lua +++ b/protocols/luci-proto-ppp/luasrc/model/network/proto_ppp.lua @@ -4,7 +4,7 @@ local netmod = luci.model.network local _, p -for _, p in ipairs({"ppp", "pptp", "pppoe", "pppoa", "3g", "l2tp", "pppossh"}) do +for _, p in ipairs({"ppp", "pptp", "pppoe", "pppoa", "l2tp", "pppossh"}) do local proto = netmod:register_protocol(p) @@ -13,8 +13,6 @@ for _, p in ipairs({"ppp", "pptp", "pppoe", "pppoa", "3g", "l2tp", "pppossh"}) d return luci.i18n.translate("PPP") elseif p == "pptp" then return luci.i18n.translate("PPtP") - elseif p == "3g" then - return luci.i18n.translate("UMTS/GPRS/EV-DO") elseif p == "pppoe" then return luci.i18n.translate("PPPoE") elseif p == "pppoa" then @@ -33,8 +31,6 @@ for _, p in ipairs({"ppp", "pptp", "pppoe", "pppoa", "3g", "l2tp", "pppossh"}) d function proto.opkg_package(self) if p == "ppp" then return p - elseif p == "3g" then - return "comgt" elseif p == "pptp" then return "ppp-mod-pptp" elseif p == "pppoe" then @@ -55,8 +51,6 @@ for _, p in ipairs({"ppp", "pptp", "pppoe", "pppoa", "3g", "l2tp", "pppossh"}) d return (nixio.fs.glob("/usr/lib/pppd/*/rp-pppoe.so")() ~= nil) elseif p == "pptp" then return (nixio.fs.glob("/usr/lib/pppd/*/pptp.so")() ~= nil) - elseif p == "3g" then - return nixio.fs.access("/lib/netifd/proto/3g.sh") elseif p == "l2tp" then return nixio.fs.access("/lib/netifd/proto/l2tp.sh") elseif p == "pppossh" then |