diff options
Diffstat (limited to 'applications/luci-app-simple-adblock')
10 files changed, 637 insertions, 0 deletions
diff --git a/applications/luci-app-simple-adblock/Makefile b/applications/luci-app-simple-adblock/Makefile new file mode 100644 index 0000000000..31055f1207 --- /dev/null +++ b/applications/luci-app-simple-adblock/Makefile @@ -0,0 +1,17 @@ +# Copyright (c) 2017 Stan Grishin (stangri@melmac.net) +# This is free software, licensed under the GNU General Public License v3. + +include $(TOPDIR)/rules.mk + +PKG_LICENSE:=GPL-3.0+ +PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net> + +LUCI_TITLE:=Simple Adblock Web UI +LUCI_DESCRIPTION:=Provides Web UI for simple-adblock service. +LUCI_DEPENDS:=+luci +simple-adblock +LUCI_PKGARCH:=all +PKG_RELEASE:=5 + +include ../../luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/applications/luci-app-simple-adblock/luasrc/controller/simpleadblock.lua b/applications/luci-app-simple-adblock/luasrc/controller/simpleadblock.lua new file mode 100644 index 0000000000..46125b3098 --- /dev/null +++ b/applications/luci-app-simple-adblock/luasrc/controller/simpleadblock.lua @@ -0,0 +1,7 @@ +module("luci.controller.simpleadblock", package.seeall) +function index() + if not nixio.fs.access("/etc/config/simple-adblock") then + return + end + entry({"admin", "services", "simpleadblock"}, cbi("simpleadblock"), _("Simple AdBlock")) +end diff --git a/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua b/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua new file mode 100644 index 0000000000..22672124fc --- /dev/null +++ b/applications/luci-app-simple-adblock/luasrc/model/cbi/simpleadblock.lua @@ -0,0 +1,69 @@ +m = Map("simple-adblock", translate("Simple AdBlock Settings")) +s = m:section(NamedSection, "config", "simple-adblock") + +-- General options +e = s:option(Flag, "enabled", translate("Start Simple Adblock service")) +e.rmempty = false +function e.write(self, section, value) + if value ~= "1" then + luci.sys.init.stop("simple-adblock") + end + return Flag.write(self, section, value) +end + +o2 = s:option(ListValue, "verbosity", translate("Output Verbosity Setting"),translate("Controls system log and console output verbosity")) +o2:value("0", translate("Suppress output")) +o2:value("1", translate("Some output")) +o2:value("2", translate("Verbose output")) +o2.rmempty = false +o2.default = 2 + +o3 = s:option(ListValue, "force_dns", translate("Force Router DNS"), translate("Forces Router DNS use on local devices, also known as DNS Hijacking")) +o3:value("0", translate("Let local devices use their own DNS servers if set")) +o3:value("1", translate("Force Router DNS server to all local devices")) +o3.rmempty = false +o3.default = 1 + +local sysfs_path = "/sys/class/leds/" +local leds = {} +if nixio.fs.access(sysfs_path) then + leds = nixio.util.consume((nixio.fs.dir(sysfs_path))) +end +if #leds ~= 0 then + o3 = s:option(Value, "led", translate("LED to indicate status"), translate("Pick the LED not already used in") + .. [[ <a href="]] .. luci.dispatcher.build_url("admin/system/leds") .. [[">]] + .. translate("System LED Configuration") .. [[</a>]]) + o3.rmempty = true + o3:value("", translate("none")) + for k, v in ipairs(leds) do + o3:value(v) + end +end + +s2 = m:section(NamedSection, "config", "simple-adblock") +-- Whitelisted Domains +d1 = s2:option(DynamicList, "whitelist_domain", translate("Whitelisted Domains"), translate("Individual domains to be whitelisted")) +d1.addremove = false +d1.optional = false + +-- Blacklisted Domains +d3 = s2:option(DynamicList, "blacklist_domain", translate("Blacklisted Domains"), translate("Individual domains to be blacklisted")) +d3.addremove = false +d3.optional = false + +-- Whitelisted Domains URLs +d2 = s2:option(DynamicList, "whitelist_domains_url", translate("Whitelisted Domain URLs"), translate("URLs to lists of domains to be whitelisted")) +d2.addremove = false +d2.optional = false + +-- Blacklisted Domains URLs +d4 = s2:option(DynamicList, "blacklist_domains_url", translate("Blacklisted Domain URLs"), translate("URLs to lists of domains to be blacklisted")) +d4.addremove = false +d4.optional = false + +-- Blacklisted Hosts URLs +d5 = s2:option(DynamicList, "blacklist_hosts_url", translate("Blacklisted Hosts URLs"), translate("URLs to lists of hosts to be blacklisted")) +d5.addremove = false +d5.optional = false + +return m diff --git a/applications/luci-app-simple-adblock/po/ja/simple-adblock.po b/applications/luci-app-simple-adblock/po/ja/simple-adblock.po new file mode 100644 index 0000000000..6c98eb6cea --- /dev/null +++ b/applications/luci-app-simple-adblock/po/ja/simple-adblock.po @@ -0,0 +1,96 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.12\n" +"Last-Translator: INAGAKI Hiroshi <musashino.open@gmail.com>\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"Language: ja\n" + +msgid "Blacklisted Domain URLs" +msgstr "ドメイン ブラックリストのURL" + +msgid "Blacklisted Domains" +msgstr "ブラックリスト ドメイン" + +msgid "Blacklisted Hosts URLs" +msgstr "hosts ブラックリストのURL" + +msgid "Controls system log and console output verbosity" +msgstr "システム ログとコンソール出力の冗長性を設定します。" + +msgid "Force Router DNS" +msgstr "ルーターDNSの強制" + +msgid "Force Router DNS server to all local devices" +msgstr "全ローカル デバイスにルーター DNSサーバーの使用を強制" + +msgid "Forces Router DNS use on local devices, also known as DNS Hijacking" +msgstr "" +"ローカル デバイスに対し、ルーター上のDNSサーバーの使用を強制します。これは、" +"DNS ハイジャックとしても知られています。" + +msgid "Individual domains to be blacklisted" +msgstr "ブラックリストに登録する、個々のドメインです。" + +msgid "Individual domains to be whitelisted" +msgstr "ホワイトリストに登録する、個々のドメインです。" + +msgid "LED to indicate status" +msgstr "ステータスを表示するLED" + +msgid "Let local devices use their own DNS servers if set" +msgstr "DNSサーバーの使用を強制しない" + +msgid "Output Verbosity Setting" +msgstr "出力詳細度の設定" + +msgid "Pick the LED not already used in" +msgstr "右の設定で既に使用されていないLEDを選択します" + +msgid "Simple AdBlock" +msgstr "Simple AdBlock" + +msgid "Simple AdBlock Settings" +msgstr "Simple AdBlock 設定" + +msgid "Some output" +msgstr "軽量出力" + +msgid "Start Simple Adblock service" +msgstr "" + +msgid "Suppress output" +msgstr "出力の抑制" + +msgid "System LED Configuration" +msgstr "LED 設定" + +msgid "URLs to lists of domains to be blacklisted" +msgstr "ブラックリストに登録するドメインのリストのURLです。" + +msgid "URLs to lists of domains to be whitelisted" +msgstr "ホワイトリストに登録するドメインのリストのURLです。" + +msgid "URLs to lists of hosts to be blacklisted" +msgstr "ブラックリストに登録するドメインが列挙された、hostsファイルのURLです。" + +msgid "Verbose output" +msgstr "詳細出力" + +msgid "Whitelisted Domain URLs" +msgstr "ドメイン ホワイトリストのURL" + +msgid "Whitelisted Domains" +msgstr "ホワイトリスト ドメイン" + +msgid "none" +msgstr "なし" + +#~ msgid "Enable/start service" +#~ msgstr "サービスの有効化/開始" diff --git a/applications/luci-app-simple-adblock/po/pt-br/simple-adblock.po b/applications/luci-app-simple-adblock/po/pt-br/simple-adblock.po new file mode 100644 index 0000000000..d298e94902 --- /dev/null +++ b/applications/luci-app-simple-adblock/po/pt-br/simple-adblock.po @@ -0,0 +1,89 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + +msgid "Blacklisted Domain URLs" +msgstr "Endereço com lista de Domínio para a Lista Negra" + +msgid "Blacklisted Domains" +msgstr "Domínios para a Lista Negra" + +msgid "Blacklisted Hosts URLs" +msgstr "Endereços de Hosts para a Lista Negra" + +msgid "Controls system log and console output verbosity" +msgstr "" +"Controla o sistema de registro e o detalhamento das mensagens de saída do " +"console" + +msgid "Force Router DNS" +msgstr "Forçar o DNS do Roteador" + +msgid "Force Router DNS server to all local devices" +msgstr "Forçar o servidor de DNS do Roteador para todos os dispositivos locais" + +msgid "Forces Router DNS use on local devices, also known as DNS Hijacking" +msgstr "" +"Forçar o uso do DNS do Roteador nos dispositivos locais, também conhecido " +"como redirecionamento de DNS" + +msgid "Individual domains to be blacklisted" +msgstr "Domínios individuais para serem incluídos na Lista Negra" + +msgid "Individual domains to be whitelisted" +msgstr "Domínios individuais para serem incluídos na Lista Branca" + +msgid "LED to indicate status" +msgstr "LED para indicar o estado" + +msgid "Let local devices use their own DNS servers if set" +msgstr "" +"Deixe que os dispositivos locais usem seus próprios servidores de DNS, se " +"definidos" + +msgid "Output Verbosity Setting" +msgstr "Definição do detalhamento do registro" + +msgid "Pick the LED not already used in" +msgstr "Escolha um LED não usando em" + +msgid "Simple AdBlock" +msgstr "Simple AdBlock" + +msgid "Simple AdBlock Settings" +msgstr "Configuração do Simple AdBlock" + +msgid "Some output" +msgstr "Pouco detalhado" + +msgid "Start Simple Adblock service" +msgstr "" + +msgid "Suppress output" +msgstr "Suprimir" + +msgid "System LED Configuration" +msgstr "Configuração do LED" + +msgid "URLs to lists of domains to be blacklisted" +msgstr "Endereço da lista dos domínios para a Lista Negra" + +msgid "URLs to lists of domains to be whitelisted" +msgstr "Endereço da lista dos domínios para a Lista Branca" + +msgid "URLs to lists of hosts to be blacklisted" +msgstr "Endereço da lista dos hosts para a Lista Negra" + +msgid "Verbose output" +msgstr "Detalhado" + +msgid "Whitelisted Domain URLs" +msgstr "Endereço com lista de domínio para a Lista Branca" + +msgid "Whitelisted Domains" +msgstr "Domínios para a Lista Branca" + +msgid "none" +msgstr "Nenhum" + +#~ msgid "Enable/start service" +#~ msgstr "Habilitar/Iniciar o serviço" diff --git a/applications/luci-app-simple-adblock/po/pt/simple-adblock.po b/applications/luci-app-simple-adblock/po/pt/simple-adblock.po new file mode 100644 index 0000000000..d298e94902 --- /dev/null +++ b/applications/luci-app-simple-adblock/po/pt/simple-adblock.po @@ -0,0 +1,89 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + +msgid "Blacklisted Domain URLs" +msgstr "Endereço com lista de Domínio para a Lista Negra" + +msgid "Blacklisted Domains" +msgstr "Domínios para a Lista Negra" + +msgid "Blacklisted Hosts URLs" +msgstr "Endereços de Hosts para a Lista Negra" + +msgid "Controls system log and console output verbosity" +msgstr "" +"Controla o sistema de registro e o detalhamento das mensagens de saída do " +"console" + +msgid "Force Router DNS" +msgstr "Forçar o DNS do Roteador" + +msgid "Force Router DNS server to all local devices" +msgstr "Forçar o servidor de DNS do Roteador para todos os dispositivos locais" + +msgid "Forces Router DNS use on local devices, also known as DNS Hijacking" +msgstr "" +"Forçar o uso do DNS do Roteador nos dispositivos locais, também conhecido " +"como redirecionamento de DNS" + +msgid "Individual domains to be blacklisted" +msgstr "Domínios individuais para serem incluídos na Lista Negra" + +msgid "Individual domains to be whitelisted" +msgstr "Domínios individuais para serem incluídos na Lista Branca" + +msgid "LED to indicate status" +msgstr "LED para indicar o estado" + +msgid "Let local devices use their own DNS servers if set" +msgstr "" +"Deixe que os dispositivos locais usem seus próprios servidores de DNS, se " +"definidos" + +msgid "Output Verbosity Setting" +msgstr "Definição do detalhamento do registro" + +msgid "Pick the LED not already used in" +msgstr "Escolha um LED não usando em" + +msgid "Simple AdBlock" +msgstr "Simple AdBlock" + +msgid "Simple AdBlock Settings" +msgstr "Configuração do Simple AdBlock" + +msgid "Some output" +msgstr "Pouco detalhado" + +msgid "Start Simple Adblock service" +msgstr "" + +msgid "Suppress output" +msgstr "Suprimir" + +msgid "System LED Configuration" +msgstr "Configuração do LED" + +msgid "URLs to lists of domains to be blacklisted" +msgstr "Endereço da lista dos domínios para a Lista Negra" + +msgid "URLs to lists of domains to be whitelisted" +msgstr "Endereço da lista dos domínios para a Lista Branca" + +msgid "URLs to lists of hosts to be blacklisted" +msgstr "Endereço da lista dos hosts para a Lista Negra" + +msgid "Verbose output" +msgstr "Detalhado" + +msgid "Whitelisted Domain URLs" +msgstr "Endereço com lista de domínio para a Lista Branca" + +msgid "Whitelisted Domains" +msgstr "Domínios para a Lista Branca" + +msgid "none" +msgstr "Nenhum" + +#~ msgid "Enable/start service" +#~ msgstr "Habilitar/Iniciar o serviço" diff --git a/applications/luci-app-simple-adblock/po/ru/simple-adblock.po b/applications/luci-app-simple-adblock/po/ru/simple-adblock.po new file mode 100644 index 0000000000..01e07ddd24 --- /dev/null +++ b/applications/luci-app-simple-adblock/po/ru/simple-adblock.po @@ -0,0 +1,97 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: LuCI: simple-adblock\n" +"POT-Creation-Date: 2017-12-07 14:00+0300\n" +"PO-Revision-Date: 2018-01-22 13:18+0300\n" +"Language-Team: http://cyber-place.ru\n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.7.1\n" +"Last-Translator: Vladimir aka sunny <picfun@ya.ru>\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : " +"2);\n" +"Language: ru\n" +"Project-Info: Это технический перевод, не дословный. Главное-удобный русский интерфейс, все проверялось в " +"графическом режиме, совместим с другими apps\n" + +msgid "Blacklisted Domain URLs" +msgstr "URL ссылки Черных<br />списков доменов" + +msgid "Blacklisted Domains" +msgstr "Черный список доменов" + +msgid "Blacklisted Hosts URLs" +msgstr "URL ссылки Черных<br />списков хостов" + +msgid "Controls system log and console output verbosity" +msgstr "Детальная настройка записи событий в системный журнал." + +msgid "Force Router DNS" +msgstr "Назначить DNS роутера" + +msgid "Force Router DNS server to all local devices" +msgstr "Назначить DNS роутера всем локальным устройствам" + +msgid "Forces Router DNS use on local devices, also known as DNS Hijacking" +msgstr "" +"Назначить DNS роутера всем локальным устройствам, методом DNS Hijacking." + +msgid "Individual domains to be blacklisted" +msgstr "Домены добавленные пользователем в Черный список." + +msgid "Individual domains to be whitelisted" +msgstr "Домены добавленные пользователем в Белый список." + +msgid "LED to indicate status" +msgstr "LED индикация состояния" + +msgid "Let local devices use their own DNS servers if set" +msgstr "" +"Разрешить локальным устройствам использовать собственные DNS, если они " +"прописаны в настройках сети устройства" + +msgid "Output Verbosity Setting" +msgstr "Настройка журнала" + +msgid "Pick the LED not already used in" +msgstr "Выберите LED не используется на странице" + +msgid "Simple AdBlock" +msgstr "Simple AdBlock" + +msgid "Simple AdBlock Settings" +msgstr "Simple AdBlock настройки" + +msgid "Some output" +msgstr "Частичная запись" + +msgid "Start Simple Adblock service" +msgstr "Запуск сервиса Simple Adblock" + +msgid "Suppress output" +msgstr "Запретить запись" + +msgid "System LED Configuration" +msgstr "'Настройка LED индикации' системы." + +msgid "URLs to lists of domains to be blacklisted" +msgstr "URL ссылки Черных списков доменов." + +msgid "URLs to lists of domains to be whitelisted" +msgstr "URL ссылки Белых списков доменов." + +msgid "URLs to lists of hosts to be blacklisted" +msgstr "URL ссылки Черных списков хостов." + +msgid "Verbose output" +msgstr "Подробная запись" + +msgid "Whitelisted Domain URLs" +msgstr "URL ссылки Белых списков доменов" + +msgid "Whitelisted Domains" +msgstr "Белый список доменов" + +msgid "none" +msgstr "ничего" diff --git a/applications/luci-app-simple-adblock/po/sv/simple-adblock.po b/applications/luci-app-simple-adblock/po/sv/simple-adblock.po new file mode 100644 index 0000000000..33408e1839 --- /dev/null +++ b/applications/luci-app-simple-adblock/po/sv/simple-adblock.po @@ -0,0 +1,83 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8\n" + +msgid "Blacklisted Domain URLs" +msgstr "Svartlistade domänadresser" + +msgid "Blacklisted Domains" +msgstr "Svartlistade domäner" + +msgid "Blacklisted Hosts URLs" +msgstr "Svartlistade värdadresser" + +msgid "Controls system log and console output verbosity" +msgstr "Kontrollerar systemloggar och detaljnivån för konsoll-utmatningen" + +msgid "Force Router DNS" +msgstr "" + +msgid "Force Router DNS server to all local devices" +msgstr "" + +msgid "Forces Router DNS use on local devices, also known as DNS Hijacking" +msgstr "" + +msgid "Individual domains to be blacklisted" +msgstr "Individuella domäner som ska svartlistas" + +msgid "Individual domains to be whitelisted" +msgstr "Individulla domäner som ska svartlistas" + +msgid "LED to indicate status" +msgstr "LED för att indikera status" + +msgid "Let local devices use their own DNS servers if set" +msgstr "" + +msgid "Output Verbosity Setting" +msgstr "" + +msgid "Pick the LED not already used in" +msgstr "" + +msgid "Simple AdBlock" +msgstr "Simple AdBlock" + +msgid "Simple AdBlock Settings" +msgstr "Inställningar för Simple AdBlock" + +msgid "Some output" +msgstr "Viss utmatning" + +msgid "Start Simple Adblock service" +msgstr "" + +msgid "Suppress output" +msgstr "Förträng utmatning" + +msgid "System LED Configuration" +msgstr "" + +msgid "URLs to lists of domains to be blacklisted" +msgstr "" + +msgid "URLs to lists of domains to be whitelisted" +msgstr "" + +msgid "URLs to lists of hosts to be blacklisted" +msgstr "" + +msgid "Verbose output" +msgstr "Utförlig utmatning" + +msgid "Whitelisted Domain URLs" +msgstr "Vitlistade domänadresser" + +msgid "Whitelisted Domains" +msgstr "Vitlistade domäner" + +msgid "none" +msgstr "ingen" + +#~ msgid "Enable/start service" +#~ msgstr "Aktivera/starta tjänsten" diff --git a/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot b/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot new file mode 100644 index 0000000000..1a71cae624 --- /dev/null +++ b/applications/luci-app-simple-adblock/po/templates/simple-adblock.pot @@ -0,0 +1,80 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +msgid "Blacklisted Domain URLs" +msgstr "" + +msgid "Blacklisted Domains" +msgstr "" + +msgid "Blacklisted Hosts URLs" +msgstr "" + +msgid "Controls system log and console output verbosity" +msgstr "" + +msgid "Force Router DNS" +msgstr "" + +msgid "Force Router DNS server to all local devices" +msgstr "" + +msgid "Forces Router DNS use on local devices, also known as DNS Hijacking" +msgstr "" + +msgid "Individual domains to be blacklisted" +msgstr "" + +msgid "Individual domains to be whitelisted" +msgstr "" + +msgid "LED to indicate status" +msgstr "" + +msgid "Let local devices use their own DNS servers if set" +msgstr "" + +msgid "Output Verbosity Setting" +msgstr "" + +msgid "Pick the LED not already used in" +msgstr "" + +msgid "Simple AdBlock" +msgstr "" + +msgid "Simple AdBlock Settings" +msgstr "" + +msgid "Some output" +msgstr "" + +msgid "Start Simple Adblock service" +msgstr "" + +msgid "Suppress output" +msgstr "" + +msgid "System LED Configuration" +msgstr "" + +msgid "URLs to lists of domains to be blacklisted" +msgstr "" + +msgid "URLs to lists of domains to be whitelisted" +msgstr "" + +msgid "URLs to lists of hosts to be blacklisted" +msgstr "" + +msgid "Verbose output" +msgstr "" + +msgid "Whitelisted Domain URLs" +msgstr "" + +msgid "Whitelisted Domains" +msgstr "" + +msgid "none" +msgstr "" diff --git a/applications/luci-app-simple-adblock/root/etc/uci-defaults/40_luci-simple-adblock b/applications/luci-app-simple-adblock/root/etc/uci-defaults/40_luci-simple-adblock new file mode 100644 index 0000000000..3b7137e026 --- /dev/null +++ b/applications/luci-app-simple-adblock/root/etc/uci-defaults/40_luci-simple-adblock @@ -0,0 +1,10 @@ +#!/bin/sh +uci -q batch <<-EOF >/dev/null + delete ucitrack.@simple-adblock[-1] + add ucitrack simple-adblock + set ucitrack.@simple-adblock[-1].init=simple-adblock + commit ucitrack +EOF + +rm -f /tmp/luci-indexcache +exit 0 |