summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-ddns/Makefile2
-rw-r--r--applications/luci-ddns/luasrc/controller/ddns.lua32
-rw-r--r--applications/luci-ddns/luasrc/i18n/ddns.de.lua8
-rw-r--r--applications/luci-ddns/luasrc/i18n/ddns.en.lua8
-rw-r--r--applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua76
-rw-r--r--applications/luci-ddns/luasrc/model/cbi/ddns/ddnsmini.lua50
6 files changed, 176 insertions, 0 deletions
diff --git a/applications/luci-ddns/Makefile b/applications/luci-ddns/Makefile
new file mode 100644
index 0000000000..81a96f6a83
--- /dev/null
+++ b/applications/luci-ddns/Makefile
@@ -0,0 +1,2 @@
+include ../../build/config.mk
+include ../../build/module.mk \ No newline at end of file
diff --git a/applications/luci-ddns/luasrc/controller/ddns.lua b/applications/luci-ddns/luasrc/controller/ddns.lua
new file mode 100644
index 0000000000..f98913655c
--- /dev/null
+++ b/applications/luci-ddns/luasrc/controller/ddns.lua
@@ -0,0 +1,32 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+module("luci.controller.ddns", package.seeall)
+
+function index()
+ require("luci.i18n")
+ luci.i18n.loadc("ddns")
+ if not luci.fs.isfile("/etc/config/ddns") then
+ return
+ end
+
+ local page = entry({"admin", "services", "ddns"}, cbi("ddns/ddns"), luci.i18n.translate("ddns"), 60)
+ page.i18n = "ddns"
+ page.dependent = true
+
+
+ local page = entry({"mini", "network", "ddns"}, cbi("ddns/ddnsmini"), luci.i18n.translate("ddns"), 60)
+ page.i18n = "ddns"
+ page.dependent = true
+end \ No newline at end of file
diff --git a/applications/luci-ddns/luasrc/i18n/ddns.de.lua b/applications/luci-ddns/luasrc/i18n/ddns.de.lua
new file mode 100644
index 0000000000..7827e0acf4
--- /dev/null
+++ b/applications/luci-ddns/luasrc/i18n/ddns.de.lua
@@ -0,0 +1,8 @@
+ddns = "Dynamisches DNS"
+ddns_desc = "Dynamisches DNS erlaubt es, den Router bei dynamischer IP-Adresse über einen festen DNS-Namen zu erreichen."
+ddns_service_ipsource = "Quelle der IP-Adresse"
+ddns_service_checkinterval = "Teste auf neue IP alle"
+ddns_service_checkunit = "Test-Zeiteinheit"
+ddns_service_forceinterval = "Erzwinge Aktualisierung alle"
+ddns_service_forceunit = "Erzwinge-Zeiteinheit"
+ddns_service_updateurl = "Eigene Update-URL" \ No newline at end of file
diff --git a/applications/luci-ddns/luasrc/i18n/ddns.en.lua b/applications/luci-ddns/luasrc/i18n/ddns.en.lua
new file mode 100644
index 0000000000..32f85b24a4
--- /dev/null
+++ b/applications/luci-ddns/luasrc/i18n/ddns.en.lua
@@ -0,0 +1,8 @@
+ddns = "Dynamic DNS"
+ddns_desc = "Dynamic DNS allows that your router can be reached with a fixed hostname while having a dynamically changing IP-Address."
+ddns_service_ipsource = "Source of IP-Address"
+ddns_service_checkinterval = "Check for changed IP every"
+ddns_service_checkunit = "Check-Time unit"
+ddns_service_forceinterval = "Force update every"
+ddns_service_forceunit = "Force-Time unit"
+ddns_service_updateurl = "Custom Update-URL" \ No newline at end of file
diff --git a/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua b/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
new file mode 100644
index 0000000000..1c88579b37
--- /dev/null
+++ b/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
@@ -0,0 +1,76 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+m = Map("ddns", translate("ddns"), translate("ddns_desc"))
+
+s = m:section(TypedSection, "service", "")
+s.addremove = true
+
+s:option(Flag, "enabled", translate("enable"))
+
+svc = s:option(ListValue, "service_name", translate("service"))
+svc.rmempty = true
+svc:value("")
+svc:value("dyndns.org")
+svc:value("changeip.com")
+svc:value("zoneedit.com")
+svc:value("no-ip.com")
+svc:value("freedns.afraid.org")
+
+s:option(Value, "domain", translate("hostname")).rmempty = true
+s:option(Value, "username", translate("username")).rmempty = true
+s:option(Value, "password", translate("password")).rmempty = true
+
+src = s:option(ListValue, "ip_source")
+src:value("network", translate("network"))
+src:value("interface", translate("interface"))
+src:value("web", "URL")
+
+iface = s:option(ListValue, "ip_network", translate("network"))
+iface:depends("ip_source", "network")
+iface.rmempty = true
+luci.model.uci.foreach("network", "interface",
+ function (section)
+ if section[".name"] ~= "loopback" then
+ iface:value(section[".name"])
+ end
+ end)
+
+iface = s:option(ListValue, "ip_interface", translate("interface"))
+iface:depends("ip_source", "interface")
+iface.rmempty = true
+for k, v in pairs(luci.sys.net.devices()) do
+ iface:value(v)
+end
+
+web = s:option(Value, "ip_url", "URL")
+web:depends("ip_source", "web")
+web.rmempty = true
+
+s:option(Value, "update_url").optional = true
+
+s:option(Value, "check_interval").default = 10
+unit = s:option(ListValue, "check_unit")
+unit.default = "minutes"
+unit:value("minutes", "min")
+unit:value("hours", "h")
+
+s:option(Value, "force_interval").default = 72
+unit = s:option(ListValue, "force_unit")
+unit.default = "hours"
+unit:value("minutes", "min")
+unit:value("hours", "h")
+
+
+return m \ No newline at end of file
diff --git a/applications/luci-ddns/luasrc/model/cbi/ddns/ddnsmini.lua b/applications/luci-ddns/luasrc/model/cbi/ddns/ddnsmini.lua
new file mode 100644
index 0000000000..51bebb6e66
--- /dev/null
+++ b/applications/luci-ddns/luasrc/model/cbi/ddns/ddnsmini.lua
@@ -0,0 +1,50 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+m = Map("ddns", translate("ddns"), translate("ddns_desc"))
+
+s = m:section(TypedSection, "service", "")
+s.addremove = true
+
+s:option(Flag, "enabled", translate("enable"))
+
+svc = s:option(ListValue, "service_name", translate("service"))
+svc.rmempty = true
+svc:value("dyndns.org")
+svc:value("changeip.com")
+svc:value("zoneedit.com")
+svc:value("no-ip.com")
+svc:value("freedns.afraid.org")
+
+s:option(Value, "domain", translate("hostname")).rmempty = true
+s:option(Value, "username", translate("username")).rmempty = true
+s:option(Value, "password", translate("password")).rmempty = true
+
+s.defaults.ip_source = "network"
+s.defaults.ip_network = "wan"
+
+s:option(Value, "check_interval").default = 10
+unit = s:option(ListValue, "check_unit")
+unit.default = "minutes"
+unit:value("minutes", "min")
+unit:value("hours", "h")
+
+s:option(Value, "force_interval").default = 72
+unit = s:option(ListValue, "force_unit")
+unit.default = "hours"
+unit:value("minutes", "min")
+unit:value("hours", "h")
+
+
+return m \ No newline at end of file