├── foris ├── tests │ ├── __init__.py │ ├── configs.tar.gz │ ├── init_env.sh │ ├── utils.py │ └── test_data.py ├── middleware │ ├── __init__.py │ ├── backend_data.py │ └── bottle_csrf.py ├── config │ └── pages │ │ ├── __init__.py │ │ ├── about.py │ │ ├── dns.py │ │ ├── time.py │ │ ├── guest.py │ │ ├── lan.py │ │ ├── wan.py │ │ ├── wifi.py │ │ ├── password.py │ │ ├── networks.py │ │ ├── notifications.py │ │ └── guide.py ├── static │ ├── sass │ │ ├── _mixins.sass │ │ ├── ie8.sass │ │ ├── screen.sass │ │ ├── ui │ │ │ ├── _animations.sass │ │ │ ├── _eula.sass │ │ │ ├── _tables.sass │ │ │ ├── _notifications.sass │ │ │ ├── _messages.sass │ │ │ ├── _spinner.sass │ │ │ ├── _treeview.sass │ │ │ ├── _buttons.sass │ │ │ ├── _forms.sass │ │ │ └── _main_nav.sass │ │ ├── fonts.sass │ │ ├── _branding.sass │ │ ├── _typography.sass │ │ ├── _main.sass │ │ ├── _variables.sass │ │ └── pages │ │ │ ├── _login.sass │ │ │ └── _config.sass │ ├── img │ │ ├── fail.png │ │ ├── loader.gif │ │ ├── favicon.ico │ │ ├── icon-help.png │ │ ├── icon-menu.png │ │ ├── success.png │ │ ├── logo-turris.png │ │ ├── icon-opened-lock.png │ │ ├── QR_icon.svg │ │ └── workflow-min.svg │ ├── fonts │ │ ├── Roboto-Bold.woff │ │ ├── fa-brands-400.woff │ │ ├── fa-solid-900.woff │ │ ├── Roboto-Regular.woff │ │ └── fa-regular-400.woff │ ├── .inline-assets │ │ ├── icon-fail.png │ │ ├── icon-refresh.png │ │ ├── icon-success.png │ │ ├── message-error.png │ │ ├── message-info.png │ │ ├── message-success.png │ │ └── message-warning.png │ ├── css │ │ ├── fa-brands.min.css │ │ ├── fa-solid.min.css │ │ ├── fa-regular.min.css │ │ └── vex.css │ ├── config.rb │ └── js │ │ └── contrib │ │ └── html5.js ├── langs │ ├── cs.py │ ├── da.py │ ├── de.py │ ├── fr.py │ ├── hu.py │ ├── nb.py │ ├── pl.py │ ├── ru.py │ ├── it.py │ ├── lt.py │ ├── sk.py │ └── __init__.py ├── utils │ ├── tzdata.pickle2 │ ├── countries.pickle2 │ ├── tzinfo.py │ ├── caches.py │ ├── addresses.py │ ├── dynamic_assets.py │ ├── translators.py │ └── messages.py ├── __init__.py ├── templates │ ├── _foris_version.html.j2 │ ├── config │ │ ├── _message.html.j2 │ │ ├── _no_interface_up_warning.html.j2 │ │ ├── _no_interface_warning.html.j2 │ │ ├── _dhcp_clients_table.html.j2 │ │ ├── main.html.j2 │ │ ├── _wifi_edit.html.j2 │ │ ├── password.html.j2 │ │ ├── about.html.j2 │ │ ├── finished.html.j2 │ │ ├── guest.html.j2 │ │ ├── _networks_button.html.j2 │ │ ├── lan.html.j2 │ │ ├── _wifi_form.html.j2 │ │ ├── _remote_tokens.html.j2 │ │ ├── wan.html.j2 │ │ ├── wifi.html.j2 │ │ ├── notifications.html.j2 │ │ ├── profile.html.j2 │ │ ├── maintenance.html.j2 │ │ └── _connection_test.html.j2 │ ├── _lang_flat.html.j2 │ ├── _turris_device.html.j2 │ ├── _messages.html.j2 │ ├── _field.html.j2 │ ├── _notifications.html.j2 │ ├── index.html.j2 │ ├── includes │ │ └── updater_eula.html.j2 │ ├── javascript │ │ ├── parsley.messages.js.j2 │ │ └── foris.js.j2 │ └── _layout.html.j2 ├── config_handlers │ ├── __init__.py │ ├── backups.py │ ├── base.py │ ├── profile.py │ ├── networks.py │ └── dns.py ├── caches.py ├── ubus │ └── __init__.py ├── config_app.py ├── state.py ├── backend.py └── plugins │ └── __init__.py ├── babel.cfg ├── foris_plugins └── __init__.py ├── examples └── sample_plugin │ ├── foris_plugins │ ├── __init__.py │ └── sample │ │ ├── templates │ │ ├── sample │ │ │ ├── _records.html.j2 │ │ │ └── sample.html.j2 │ │ └── javascript │ │ │ └── sample │ │ │ └── sample.js.j2 │ │ ├── static │ │ ├── sass │ │ │ └── sample.sass │ │ ├── img │ │ │ └── logo-dark.svg │ │ └── js │ │ │ └── sample.js │ │ └── __init__.py │ ├── README.rst │ └── setup.py ├── .gitignore ├── runtests ├── README.md ├── Makefile └── setup.py /foris/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /foris/middleware/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /foris/config/pages/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /foris/static/sass/_mixins.sass: -------------------------------------------------------------------------------- 1 | =rounded-borders 2 | +border-radius(0.4em) 3 | -------------------------------------------------------------------------------- /babel.cfg: -------------------------------------------------------------------------------- 1 | [jinja2: **/templates/**.j2] 2 | encoding = utf-8 3 | 4 | [python: **.py] 5 | -------------------------------------------------------------------------------- /foris_plugins/__init__.py: -------------------------------------------------------------------------------- 1 | __import__('pkg_resources').declare_namespace(__name__) 2 | -------------------------------------------------------------------------------- /foris/static/img/fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/img/fail.png -------------------------------------------------------------------------------- /foris/langs/cs.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "cs" 4 | iso3 = "cze" 5 | 6 | name = u"Čeština" 7 | -------------------------------------------------------------------------------- /foris/langs/da.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "da" 4 | iso3 = "dan" 5 | 6 | name = u"Dansk" 7 | -------------------------------------------------------------------------------- /foris/langs/de.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "de" 4 | iso3 = "deu" 5 | 6 | name = u"Deutsch" 7 | -------------------------------------------------------------------------------- /foris/langs/fr.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "fr" 4 | iso3 = "fra" 5 | 6 | name = u"Français" 7 | -------------------------------------------------------------------------------- /foris/langs/hu.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "hu" 4 | iso3 = "hun" 5 | 6 | name = u"Magyar" 7 | -------------------------------------------------------------------------------- /foris/langs/nb.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "nb" 4 | iso3 = "nob" 5 | 6 | name = u"Bokmål" 7 | -------------------------------------------------------------------------------- /foris/langs/pl.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "pl" 4 | iso3 = "pol" 5 | 6 | name = u"Polski" 7 | -------------------------------------------------------------------------------- /foris/langs/ru.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "ru" 4 | iso3 = "rus" 5 | 6 | name = u"Русский" 7 | -------------------------------------------------------------------------------- /foris/static/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/img/loader.gif -------------------------------------------------------------------------------- /foris/tests/configs.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/tests/configs.tar.gz -------------------------------------------------------------------------------- /foris/utils/tzdata.pickle2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/utils/tzdata.pickle2 -------------------------------------------------------------------------------- /examples/sample_plugin/foris_plugins/__init__.py: -------------------------------------------------------------------------------- 1 | __import__('pkg_resources').declare_namespace(__name__) 2 | -------------------------------------------------------------------------------- /foris/langs/it.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "it" 4 | iso3 = "ita" 5 | 6 | 7 | name = "Italiano" 8 | -------------------------------------------------------------------------------- /foris/langs/lt.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "lt" 4 | iso3 = "lit" 5 | 6 | name = u"Lietuvių kalba" 7 | -------------------------------------------------------------------------------- /foris/langs/sk.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | 3 | iso2 = "sk" 4 | iso3 = "svk" 5 | 6 | name = u"Slovenčina" 7 | -------------------------------------------------------------------------------- /foris/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/img/favicon.ico -------------------------------------------------------------------------------- /foris/static/img/icon-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/img/icon-help.png -------------------------------------------------------------------------------- /foris/static/img/icon-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/img/icon-menu.png -------------------------------------------------------------------------------- /foris/static/img/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/img/success.png -------------------------------------------------------------------------------- /foris/utils/countries.pickle2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/utils/countries.pickle2 -------------------------------------------------------------------------------- /foris/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | __version__ = "101.1.2" 4 | 5 | BASE_DIR = os.path.dirname(__file__) 6 | -------------------------------------------------------------------------------- /foris/static/img/logo-turris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/img/logo-turris.png -------------------------------------------------------------------------------- /foris/templates/_foris_version.html.j2: -------------------------------------------------------------------------------- 1 | Foris {{ foris_info.foris_version }} 2 | -------------------------------------------------------------------------------- /foris/static/fonts/Roboto-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/fonts/Roboto-Bold.woff -------------------------------------------------------------------------------- /foris/static/sass/ie8.sass: -------------------------------------------------------------------------------- 1 | $breakpoint-no-queries: true 2 | $breakpoint-no-query-fallbacks: false 3 | 4 | @import main -------------------------------------------------------------------------------- /foris/static/fonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/fonts/fa-brands-400.woff -------------------------------------------------------------------------------- /foris/static/fonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/fonts/fa-solid-900.woff -------------------------------------------------------------------------------- /foris/static/img/icon-opened-lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/img/icon-opened-lock.png -------------------------------------------------------------------------------- /foris/static/sass/screen.sass: -------------------------------------------------------------------------------- 1 | $breakpoint-no-queries: false 2 | $breakpoint-no-query-fallbacks: false 3 | 4 | @import main -------------------------------------------------------------------------------- /foris/static/fonts/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/fonts/Roboto-Regular.woff -------------------------------------------------------------------------------- /foris/static/fonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/fonts/fa-regular-400.woff -------------------------------------------------------------------------------- /foris/static/.inline-assets/icon-fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/.inline-assets/icon-fail.png -------------------------------------------------------------------------------- /foris/static/.inline-assets/icon-refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/.inline-assets/icon-refresh.png -------------------------------------------------------------------------------- /foris/static/.inline-assets/icon-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/.inline-assets/icon-success.png -------------------------------------------------------------------------------- /foris/static/.inline-assets/message-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/.inline-assets/message-error.png -------------------------------------------------------------------------------- /foris/static/.inline-assets/message-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/.inline-assets/message-info.png -------------------------------------------------------------------------------- /foris/static/.inline-assets/message-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/.inline-assets/message-success.png -------------------------------------------------------------------------------- /foris/static/.inline-assets/message-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CZ-NIC/foris/HEAD/foris/static/.inline-assets/message-warning.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.sassc 3 | *.scssc 4 | *.mo 5 | messages.po 6 | foris/static/css/* 7 | foris/static/js/*.min.js 8 | foris/templates/_layout.tpl 9 | /plugins/ 10 | -------------------------------------------------------------------------------- /foris/templates/config/_message.html.j2: -------------------------------------------------------------------------------- 1 | {% if message %} 2 |
5 | {% endif %} 6 | -------------------------------------------------------------------------------- /foris/templates/config/_no_interface_up_warning.html.j2: -------------------------------------------------------------------------------- 1 | {% if foris_info.device != "turris" and not foris_info.turris_os_version.startswith("3.") %} 2 | 5 | {% endif %} 6 | -------------------------------------------------------------------------------- /foris/templates/_lang_flat.html.j2: -------------------------------------------------------------------------------- 1 | {% trans %}Language{% endtrans %}: 2 | {{ iso2to3.get(lang(), lang()) }} 3 | {% for code in translations %} 4 | {% if code != lang() %} 5 | | {{ iso2to3.get(code, code) }} 6 | {% endif %} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /foris/templates/_turris_device.html.j2: -------------------------------------------------------------------------------- 1 | {% if foris_info.device == "mox" %} 2 | Turris MOX 3 | {% elif foris_info.device == "omnia" %} 4 | Turris OMNIA 5 | {% else %} 6 | Turris 1.X 7 | {% endif %} 8 | -------------------------------------------------------------------------------- /examples/sample_plugin/README.rst: -------------------------------------------------------------------------------- 1 | Foris sample plugin 2 | =================== 3 | This is a sample plugin for foris 4 | 5 | Requirements 6 | ============ 7 | 8 | * foris 9 | * foris-controller-sample-module 10 | 11 | Installation 12 | ============ 13 | 14 | ``python setup.py install`` 15 | 16 | or 17 | 18 | ``pip install .`` 19 | -------------------------------------------------------------------------------- /examples/sample_plugin/foris_plugins/sample/templates/sample/_records.html.j2: -------------------------------------------------------------------------------- 1 || # | {% trans %}Value{% endtrans %} | 3 | 4 | {% for idx, value in records %} 5 |
|---|---|
| {{ idx }} | {{ value }} |
| {% trans %}Expires{% endtrans %} | 7 |{% trans %}IP Address{% endtrans %} | 8 |{% trans %}MAC Address{% endtrans %} | 9 |{% trans %}Hostname{% endtrans %} | 10 |{% trans %}Active{% endtrans %} | 11 |
|---|---|---|---|---|
| {{ dhcp_client.expires }} | 17 |{{ dhcp_client.ip }} | 18 |{{ dhcp_client.mac }} | 19 |{{ dhcp_client.hostname }} | 20 |21 | |
| {% trans %}Device{% endtrans %} | 10 |{{ data['model'] }} | 11 ||
|---|---|---|
| {% trans %}Serial number{% endtrans %} | 14 |{{ data['serial']|int(base=16) }} | 15 ||
| {% trans %}Turris OS version{% endtrans %} | 18 | {% if data['os_branch']['mode'] == 'version' %} 19 |{{ data['os_version'] }} ({{ data['os_branch']['value'] }}) | 20 | {% else %} 21 |{{ data['os_version'] }} | 22 | {% endif %} 23 |
| {% trans %}Turris OS branch{% endtrans %} | 27 |{{ data['os_branch']['value'] }} | 28 ||
| {% trans %}Kernel version{% endtrans %} | 32 |{{ data['kernel'] }} | 33 |
{% trans %}Some generic description what this plugin does.{% endtrans %}
17 | 18 | 26 |{% trans %}To redraw the chart using websockets just run the following command:{% endtrans %}
33 |foris-notify-wrapper -n -m sample -a reload_chart '{}'
34 | {{ section.description }}
7 | {% endif %} 8 | {% for field in section.active_fields %} 9 | {% set radio_number = field.name.strip("abcdefghijklmnopqrstuvwxyz-_") %} 10 | {% include '_field.html.j2' %} 11 | {% if field.name.endswith("-hwmode") and form.band_conflict %} 12 || {% trans %}Token{% endtrans %} | 6 |{% trans %}Status{% endtrans %} | 7 |8 | | |||
|---|---|---|---|---|---|
| {{ token["name"] }} | 14 | {% if token['status'] == 'revoked' %} 15 |16 | {% elif token['status'] == 'generating' %} 17 | | 18 | {% elif token['status'] == 'valid' %} 19 | | 20 | {% else %} 21 | | {{ token['status'] }} | 22 | {% endif %} 23 |24 | 35 | | 36 |
{{ description|safe }}
13 | 27 | {% endif %} 28 |7 | {% trans %}Following notifications occurred and haven't been dismissed since the last reboot.{% endtrans %} 8 |
9 | 10 | {% include '_notifications.html.j2' %} 11 |2 | {% trans %}One of the most important features of router Turris are automatic system updates. Thanks to this function your router's software stays up to date and offers better protection against attacks from the Internet.{% endtrans %} 3 |
4 | 5 |6 | {% trans %}It is highly recommended to have this feature turned on. If you decide to disable it, be warned that this might weaken the security of your router and network in case flaws in the software are found.{% endtrans %} 7 |
8 | 9 |{% trans %}By turning the automatic updates on, you agree to this feature's license agreement. More information is available here.{% endtrans %}
10 | 11 |{% trans %}Most important points from the license agreement:{% endtrans %}
14 | 15 |26 | {% trans %}By enabling of the automatic updates, you confirm that you are the owner of this Turris router and you agree with the full text of the license agreement.{% endtrans %} 27 |
28 |{% trans %}Here you can set the guide walkthrough which will guide you through the basic configuration of your device.{% endtrans %}
10 | 26 |{% trans %}You can set the router to notify you when a specific event occurs, for example when a reboot is required, no space is left on device or an application update is installed. You can use Turris servers to send these emails. Alternatively, if you choose to use a custom server, you must enter some additional settings. These settings are the same as you enter in your email client and you can get them from the provider of your email inbox. In that case, because of security reasons, it is recommended to create a dedicated account for your router.{% endtrans %}
9 |{% trans %}Also, when an automatic restart is required, you can specify the time you want it to occur. If you have email notifications enabled, you can also specify the interval between notification and automatic restart.{% endtrans %}
10 | 25 | 26 |{% trans %}If you need to save the current configuration of this device, you can download a backup file. The configuration is saved as an unencrypted compressed archive (.tar.bz2). Passwords for this configuration interface and for the advanced configuration are not included in the backup.{% endtrans %}
28 | 31 | 32 |{% trans %}To restore the configuration from a backup file, upload it using following form. Keep in mind that IP address of this device might change during the process, causing unavailability of this interface.{% endtrans %}
34 | 41 | 42 |{% trans %}If you need to reboot the device, click on the following button. The reboot process takes approximately 30 seconds, you will be required to log in again after the reboot.{% endtrans %}
44 |{% trans %}Here you can test your connection settings. Remember to click on the Save button before running the test. Note that sometimes it takes a while before the connection is fully initialized. So it might be useful to wait for a while before running this test.{% endtrans %}
3 | 6 || {% trans %}Test type{% endtrans %} | 10 |{% trans %}Status{% endtrans %} | 11 |
|---|---|
| {% trans %}IPv4 connectivity{% endtrans %} | |
| {% trans %}IPv4 gateway connectivity{% endtrans %} | |
| {% trans %}IPv6 connectivity{% endtrans %} | |
| {% trans %}IPv6 gateway connectivity{% endtrans %} |