├── .ecrc ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md ├── dependabot.yml ├── filters.yml ├── labeler.yml └── workflows │ ├── backport.yml │ ├── build-container.yml │ ├── build-docs.yml │ ├── build-gluon.yml │ ├── bump-gluon.yml │ ├── check-ci.yml │ ├── check-patches.yml │ ├── labels.yml │ └── lint.yml ├── .gitignore ├── .luacheckrc ├── .readthedocs.yaml ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── contrib ├── actions │ ├── free-runner-space.sh │ ├── generate-target-filters.py │ ├── run-build.sh │ └── show-system-info.sh ├── ci │ ├── minimal-site │ │ ├── i18n │ │ ├── image-customization.lua │ │ ├── modules │ │ ├── site.conf │ │ └── site.mk │ └── olsr-site │ │ ├── i18n │ │ ├── image-customization.lua │ │ ├── modules │ │ ├── site.conf │ │ └── site.mk ├── depdot.sh ├── docker │ └── Dockerfile ├── i18n-scan.pl ├── lsupgrade.sh ├── push_pkg.sh ├── run_qemu.sh ├── sign.sh └── sigtest.sh ├── docs ├── .gitignore ├── Makefile ├── _static │ └── css │ │ └── custom.css ├── conf.py ├── dev │ ├── basics.rst │ ├── build.rst │ ├── debugging.rst │ ├── hardware.rst │ ├── mac_addresses.rst │ ├── packages.rst │ ├── site_library.rst │ ├── upgrade.rst │ ├── uplink.rst │ └── web │ │ ├── config-mode.rst │ │ ├── controller.rst │ │ ├── i18n.rst │ │ ├── model.rst │ │ └── view.rst ├── features │ ├── authorized-keys.rst │ ├── autoupdater.rst │ ├── configmode.png │ ├── configmode.rst │ ├── dns-cache.rst │ ├── fastd_mode.gif │ ├── monitoring.rst │ ├── multidomain.rst │ ├── multidomain_configmode.gif │ ├── node_configmode.gif │ ├── private-wlan.rst │ ├── roles.rst │ ├── status-page.png │ ├── status-page.rst │ ├── tls.rst │ ├── vpn.rst │ ├── wired-mesh.rst │ └── wlan-configuration.rst ├── index.rst ├── multidomain-site-example │ ├── domains │ │ └── alpha_centauri.conf │ ├── i18n │ ├── image-customization.lua │ ├── modules │ ├── site.conf │ └── site.mk ├── package │ ├── gluon-client-bridge.rst │ ├── gluon-config-mode-domain-select.rst │ ├── gluon-config-mode-geo-location-osm.png │ ├── gluon-config-mode-geo-location-osm.rst │ ├── gluon-ebtables-filter-multicast.rst │ ├── gluon-ebtables-filter-ra-dhcp.rst │ ├── gluon-ebtables-limit-arp.rst │ ├── gluon-ebtables-source-filter.rst │ ├── gluon-hoodselector-domainmap.jpeg │ ├── gluon-hoodselector-rectangle-example.svg │ ├── gluon-hoodselector.dia │ ├── gluon-hoodselector.rst │ ├── gluon-hoodselector.svg │ ├── gluon-logging.rst │ ├── gluon-mesh-batman-adv-logo.svg │ ├── gluon-mesh-batman-adv-multicast-architecture-segmentation.svg │ ├── gluon-mesh-batman-adv-multicast-architecture-to-clients.svg │ ├── gluon-mesh-batman-adv-multicast-architecture-to-mesh.svg │ ├── gluon-mesh-batman-adv-multicast-architecture.dia │ ├── gluon-mesh-batman-adv-multicast.svg │ ├── gluon-mesh-batman-adv.rst │ ├── gluon-mesh-wireless-sae.rst │ ├── gluon-radv-filterd.rst │ ├── gluon-scheduled-domain-switch.rst │ ├── gluon-web-admin.rst │ ├── gluon-web-cellular.png │ ├── gluon-web-cellular.rst │ ├── gluon-web-logging.rst │ ├── gluon-web-network.png │ └── gluon-web-network.rst ├── releases │ ├── index.rst │ ├── v2014.3.1.rst │ ├── v2014.3.rst │ ├── v2014.4.rst │ ├── v2015.1.1.rst │ ├── v2015.1.2.rst │ ├── v2015.1.rst │ ├── v2016.1.1.rst │ ├── v2016.1.2.rst │ ├── v2016.1.3.rst │ ├── v2016.1.4.rst │ ├── v2016.1.5.rst │ ├── v2016.1.6.rst │ ├── v2016.1.rst │ ├── v2016.2.1.rst │ ├── v2016.2.2.rst │ ├── v2016.2.3.rst │ ├── v2016.2.4.rst │ ├── v2016.2.5.rst │ ├── v2016.2.6.rst │ ├── v2016.2.7.rst │ ├── v2016.2.rst │ ├── v2017.1.1.rst │ ├── v2017.1.2.rst │ ├── v2017.1.3.rst │ ├── v2017.1.4.rst │ ├── v2017.1.5.rst │ ├── v2017.1.6.rst │ ├── v2017.1.7.rst │ ├── v2017.1.8.rst │ ├── v2017.1.rst │ ├── v2018.1.1.rst │ ├── v2018.1.2.rst │ ├── v2018.1.3.rst │ ├── v2018.1.4.rst │ ├── v2018.1.rst │ ├── v2018.2.1.rst │ ├── v2018.2.2.rst │ ├── v2018.2.3.rst │ ├── v2018.2.4.rst │ ├── v2018.2.rst │ ├── v2019.1.1.rst │ ├── v2019.1.2.rst │ ├── v2019.1.3.rst │ ├── v2019.1.rst │ ├── v2020.1.1.rst │ ├── v2020.1.2.rst │ ├── v2020.1.3.rst │ ├── v2020.1.4.rst │ ├── v2020.1.rst │ ├── v2020.2.1.rst │ ├── v2020.2.2.rst │ ├── v2020.2.3.rst │ ├── v2020.2.rst │ ├── v2021.1.1.rst │ ├── v2021.1.2.rst │ ├── v2021.1.rst │ ├── v2022.1.1.rst │ ├── v2022.1.2.rst │ ├── v2022.1.3.rst │ ├── v2022.1.4.rst │ ├── v2022.1.rst │ ├── v2023.1.1.rst │ ├── v2023.1.2.rst │ ├── v2023.1.rst │ ├── v2023.2.1.rst │ ├── v2023.2.2.rst │ ├── v2023.2.3.rst │ ├── v2023.2.4.rst │ └── v2023.2.rst ├── requirements.txt ├── site-example │ ├── i18n │ │ ├── de.po │ │ ├── en.po │ │ ├── fr.po │ │ └── gluon-site.pot │ ├── image-customization.lua │ ├── modules │ ├── site.conf │ └── site.mk └── user │ ├── faq.rst │ ├── getting_started.rst │ ├── mtu-diagram_v5.png │ ├── mtu.rst │ ├── site.rst │ ├── supported_devices.rst │ └── x86.rst ├── modules ├── package ├── features ├── gluon-alfred │ ├── Makefile │ ├── files │ │ ├── lib │ │ │ └── gluon │ │ │ │ └── reload.d │ │ │ │ ├── 301-alfred-stop │ │ │ │ └── 799-alfred-start │ │ └── usr │ │ │ └── lib │ │ │ ├── autoupdater │ │ │ ├── abort.d │ │ │ │ └── 60gluon-alfred │ │ │ └── download.d │ │ │ │ └── 40gluon-alfred │ │ │ └── micron.d │ │ │ └── alfred │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── upgrade │ │ ├── 400-alfred-firewall │ │ └── 500-enable-alfred ├── gluon-authorized-keys │ ├── Makefile │ ├── check_site.lua │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── upgrade │ │ └── 100-authorized-keys ├── gluon-autoupdater │ ├── Config.in │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ ├── lib │ │ │ └── gluon │ │ │ │ └── autoupdater │ │ │ │ └── lib.sh │ │ └── usr │ │ │ └── lib │ │ │ └── autoupdater │ │ │ ├── abort.d │ │ │ └── 90gluon-autoupdater │ │ │ └── download.d │ │ │ └── 10gluon-autoupdater │ ├── luasrc │ │ └── lib │ │ │ └── gluon │ │ │ └── upgrade │ │ │ └── 500-autoupdater │ └── src │ │ ├── Makefile │ │ └── respondd.c ├── gluon-client-bridge │ ├── Makefile │ ├── check_site.lua │ └── luasrc │ │ ├── lib │ │ └── gluon │ │ │ └── upgrade │ │ │ ├── 300-gluon-client-bridge-network │ │ │ ├── 310-gluon-client-bridge-local-node │ │ │ └── 320-gluon-client-bridge-wireless │ │ └── usr │ │ └── lib │ │ └── lua │ │ └── gluon │ │ └── client_bridge.lua ├── gluon-config-mode-autoupdater │ ├── Makefile │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-config-mode-autoupdater.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ └── wizard │ │ └── 0050-autoupdater-info.lua ├── gluon-config-mode-contact-info │ ├── Makefile │ ├── check_site.lua │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-config-mode-contact-info.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ └── wizard │ │ └── 0500-contact-info.lua ├── gluon-config-mode-core │ ├── Makefile │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ ├── config-mode │ │ │ ├── view │ │ │ │ └── wizard │ │ │ │ │ ├── reboot.html │ │ │ │ │ └── welcome.html │ │ │ └── www │ │ │ │ └── index.html │ │ │ └── setup-mode │ │ │ └── rc.d │ │ │ └── S50uhttpd │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-config-mode-core.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── controller │ │ └── gluon-config-mode │ │ │ └── index.lua │ │ ├── model │ │ └── gluon-config-mode │ │ │ └── wizard.lua │ │ ├── reboot │ │ └── 0900-msg-reboot.lua │ │ └── www │ │ └── cgi-bin │ │ └── config ├── gluon-config-mode-domain-select │ ├── Makefile │ ├── check_site.lua │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ └── wizard │ │ └── 0200-domain-select.lua ├── gluon-config-mode-geo-location-osm │ ├── Makefile │ ├── check_site.lua │ ├── i18n │ │ ├── de.po │ │ └── gluon-config-mode-geo-location-osm.pot │ └── luasrc │ │ └── usr │ │ └── lib │ │ └── lua │ │ └── gluon │ │ └── config-mode │ │ └── geo-location-osm.lua ├── gluon-config-mode-geo-location │ ├── Makefile │ ├── check_site.lua │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-config-mode-geo-location.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ └── wizard │ │ └── 0400-geo-location.lua ├── gluon-config-mode-hostname │ ├── Makefile │ ├── check_site.lua │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-config-mode-hostname.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ └── wizard │ │ └── 0100-hostname.lua ├── gluon-config-mode-mesh-vpn │ ├── Makefile │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-config-mode-mesh-vpn.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── reboot │ │ └── 0100-mesh-vpn.lua │ │ └── wizard │ │ └── 0300-mesh-vpn.lua ├── gluon-config-mode-outdoor │ ├── Makefile │ ├── i18n │ │ ├── de.po │ │ └── gluon-config-mode-outdoor.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ └── wizard │ │ └── 0250-outdoor.lua ├── gluon-config-mode-theme │ ├── Makefile │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ └── config-mode │ │ │ ├── view │ │ │ └── theme │ │ │ │ └── layout.html │ │ │ └── www │ │ │ └── static │ │ │ └── gluon.css │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-config-mode-theme.pot │ └── sass │ │ └── gluon.scss ├── gluon-core │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ ├── etc │ │ │ ├── config │ │ │ │ └── gluon │ │ │ ├── hotplug.d │ │ │ │ ├── firmware │ │ │ │ │ └── 20-gluon-ath10k-fwcfg │ │ │ │ └── ieee80211 │ │ │ │ │ └── 01-gluon-core-codel-memusage │ │ │ ├── init.d │ │ │ │ └── gluon-core-reconfigure │ │ │ ├── sysctl.d │ │ │ │ └── 30-gluon-core.conf │ │ │ └── uci-defaults │ │ │ │ └── zzz-gluon-upgrade │ │ ├── lib │ │ │ ├── gluon │ │ │ │ ├── ath10k-fwcfg.txt │ │ │ │ ├── core │ │ │ │ │ ├── mesh │ │ │ │ │ │ ├── post-setup.d │ │ │ │ │ │ │ └── .keep │ │ │ │ │ │ ├── setup.d │ │ │ │ │ │ │ └── .keep │ │ │ │ │ │ └── teardown.d │ │ │ │ │ │ │ └── .keep │ │ │ │ │ └── sysconfig │ │ │ │ │ │ └── .keep │ │ │ │ ├── label_mac.sh │ │ │ │ ├── reload.d │ │ │ │ │ ├── 302-sysntpd-stop │ │ │ │ │ ├── 380-network-stop │ │ │ │ │ ├── 381-dnsmasq-stop │ │ │ │ │ ├── 381-firewall-stop │ │ │ │ │ ├── 710-gluon-core-reconfigure-start │ │ │ │ │ ├── 719-dnsmasq-start │ │ │ │ │ ├── 719-firewall-start │ │ │ │ │ ├── 720-network-start │ │ │ │ │ └── 798-sysntpd-start │ │ │ │ └── upgrade │ │ │ │ │ ├── 001-reset-uci │ │ │ │ │ └── 998-commit │ │ │ ├── netifd │ │ │ │ └── proto │ │ │ │ │ ├── gluon_mesh.sh │ │ │ │ │ └── gluon_wired.sh │ │ │ └── upgrade │ │ │ │ └── keep.d │ │ │ │ └── gluon │ │ └── usr │ │ │ └── bin │ │ │ ├── gluon-list-mesh-interfaces │ │ │ ├── gluon-reconfigure │ │ │ └── gluon-reload │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-core.pot │ ├── luasrc │ │ ├── lib │ │ │ └── gluon │ │ │ │ ├── check-site.lua │ │ │ │ └── upgrade │ │ │ │ ├── 002-migrate-system │ │ │ │ ├── 005-set-domain │ │ │ │ ├── 010-primary-mac │ │ │ │ ├── 020-interfaces │ │ │ │ ├── 021-interface-roles │ │ │ │ ├── 030-system │ │ │ │ ├── 110-network │ │ │ │ ├── 115-swconfig │ │ │ │ ├── 120-ntp-servers │ │ │ │ ├── 150-poe-passthrough │ │ │ │ ├── 180-outdoors │ │ │ │ ├── 190-preserve-wireless-channels │ │ │ │ ├── 200-wireless │ │ │ │ ├── 205-dsa-conduit │ │ │ │ ├── 210-interface-mesh │ │ │ │ ├── 250-cellular │ │ │ │ ├── 300-firewall-rules │ │ │ │ ├── 500-opkg │ │ │ │ ├── 820-dns-config │ │ │ │ ├── 997-migrate-preserved │ │ │ │ └── 999-version │ │ └── usr │ │ │ ├── bin │ │ │ ├── gluon-info │ │ │ ├── gluon-show-site │ │ │ └── gluon-switch-domain │ │ │ └── lib │ │ │ └── lua │ │ │ └── gluon │ │ │ ├── ethernet.lua │ │ │ ├── info.lua │ │ │ ├── iputil.lua │ │ │ ├── platform.lua │ │ │ ├── sysconfig.lua │ │ │ ├── users.lua │ │ │ ├── util.lua │ │ │ └── wireless.lua │ └── src │ │ ├── CMakeLists.txt │ │ └── site.c ├── gluon-ebtables-filter-multicast │ ├── Makefile │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── ebtables │ │ ├── 110-mcast-allow-arp │ │ ├── 110-mcast-allow-babel │ │ ├── 110-mcast-allow-btlpd │ │ ├── 110-mcast-allow-dhcpv4 │ │ ├── 110-mcast-allow-dhcpv6 │ │ ├── 110-mcast-allow-icmpv6 │ │ ├── 110-mcast-allow-igmp │ │ ├── 110-mcast-allow-ospf │ │ ├── 110-mcast-allow-respondd │ │ ├── 110-mcast-allow-ripng │ │ └── 355-mcast-drop ├── gluon-ebtables-filter-ra-dhcp │ ├── Makefile │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── ebtables │ │ ├── 200-dir-dhcpv4 │ │ ├── 200-dir-dhcpv6 │ │ └── 200-dir-radv ├── gluon-ebtables-limit-arp │ ├── Makefile │ ├── files │ │ ├── etc │ │ │ └── init.d │ │ │ │ └── gluon-arp-limiter │ │ ├── lib │ │ │ └── gluon │ │ │ │ └── reload.d │ │ │ │ ├── 380-gluon-arp-limiter-stop │ │ │ │ └── 720-gluon-arp-limiter-start │ │ └── usr │ │ │ └── lib │ │ │ └── autoupdater │ │ │ ├── abort.d │ │ │ └── 15start-arp-limiter │ │ │ └── upgrade.d │ │ │ └── 05stop-arp-limiter │ ├── luasrc │ │ └── lib │ │ │ └── gluon │ │ │ └── ebtables │ │ │ ├── 100-arp-limit-chains │ │ │ └── 320-arp-limit-rules │ └── src │ │ ├── Makefile │ │ ├── addr_store.c │ │ ├── addr_store.h │ │ ├── gluon-arp-limiter.c │ │ ├── gluon-arp-limiter.h │ │ ├── lookup3.c │ │ ├── lookup3.h │ │ ├── mac.c │ │ └── mac.h ├── gluon-ebtables-source-filter │ ├── Makefile │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── ebtables │ │ ├── 100-local-forward-chain │ │ ├── 110-local-forward-allow-arp │ │ ├── 110-local-forward-allow-ipv4 │ │ ├── 110-local-forward-allow-ipv6 │ │ └── 300-local-forward-rules ├── gluon-ebtables │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ ├── etc │ │ │ └── init.d │ │ │ │ └── gluon-ebtables │ │ └── lib │ │ │ └── gluon │ │ │ └── reload.d │ │ │ ├── 381-gluon-ebtables-stop │ │ │ └── 719-gluon-ebtables-start │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── ebtables │ │ ├── 100-dir-chain │ │ ├── 101-dir-rules │ │ ├── 105-mcast-drop-igmp-mld │ │ └── 350-mcast-dir-rules ├── gluon-hoodselector │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ └── usr │ │ │ └── lib │ │ │ └── micron.d │ │ │ └── hoodselector │ └── luasrc │ │ └── usr │ │ ├── lib │ │ └── lua │ │ │ └── hoodselector │ │ │ └── util.lua │ │ └── sbin │ │ └── hoodselector ├── gluon-iptables-clamp-mss-to-pmtu │ ├── Makefile │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ └── mesh-vpn │ │ │ └── iptables-mss.rules │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── upgrade │ │ └── 800-iptables-mesh-vpn-clamp-mss-to-pmtu ├── gluon-l3roamd │ ├── Makefile │ ├── files │ │ └── etc │ │ │ └── init.d │ │ │ └── gluon-l3roamd │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── upgrade │ │ └── 320-firewall-l3roamd ├── gluon-lock-password │ ├── Makefile │ └── files │ │ └── lib │ │ └── gluon │ │ └── upgrade │ │ └── 100-lock-password ├── gluon-logging │ ├── Makefile │ ├── check_site.lua │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── upgrade │ │ └── 040-syslog ├── gluon-mesh-batman-adv │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ ├── etc │ │ │ └── sysctl.d │ │ │ │ └── 31-gluon-mesh-batman-adv.conf │ │ ├── lib │ │ │ ├── gluon │ │ │ │ ├── core │ │ │ │ │ └── mesh │ │ │ │ │ │ ├── post-setup.d │ │ │ │ │ │ └── 30-gluon-mesh-batman-adv │ │ │ │ │ │ ├── setup.d │ │ │ │ │ │ └── 30-gluon-mesh-batman-adv │ │ │ │ │ │ └── teardown.d │ │ │ │ │ │ └── 70-gluon-mesh-batman-adv │ │ │ │ ├── respondd │ │ │ │ │ └── client.dev │ │ │ │ └── state │ │ │ │ │ └── check.d │ │ │ │ │ ├── has_default_gw4 │ │ │ │ │ └── has_neighbours │ │ │ └── netifd │ │ │ │ └── proto │ │ │ │ └── gluon_bat0.sh │ │ └── usr │ │ │ └── lib │ │ │ └── autoupdater │ │ │ ├── abort.d │ │ │ └── 10start-network │ │ │ └── upgrade.d │ │ │ └── 10stop-network │ ├── luasrc │ │ └── lib │ │ │ └── gluon │ │ │ ├── ebtables │ │ │ ├── 250-next-node │ │ │ └── 300-radv-input-output │ │ │ ├── radvd │ │ │ └── arguments │ │ │ └── upgrade │ │ │ ├── 310-gluon-mesh-batman-adv-mesh │ │ │ ├── 320-gluon-mesh-batman-adv-client-bridge │ │ │ └── 330-gluon-mesh-batman-adv-mac-addresses │ └── src │ │ ├── Makefile │ │ ├── respondd-common.h │ │ ├── respondd-neighbours.c │ │ ├── respondd-nodeinfo.c │ │ ├── respondd-statistics.c │ │ └── respondd.c ├── gluon-mesh-layer3-common │ ├── Makefile │ ├── check_site.lua │ └── luasrc │ │ ├── lib │ │ └── gluon │ │ │ ├── radvd │ │ │ └── arguments │ │ │ └── upgrade │ │ │ ├── 250-layer3-ip6 │ │ │ └── 310-layer3-firewall │ │ └── usr │ │ └── lib │ │ └── lua │ │ └── gluon │ │ └── l3.lua ├── gluon-mesh-olsrd │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ ├── lib │ │ │ └── gluon │ │ │ │ ├── core │ │ │ │ └── mesh │ │ │ │ │ ├── post-setup.d │ │ │ │ │ └── 30-reload-olsr │ │ │ │ │ └── teardown.d │ │ │ │ │ └── 70-reload-olsr │ │ │ │ └── respondd │ │ │ │ └── client.dev │ │ └── usr │ │ │ └── lib │ │ │ └── autoupdater │ │ │ ├── abort.d │ │ │ └── 10olsrd │ │ │ └── upgrade.d │ │ │ └── 10olsrd │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── upgrade │ │ ├── 360-gluon-mesh-olsrd-setup-intf │ │ └── 370-gluon-mesh-olsrd-setup-fw ├── gluon-mesh-vpn-core │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ └── mesh-vpn │ │ │ └── iptables.rules │ ├── luasrc │ │ ├── lib │ │ │ └── gluon │ │ │ │ ├── mesh-vpn │ │ │ │ └── update-config │ │ │ │ └── upgrade │ │ │ │ └── 500-mesh-vpn │ │ └── usr │ │ │ ├── bin │ │ │ └── gluon-wan │ │ │ └── lib │ │ │ └── lua │ │ │ └── gluon │ │ │ └── mesh-vpn.lua │ └── src │ │ ├── Makefile │ │ └── respondd.c ├── gluon-mesh-vpn-fastd-l2tp │ ├── Makefile │ └── files │ │ └── lib │ │ └── gluon │ │ └── mesh-vpn │ │ └── fastd │ │ └── l2tp ├── gluon-mesh-vpn-fastd │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ ├── mesh-vpn │ │ │ ├── fastd │ │ │ │ └── .keep │ │ │ └── provider │ │ │ │ └── fastd │ │ │ └── reload.d │ │ │ ├── 305-fastd-stop │ │ │ └── 795-fastd-start │ ├── luasrc │ │ ├── lib │ │ │ └── gluon │ │ │ │ └── upgrade │ │ │ │ └── 400-mesh-vpn-fastd │ │ └── usr │ │ │ └── lib │ │ │ └── lua │ │ │ └── gluon │ │ │ └── mesh-vpn │ │ │ └── provider │ │ │ └── fastd.lua │ └── src │ │ ├── Makefile │ │ └── respondd.c ├── gluon-mesh-vpn-sqm │ └── Makefile ├── gluon-mesh-vpn-wireguard │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ └── lib │ │ │ ├── gluon │ │ │ └── mesh-vpn │ │ │ │ ├── provider │ │ │ │ └── wireguard │ │ │ │ └── wireguard_pubkey.sh │ │ │ └── netifd │ │ │ └── proto │ │ │ └── gluon_wireguard.sh │ ├── luasrc │ │ ├── lib │ │ │ └── gluon │ │ │ │ └── upgrade │ │ │ │ └── 400-mesh-vpn-wireguard │ │ └── usr │ │ │ └── lib │ │ │ └── lua │ │ │ └── gluon │ │ │ └── mesh-vpn │ │ │ └── provider │ │ │ └── wireguard.lua │ └── src │ │ ├── Makefile │ │ ├── gluon-hex-to-b64.c │ │ └── respondd.c ├── gluon-mesh-wireless-sae │ ├── Makefile │ ├── check_site.lua │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── upgrade │ │ └── 205-wireless-mesh-sae ├── gluon-mmfd │ ├── Makefile │ ├── files │ │ └── etc │ │ │ └── init.d │ │ │ └── mmfd │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── upgrade │ │ ├── 310-gluon-mmfd-firewall │ │ └── 430-gluon-mmfd-interface ├── gluon-neighbour-info │ ├── Makefile │ ├── luasrc │ │ └── lib │ │ │ └── gluon │ │ │ └── upgrade │ │ │ └── 400-neighbour-info-firewall │ └── src │ │ ├── Makefile │ │ └── gluon-neighbour-info.c ├── gluon-node-info │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ └── etc │ │ │ └── config │ │ │ └── gluon-node-info │ ├── luasrc │ │ └── lib │ │ │ └── gluon │ │ │ └── upgrade │ │ │ ├── 500-node-info-system │ │ │ └── 510-node-info-role │ └── src │ │ ├── Makefile │ │ └── respondd.c ├── gluon-private-wifi │ ├── Makefile │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── upgrade │ │ └── 325-gluon-private-wifi ├── gluon-radv-filterd │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ ├── etc │ │ │ └── init.d │ │ │ │ └── gluon-radv-filterd │ │ └── lib │ │ │ └── gluon │ │ │ └── reload.d │ │ │ ├── 350-gluon-radv-filterd-stop │ │ │ └── 750-gluon-radv-filterd-start │ ├── luasrc │ │ └── lib │ │ │ └── gluon │ │ │ └── ebtables │ │ │ └── 400-radv-filterd │ └── src │ │ ├── Makefile │ │ ├── gluon-radv-filterd.c │ │ ├── mac.h │ │ └── respondd.c ├── gluon-radvd │ ├── Makefile │ └── files │ │ ├── etc │ │ └── init.d │ │ │ └── gluon-radvd │ │ ├── lib │ │ └── gluon │ │ │ └── reload.d │ │ │ ├── 350-gluon-radvd-stop │ │ │ └── 750-gluon-radvd-start │ │ └── usr │ │ └── lib │ │ └── autoupdater │ │ ├── abort.d │ │ └── 80gluon-radvd │ │ └── download.d │ │ └── 20gluon-radvd ├── gluon-respondd │ ├── Makefile │ ├── files │ │ ├── etc │ │ │ └── init.d │ │ │ │ └── gluon-respondd │ │ ├── lib │ │ │ └── gluon │ │ │ │ ├── reload.d │ │ │ │ ├── 350-gluon-respondd-stop │ │ │ │ └── 750-gluon-respondd-start │ │ │ │ └── respondd │ │ │ │ ├── neighbours.cache │ │ │ │ ├── nodeinfo.cache │ │ │ │ └── statistics.cache │ │ └── usr │ │ │ └── lib │ │ │ └── autoupdater │ │ │ ├── abort.d │ │ │ └── 50gluon-respondd │ │ │ └── download.d │ │ │ └── 50gluon-respondd │ ├── luasrc │ │ └── lib │ │ │ └── gluon │ │ │ └── upgrade │ │ │ └── 400-respondd-firewall │ └── src │ │ ├── Makefile │ │ ├── respondd-common.h │ │ ├── respondd-neighbours.c │ │ ├── respondd-nodeinfo.c │ │ ├── respondd-statistics.c │ │ └── respondd.c ├── gluon-scheduled-domain-switch │ ├── Makefile │ ├── check_site.lua │ └── luasrc │ │ ├── lib │ │ └── gluon │ │ │ ├── scheduled-domain-switch │ │ │ └── switch-domain │ │ │ └── upgrade │ │ │ └── 950-gluon-scheduled-domain-switch │ │ └── usr │ │ └── bin │ │ └── gluon-check-connection ├── gluon-setup-mode │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ ├── etc │ │ │ ├── config │ │ │ │ └── gluon-setup-mode │ │ │ └── hotplug.d │ │ │ │ └── button │ │ │ │ └── 50-gluon-setup-mode │ │ ├── lib │ │ │ ├── gluon │ │ │ │ └── setup-mode │ │ │ │ │ ├── ash-login │ │ │ │ │ └── rc.d │ │ │ │ │ ├── S11bootcount │ │ │ │ │ ├── S13urngd │ │ │ │ │ ├── S15gluon-setup-mode │ │ │ │ │ ├── S20network │ │ │ │ │ ├── S50dropbear │ │ │ │ │ ├── S60dnsmasq │ │ │ │ │ └── S96led │ │ │ └── preinit │ │ │ │ └── 90_setup_mode │ │ └── usr │ │ │ └── bin │ │ │ └── gluon-enter-setup-mode │ └── luasrc │ │ ├── lib │ │ └── gluon │ │ │ └── upgrade │ │ │ ├── 300-setup-mode │ │ │ └── 320-setup-ifname │ │ └── usr │ │ └── lib │ │ └── lua │ │ └── gluon │ │ └── setup-mode.lua ├── gluon-site │ └── Makefile ├── gluon-state-check │ ├── Makefile │ ├── files │ │ ├── lib │ │ │ └── gluon │ │ │ │ └── state │ │ │ │ └── check.d │ │ │ │ └── has_default_gw6 │ │ └── usr │ │ │ └── lib │ │ │ └── micron.d │ │ │ └── gluon-state-check │ └── luasrc │ │ └── usr │ │ └── sbin │ │ └── gluon-state-check ├── gluon-status-page-mesh-batman-adv │ ├── Makefile │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ └── status-page │ │ │ └── www │ │ │ └── cgi-bin │ │ │ └── dyn │ │ │ └── neighbours-batadv │ ├── luasrc │ │ └── lib │ │ │ └── gluon │ │ │ └── status-page │ │ │ └── mesh.lua │ └── src │ │ ├── Makefile │ │ └── neighbours-batadv.c ├── gluon-status-page │ ├── Makefile │ ├── files │ │ ├── lib │ │ │ └── gluon │ │ │ │ └── status-page │ │ │ │ ├── view │ │ │ │ ├── layout.html │ │ │ │ └── status-page.html │ │ │ │ └── www │ │ │ │ ├── cgi-bin │ │ │ │ └── dyn │ │ │ │ │ ├── neighbours-nodeinfo │ │ │ │ │ ├── stations │ │ │ │ │ └── statistics │ │ │ │ ├── index.html │ │ │ │ ├── robots.txt │ │ │ │ └── static │ │ │ │ └── status-page.css │ │ └── usr │ │ │ └── lib │ │ │ └── autoupdater │ │ │ ├── abort.d │ │ │ └── 70gluon-status-page │ │ │ └── download.d │ │ │ └── 30gluon-status-page │ ├── i18n │ │ ├── de.po │ │ ├── fr.README │ │ ├── gluon-status-page.pot │ │ └── ru.README │ ├── javascript │ │ ├── status-page.js │ │ └── status-page.min.js │ ├── luasrc │ │ └── lib │ │ │ └── gluon │ │ │ ├── status-page │ │ │ ├── controller │ │ │ │ └── status-page.lua │ │ │ └── www │ │ │ │ └── cgi-bin │ │ │ │ └── status │ │ │ └── upgrade │ │ │ └── 500-status-page │ ├── sass │ │ └── status-page.scss │ └── src │ │ ├── Makefile │ │ └── stations.c ├── gluon-tls │ └── Makefile ├── gluon-wan-dnsmasq │ ├── Makefile │ ├── files │ │ ├── etc │ │ │ ├── config │ │ │ │ └── gluon-wan-dnsmasq │ │ │ ├── hotplug.d │ │ │ │ └── iface │ │ │ │ │ └── 50-gluon-wan-dnsmasq │ │ │ └── init.d │ │ │ │ └── gluon-wan-dnsmasq │ │ └── lib │ │ │ └── gluon │ │ │ ├── reload.d │ │ │ ├── 340-gluon-wan-dnsmasq-stop │ │ │ └── 760-gluon-wan-dnsmasq-start │ │ │ └── wan-dnsmasq │ │ │ └── interface.d │ │ │ └── 050-gluon-wan-dnsmasq │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── wan-dnsmasq │ │ └── update.lua ├── gluon-web-admin │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ └── config-mode │ │ │ └── view │ │ │ └── admin │ │ │ ├── info.html │ │ │ ├── upgrade.html │ │ │ ├── upgrade_confirm.html │ │ │ └── upgrade_reboot.html │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-web-admin.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── controller │ │ └── admin │ │ │ ├── index.lua │ │ │ └── upgrade.lua │ │ └── model │ │ └── admin │ │ └── remote.lua ├── gluon-web-autoupdater │ ├── Makefile │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-web-autoupdater.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── controller │ │ └── admin │ │ │ └── autoupdater.lua │ │ └── model │ │ └── admin │ │ └── autoupdater.lua ├── gluon-web-cellular │ ├── Makefile │ ├── i18n │ │ ├── de.po │ │ └── gluon-web-cellular.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── controller │ │ └── admin │ │ │ └── cellular.lua │ │ └── model │ │ └── admin │ │ └── cellular.lua ├── gluon-web-logging │ ├── Makefile │ ├── i18n │ │ ├── de.po │ │ └── gluon-web-logging.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── controller │ │ └── admin │ │ │ └── logging.lua │ │ └── model │ │ └── admin │ │ └── logging.lua ├── gluon-web-mesh-vpn-fastd │ ├── Makefile │ ├── check_site.lua │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ └── config-mode │ │ │ └── view │ │ │ └── mesh-vpn-fastd.html │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-web-mesh-vpn-fastd.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── controller │ │ └── admin │ │ │ └── mesh_vpn_fastd.lua │ │ └── model │ │ └── admin │ │ └── mesh_vpn_fastd.lua ├── gluon-web-model │ ├── Makefile │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ └── web │ │ │ └── view │ │ │ └── model │ │ │ ├── dynlist.html │ │ │ ├── form.html │ │ │ ├── fvalue.html │ │ │ ├── lvalue.html │ │ │ ├── mlvalue.html │ │ │ ├── section.html │ │ │ ├── tvalue.html │ │ │ ├── value.html │ │ │ ├── valuewrapper.html │ │ │ ├── warning.html │ │ │ └── wrapper.html │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-web-model.pot │ ├── javascript │ │ ├── gluon-web-model.js │ │ └── gluon-web-model.min.js │ └── luasrc │ │ └── usr │ │ └── lib │ │ └── lua │ │ └── gluon │ │ └── web │ │ ├── model.lua │ │ └── model │ │ ├── classes.lua │ │ └── datatypes.lua ├── gluon-web-network │ ├── Makefile │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-web-network.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── controller │ │ └── admin │ │ │ └── network.lua │ │ └── model │ │ └── admin │ │ └── network.lua ├── gluon-web-node-role │ ├── Makefile │ ├── check_site.lua │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-web-node-role.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── controller │ │ └── admin │ │ │ └── noderole.lua │ │ └── model │ │ └── admin │ │ └── noderole.lua ├── gluon-web-osm │ ├── Makefile │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ └── web │ │ │ └── view │ │ │ └── model │ │ │ └── osm │ │ │ └── map.html │ ├── javascript │ │ ├── gluon-web-osm.js │ │ └── gluon-web-osm.min.js │ └── luasrc │ │ └── usr │ │ └── lib │ │ └── lua │ │ └── gluon │ │ └── web │ │ └── model │ │ └── osm.lua ├── gluon-web-private-wifi │ ├── Makefile │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-web-private-wifi.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── controller │ │ └── admin │ │ │ └── privatewifi.lua │ │ └── model │ │ └── admin │ │ └── privatewifi.lua ├── gluon-web-wifi-config │ ├── Makefile │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-web-wifi-config.pot │ └── luasrc │ │ └── lib │ │ └── gluon │ │ └── config-mode │ │ ├── controller │ │ └── admin │ │ │ └── wifi-config.lua │ │ └── model │ │ └── admin │ │ └── wifi-config.lua ├── gluon-web │ ├── Makefile │ ├── files │ │ └── lib │ │ │ └── gluon │ │ │ └── web │ │ │ └── view │ │ │ └── error │ │ │ ├── 404.html │ │ │ └── 500.html │ ├── i18n │ │ ├── de.po │ │ ├── fr.po │ │ └── gluon-web.pot │ ├── luasrc │ │ └── usr │ │ │ └── lib │ │ │ └── lua │ │ │ └── gluon │ │ │ └── web │ │ │ ├── cgi.lua │ │ │ ├── dispatcher.lua │ │ │ ├── http.lua │ │ │ ├── http │ │ │ └── protocol.lua │ │ │ ├── i18n.lua │ │ │ ├── template.lua │ │ │ └── util.lua │ └── src │ │ ├── Makefile │ │ ├── gluon-po2lmo.c │ │ ├── template_lmo.c │ │ ├── template_lmo.h │ │ ├── template_lualib.c │ │ ├── template_parser.c │ │ ├── template_parser.h │ │ ├── template_utils.c │ │ └── template_utils.h ├── gluon-wireless-encryption-wpa3 │ └── Makefile ├── gluon.mk ├── libbatadv │ ├── Makefile │ ├── files │ │ └── libbatadv.pc │ └── src │ │ ├── Makefile │ │ ├── batadv-genl.c │ │ ├── batadv-genl.h │ │ └── batman_adv.h └── libgluonutil │ ├── Makefile │ └── src │ ├── CMakeLists.txt │ ├── libgluonutil.c │ └── libgluonutil.h ├── patches ├── openwrt │ ├── 0001-procd-add-support-for-alternative-rc.d-directories.patch │ ├── 0002-base-files-disable-reset-button-handling.patch │ ├── 0003-dropbear-add-a-failsafe-mode-that-will-always-allow-password-less-root-login.patch │ ├── 0004-HACK-opkg-do-not-preserve-opkg-keys-on-upgrades-by-default.patch │ ├── 0005-kernel-bridge-Implement-MLD-Querier-wake-up-calls-Android-bug-workaround.patch │ ├── 0006-mac80211-silence-warning-for-missing-rate-information.patch │ ├── 0007-net-mac80211-override-incompatible-basic-rates-for-mesh.patch │ ├── 0008-net-mac80211-force-backwards-compatible-basic-rates.patch │ └── 0009-mt76-import-MT7915-recovery-fixes.patch └── packages │ └── routing │ ├── 0001-alfred-adjust-intervals.patch │ ├── 0002-batman-adv-Introduce-no-noflood-mark.patch │ └── 0003-batctl-Add-noflood_mark-command.patch ├── scripts ├── basic_openwrt_config.sh ├── clean_output.lua ├── container.sh ├── copy_output.lua ├── default_feeds.sh ├── domain_aliases.lua ├── feature_lib.lua ├── feeds.sh ├── filesize.sh ├── generate_manifest.lua ├── getversion.sh ├── image_customization_lib.lua ├── lint-editorconfig.sh ├── lint-lua.sh ├── lint-sh.sh ├── module_check.sh ├── modules.sh ├── patch.sh ├── rfc3339date.lua ├── sha256sum.sh ├── site_config.lua ├── target_config.lua ├── target_config_check.lua ├── target_config_lib.lua ├── target_lib.lua ├── update-ci.sh ├── update-modules.sh ├── update-patches.sh └── update.sh ├── targets ├── armsr-armv7 ├── armsr-armv8 ├── armsr.inc ├── ath79-generic ├── ath79-mikrotik ├── ath79-nand ├── bcm27xx-bcm2708 ├── bcm27xx-bcm2709 ├── bcm27xx-bcm2710 ├── bcm27xx-bcm2711 ├── bcm27xx.inc ├── generic ├── ipq40xx-generic ├── ipq40xx-mikrotik ├── ipq806x-generic ├── kirkwood-generic ├── lantiq-xrx200 ├── lantiq-xrx200_legacy ├── lantiq-xway ├── mediatek-filogic ├── mediatek-mt7622 ├── mikrotik.inc ├── mpc85xx-p1010 ├── mpc85xx-p1020 ├── mvebu-cortexa9 ├── ramips-mt7620 ├── ramips-mt7621 ├── ramips-mt76x8 ├── rockchip-armv8 ├── sunxi-cortexa7 ├── targets.mk ├── x86-64 ├── x86-generic ├── x86-geode ├── x86-legacy └── x86.inc └── tests ├── test_batctl_tpmeter.py ├── test_gluon-reconfigure.py └── test_respondd.py /.ecrc: -------------------------------------------------------------------------------- 1 | { 2 | "Exclude": ["docs/_build"] 3 | } 4 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Docs: 2 | 3 | version: 2 4 | 5 | updates: 6 | - package-ecosystem: github-actions 7 | directory: / 8 | schedule: {interval: monthly} 9 | 10 | - package-ecosystem: pip 11 | directory: /docs/ 12 | schedule: {interval: monthly} 13 | -------------------------------------------------------------------------------- /.github/workflows/backport.yml: -------------------------------------------------------------------------------- 1 | name: Backport 2 | on: 3 | pull_request_target: 4 | types: [closed, labeled] 5 | permissions: 6 | contents: write # so it can comment 7 | pull-requests: write # so it can create pull requests 8 | jobs: 9 | backport: 10 | name: Backport Pull Request 11 | if: github.repository_owner == 'freifunk-gluon' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name)) 12 | runs-on: ubuntu-22.04 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Create backport PRs 16 | uses: korthout/backport-action@v3.2.0 17 | with: 18 | # Config README: https://github.com/korthout/backport-action#backport-action 19 | pull_description: |- 20 | Automatic backport to `${target_branch}`, triggered by a label in #${pull_number}. 21 | -------------------------------------------------------------------------------- /.github/workflows/build-docs.yml: -------------------------------------------------------------------------------- 1 | name: Build Documentation 2 | on: 3 | push: 4 | paths: 5 | - 'docs/**' 6 | - '.github/workflows/build-docs.yml' 7 | pull_request: 8 | types: [opened, synchronize, reopened] 9 | paths: 10 | - 'docs**/' 11 | - '.github/workflows/build-docs.yml' 12 | permissions: 13 | contents: read 14 | 15 | jobs: 16 | build-documentation: 17 | name: docs 18 | runs-on: ubuntu-24.04 19 | steps: 20 | - uses: actions/checkout@v4 21 | - name: Install Dependencies 22 | run: sudo pip3 install -r docs/requirements.txt 23 | - name: Build documentation 24 | run: make -C docs html 25 | - name: Archive build output 26 | uses: actions/upload-artifact@v4 27 | with: 28 | name: docs_output 29 | path: docs/_build/html 30 | -------------------------------------------------------------------------------- /.github/workflows/check-ci.yml: -------------------------------------------------------------------------------- 1 | name: Check generated CI 2 | on: 3 | push: 4 | pull_request: 5 | types: [opened, synchronize, reopened] 6 | permissions: 7 | contents: read 8 | 9 | jobs: 10 | check-ci: 11 | name: Check generated CI 12 | runs-on: ubuntu-22.04 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Install example site 16 | run: ln -s ./docs/site-example ./site 17 | - name: Update CI 18 | run: make update-ci 19 | - name: Show diff 20 | run: git status; git diff 21 | - name: Patch status 22 | run: git diff-files --quiet 23 | -------------------------------------------------------------------------------- /.github/workflows/check-patches.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Check patches 3 | on: 4 | push: 5 | paths: 6 | - 'modules' 7 | - 'patches/**' 8 | - '.github/workflows/check-patches.yml' 9 | pull_request: 10 | types: [opened, synchronize, reopened] 11 | paths: 12 | - 'modules' 13 | - 'patches/**' 14 | - '.github/workflows/check-patches.yml' 15 | permissions: 16 | contents: read 17 | 18 | jobs: 19 | check-patches: 20 | name: Check patches 21 | runs-on: ubuntu-22.04 22 | steps: 23 | - uses: actions/checkout@v4 24 | - name: Refresh patches 25 | run: make refresh-patches GLUON_SITEDIR="contrib/ci/minimal-site" 26 | - name: Show diff 27 | run: git status; git diff 28 | - name: Patch status 29 | run: git diff-files --quiet 30 | 31 | -------------------------------------------------------------------------------- /.github/workflows/labels.yml: -------------------------------------------------------------------------------- 1 | name: "Label PRs" 2 | 3 | on: 4 | # only execute base branch actions 5 | pull_request_target: 6 | 7 | permissions: 8 | contents: read 9 | 10 | jobs: 11 | labels: 12 | permissions: 13 | contents: read # for actions/labeler to determine modified files 14 | pull-requests: write # for actions/labeler to add labels to PRs 15 | runs-on: ubuntu-22.04 16 | if: github.repository_owner == 'freifunk-gluon' 17 | steps: 18 | - uses: actions/labeler@v5 19 | with: 20 | repo-token: ${{ secrets.GITHUB_TOKEN }} 21 | sync-labels: true 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | /openwrt 3 | /output 4 | /site 5 | /tmp 6 | /packages 7 | .bash_history 8 | .subversion 9 | .wget-hsts 10 | /.scmversion 11 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yaml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Build documentation in the docs/ directory with Sphinx 9 | sphinx: 10 | configuration: docs/conf.py 11 | 12 | # Optionally set the version of Python and requirements required to build your docs 13 | python: 14 | install: 15 | - requirements: docs/requirements.txt 16 | 17 | build: 18 | os: ubuntu-22.04 19 | tools: 20 | python: "3.11" 21 | -------------------------------------------------------------------------------- /contrib/actions/free-runner-space.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # For a List of pre-installed packages on the runner image see 4 | # https://github.com/actions/runner-images/tree/main?tab=readme-ov-file#available-images 5 | 6 | echo "Disk space before cleanup" 7 | df -h 8 | 9 | # Remove packages not required to run the Gluon build CI 10 | sudo apt-get -y remove \ 11 | dotnet-* \ 12 | firefox \ 13 | google-chrome-stable \ 14 | kubectl \ 15 | microsoft-edge-stable \ 16 | temurin-*-jdk 17 | 18 | # Remove Android SDK tools 19 | sudo rm -rf /usr/local/lib/android 20 | 21 | echo "Disk space after cleanup" 22 | df -h 23 | 24 | -------------------------------------------------------------------------------- /contrib/actions/run-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | export BROKEN=1 6 | export GLUON_AUTOREMOVE=1 7 | export GLUON_DEPRECATED=1 8 | export GLUON_SITEDIR="contrib/ci/minimal-site" 9 | export GLUON_TARGET="$1" 10 | export BUILD_LOG=1 11 | 12 | BUILD_THREADS="$(($(nproc) + 1))" 13 | 14 | echo "Building Gluon with $BUILD_THREADS threads" 15 | 16 | make update 17 | make -j$BUILD_THREADS V=s 18 | -------------------------------------------------------------------------------- /contrib/actions/show-system-info.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "-- CPU --" 4 | cat /proc/cpuinfo 5 | 6 | echo "-- Memory --" 7 | cat /proc/meminfo 8 | 9 | echo "-- Disk --" 10 | df -h 11 | 12 | echo "-- Kernel --" 13 | uname -a 14 | 15 | echo "-- Network --" 16 | ip addr 17 | -------------------------------------------------------------------------------- /contrib/ci/minimal-site/i18n: -------------------------------------------------------------------------------- 1 | ../../../docs/site-example/i18n/ -------------------------------------------------------------------------------- /contrib/ci/minimal-site/image-customization.lua: -------------------------------------------------------------------------------- 1 | features { 2 | 'autoupdater', 3 | 'ebtables-filter-multicast', 4 | 'ebtables-filter-ra-dhcp', 5 | 'ebtables-limit-arp', 6 | 'mesh-batman-adv-15', 7 | 'mesh-vpn-fastd', 8 | 'respondd', 9 | 'status-page', 10 | 'web-advanced', 11 | 'web-wizard', 12 | } 13 | 14 | if not device_class('tiny') then 15 | features {'wireless-encryption-wpa3'} 16 | end 17 | -------------------------------------------------------------------------------- /contrib/ci/minimal-site/modules: -------------------------------------------------------------------------------- 1 | ../../../docs/site-example/modules -------------------------------------------------------------------------------- /contrib/ci/minimal-site/site.mk: -------------------------------------------------------------------------------- 1 | ../../../docs/site-example/site.mk -------------------------------------------------------------------------------- /contrib/ci/olsr-site/i18n: -------------------------------------------------------------------------------- 1 | ../minimal-site/i18n -------------------------------------------------------------------------------- /contrib/ci/olsr-site/image-customization.lua: -------------------------------------------------------------------------------- 1 | features { 2 | 'autoupdater', 3 | 'ebtables-filter-multicast', 4 | 'ebtables-filter-ra-dhcp', 5 | 'ebtables-limit-arp', 6 | 'mesh-olsrd', 7 | 'mesh-vpn-fastd', 8 | 'respondd', 9 | 'status-page', 10 | 'web-advanced', 11 | 'web-wizard', 12 | } 13 | 14 | packages { 15 | 'iwinfo', 16 | } 17 | 18 | if not device_class('tiny') then 19 | features {'wireless-encryption-wpa3'} 20 | end 21 | -------------------------------------------------------------------------------- /contrib/ci/olsr-site/modules: -------------------------------------------------------------------------------- 1 | ../minimal-site/modules -------------------------------------------------------------------------------- /contrib/ci/olsr-site/site.mk: -------------------------------------------------------------------------------- 1 | ## gluon site.mk makefile example 2 | 3 | ## DEFAULT_GLUON_RELEASE 4 | # version string to use for images 5 | # gluon relies on 6 | # opkg compare-versions "$1" '>>' "$2" 7 | # to decide if a version is newer or not. 8 | 9 | DEFAULT_GLUON_RELEASE := 0.6+exp$(shell date '+%Y%m%d') 10 | 11 | # Variables set with ?= can be overwritten from the command line 12 | 13 | ## GLUON_RELEASE 14 | # call make with custom GLUON_RELEASE flag, to use your own release version scheme. 15 | # e.g.: 16 | # $ make images GLUON_RELEASE=23.42+5 17 | # would generate images named like this: 18 | # gluon-ff%site_code%-23.42+5-%router_model%.bin 19 | 20 | GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE) 21 | 22 | # Default priority for updates. 23 | GLUON_PRIORITY ?= 0 24 | 25 | # Region code required for some images; supported values: us eu 26 | GLUON_REGION ?= eu 27 | 28 | # Languages to include 29 | GLUON_LANGS ?= en de 30 | -------------------------------------------------------------------------------- /contrib/run_qemu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Note: You can exit the qemu instance by first pressing "CTRL + a" then "c". 4 | # Then you enter the command mode of qemu and can exit by typing "quit". 5 | 6 | qemu-system-x86_64 \ 7 | -d 'cpu_reset' \ 8 | -enable-kvm \ 9 | -gdb tcp::1234 \ 10 | -nographic \ 11 | -netdev user,id=wan,hostfwd=tcp::2223-10.0.2.15:22 \ 12 | -device virtio-net-pci,netdev=wan,addr=0x06,id=nic1 \ 13 | -netdev user,id=lan,hostfwd=tcp::6080-192.168.1.1:80,hostfwd=tcp::2222-192.168.1.1:22,net=192.168.1.100/24 \ 14 | -device virtio-net-pci,netdev=lan,addr=0x05,id=nic2 \ 15 | "$@" 16 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | _build/ 2 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = -W --keep-going 6 | SPHINXBUILD = sphinx-build 7 | SOURCEDIR = . 8 | BUILDDIR = _build 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | .PHONY: help Makefile 15 | 16 | # Catch-all target: route all unknown targets to Sphinx using the new 17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 18 | %: Makefile 19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 20 | -------------------------------------------------------------------------------- /docs/_static/css/custom.css: -------------------------------------------------------------------------------- 1 | .strike { 2 | text-decoration: line-through; 3 | } 4 | -------------------------------------------------------------------------------- /docs/dev/mac_addresses.rst: -------------------------------------------------------------------------------- 1 | MAC addresses 2 | ============= 3 | 4 | Many devices don't have enough unique MAC addresses assigned by the vendor 5 | (in batman-adv, each mesh interface needs an own MAC address that must be unique 6 | mesh-wide). 7 | 8 | Gluon tries to solve this issue by using a hash of the primary MAC address as a 9 | 45 bit MAC address prefix. The resulting 8 addresses are used as follows: 10 | 11 | * 0: client0; WAN 12 | * 1: mesh0 13 | * 2: owe0 14 | * 3: wan_radio0 (private WLAN); batman-adv primary address 15 | * 4: client1; LAN 16 | * 5: mesh1 17 | * 6: owe1 18 | * 7: wan_radio1 (private WLAN); mesh VPN 19 | -------------------------------------------------------------------------------- /docs/features/authorized-keys.rst: -------------------------------------------------------------------------------- 1 | Adding SSH public keys 2 | ====================== 3 | 4 | By using the package ``gluon-authorized-keys`` it is possible to add 5 | SSH public keys to an image to permit root login. 6 | 7 | If you select this package, add a list of authorized keys to ``site.conf`` like this::: 8 | 9 | { 10 | authorized_keys = { 'ssh-rsa AAA.... user1@host', 11 | 'ssh-rsa AAA.... user2@host' }, 12 | hostname_prefix = ... 13 | ... 14 | 15 | Existing keys in ``/etc/dropbear/authorized_keys`` will be preserved. 16 | -------------------------------------------------------------------------------- /docs/features/configmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/features/configmode.png -------------------------------------------------------------------------------- /docs/features/fastd_mode.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/features/fastd_mode.gif -------------------------------------------------------------------------------- /docs/features/multidomain_configmode.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/features/multidomain_configmode.gif -------------------------------------------------------------------------------- /docs/features/node_configmode.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/features/node_configmode.gif -------------------------------------------------------------------------------- /docs/features/status-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/features/status-page.png -------------------------------------------------------------------------------- /docs/features/tls.rst: -------------------------------------------------------------------------------- 1 | TLS support 2 | =========== 3 | 4 | The generic TLS implementation which is currently used by OpenWRT can be installed or added as dependency through the package ``gluon-tls``. 5 | This removes the need for community packages to depend on a specific TLS implementation (like mbedtls, OpenSSL or WolfSSL). 6 | 7 | This package is an alias for the current TLS implementation used. 8 | To allow for easy usage of communicating through HTTPS from the node, typical Certificate Authorities (CAs) are included through the package ``ca-bundle`` . 9 | 10 | * Starting with OpenWRT 23.05, mbedtls is the default TLS layer - this is reflected in Gluon :ref:`v2023.2 `. HTTPS is used by default to communicate with OpenWRT opkg servers. 11 | -------------------------------------------------------------------------------- /docs/multidomain-site-example/i18n: -------------------------------------------------------------------------------- 1 | ../site-example/i18n/ -------------------------------------------------------------------------------- /docs/multidomain-site-example/image-customization.lua: -------------------------------------------------------------------------------- 1 | features { 2 | 'autoupdater', 3 | 'ebtables-filter-multicast', 4 | 'ebtables-filter-ra-dhcp', 5 | 'ebtables-limit-arp', 6 | 'mesh-batman-adv-15', 7 | 'mesh-vpn-fastd', 8 | 'respondd', 9 | 'status-page', 10 | 'web-advanced', 11 | 'web-wizard', 12 | } 13 | 14 | packages { 15 | 'iwinfo', 16 | } 17 | 18 | if not device_class('tiny') then 19 | features {'wireless-encryption-wpa3'} 20 | end 21 | -------------------------------------------------------------------------------- /docs/multidomain-site-example/modules: -------------------------------------------------------------------------------- 1 | ../site-example/modules -------------------------------------------------------------------------------- /docs/package/gluon-client-bridge.rst: -------------------------------------------------------------------------------- 1 | gluon-client-bridge 2 | =================== 3 | 4 | This package provides a bridge (*br-client*) for connecting clients. It will 5 | also setup a wireless interface, provided it is configured in *site.conf*. 6 | 7 | site.conf 8 | --------- 9 | 10 | wifi24.ap.ssid / wifi5.ap.ssid 11 | SSID for the client network 12 | -------------------------------------------------------------------------------- /docs/package/gluon-config-mode-domain-select.rst: -------------------------------------------------------------------------------- 1 | gluon-config-mode-domain-select 2 | =============================== 3 | This package provides a drop-down list for the config mode to select the domain 4 | the node will be placed in. If the selection has changed the upgrade scripts in 5 | ``/lib/gluon/upgrade/`` are triggered to update the nodes configuration. 6 | 7 | Hiding domains could be useful for default or testing domains, which should not 8 | be accidentally selected by a node operator. 9 | 10 | domains/\*.conf 11 | --------------- 12 | 13 | hide_domain \: optional (defaults to false) 14 | - ``false`` shows this domain in drop-down list 15 | - ``true`` hides this domain 16 | 17 | Example:: 18 | 19 | hide_domain = true 20 | -------------------------------------------------------------------------------- /docs/package/gluon-config-mode-geo-location-osm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/package/gluon-config-mode-geo-location-osm.png -------------------------------------------------------------------------------- /docs/package/gluon-config-mode-geo-location-osm.rst: -------------------------------------------------------------------------------- 1 | .. _package-gluon-config-mode-geo-location-osm: 2 | 3 | gluon-config-mode-geo-location-osm 4 | ================================== 5 | 6 | When package *gluon-config-mode-geo-location-osm* is enabled, the configuration wizard will 7 | try to load an OSM-based map to allow the user to specify the node location. 8 | Loading the map requires a working internet connection, for example via WLAN 9 | (while connected to the Gluon node via Ethernet). 10 | 11 | .. image:: gluon-config-mode-geo-location-osm.png 12 | -------------------------------------------------------------------------------- /docs/package/gluon-ebtables-filter-ra-dhcp.rst: -------------------------------------------------------------------------------- 1 | gluon-ebtables-filter-ra-dhcp 2 | ============================= 3 | 4 | The *gluon-ebtables-filter-ra-dhcp* package tries to prevent common 5 | misconfigurations (i.e. connecting the client interface of a Gluon 6 | node to a private network) from causing issues for either of the 7 | networks. 8 | 9 | The rules are the following: 10 | 11 | * DHCP requests, DHCPv6 requests and Router Solicitations may only be sent from clients to the mesh, but aren't forwarded 12 | from the mesh to clients 13 | * DHCP replies, DHCPv6 replies and Router Advertisements from clients aren't forwarded to the mesh 14 | -------------------------------------------------------------------------------- /docs/package/gluon-hoodselector-domainmap.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/package/gluon-hoodselector-domainmap.jpeg -------------------------------------------------------------------------------- /docs/package/gluon-mesh-batman-adv-multicast-architecture.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/package/gluon-mesh-batman-adv-multicast-architecture.dia -------------------------------------------------------------------------------- /docs/package/gluon-web-cellular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/package/gluon-web-cellular.png -------------------------------------------------------------------------------- /docs/package/gluon-web-cellular.rst: -------------------------------------------------------------------------------- 1 | .. _package-gluon-web-cellular: 2 | 3 | gluon-web-cellular 4 | ================== 5 | 6 | This package allows to configure WWAN for capable cellular devices. 7 | 8 | This works by creating an abstraction layer into Gluon which takes common options (SIM PIN / APN) and translates it to modem-specific settings based on the specific device using. 9 | Doing so limits the use-case onto specific models (no LTE sticks possible) but provides a common interface. 10 | 11 | The WWAN is assigned the WAN firewall zone and wired WAN can still be used, however without prioritization. 12 | The traffic path is not configured to prefer one uplink source or the other. 13 | 14 | .. image:: gluon-web-cellular.png 15 | -------------------------------------------------------------------------------- /docs/package/gluon-web-logging.rst: -------------------------------------------------------------------------------- 1 | gluon-web-logging 2 | ================= 3 | 4 | The *gluon-web-logging* package adds a new section to advanced settings 5 | to allow GUI-based configuration of a remote syslog server. 6 | -------------------------------------------------------------------------------- /docs/package/gluon-web-network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/package/gluon-web-network.png -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | Sphinx==8.2.3 2 | sphinx-rtd-theme==3.0.2 3 | -------------------------------------------------------------------------------- /docs/site-example/i18n/gluon-site.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "gluon-config-mode:welcome" 5 | msgstr "" 6 | 7 | msgid "gluon-config-mode:domain" 8 | msgstr "" 9 | 10 | msgid "gluon-config-mode:domain-select" 11 | msgstr "" 12 | 13 | msgid "gluon-config-mode:pubkey" 14 | msgstr "" 15 | 16 | msgid "gluon-config-mode:novpn" 17 | msgstr "" 18 | 19 | msgid "gluon-config-mode:reboot" 20 | msgstr "" 21 | 22 | msgid "gluon-config-mode:hostname-help" 23 | msgstr "" 24 | 25 | msgid "gluon-config-mode:geo-location-help" 26 | msgstr "" 27 | 28 | msgid "gluon-config-mode:altitude-label" 29 | msgstr "" 30 | 31 | msgid "gluon-config-mode:contact-help" 32 | msgstr "" 33 | 34 | msgid "gluon-config-mode:contact-note" 35 | msgstr "" 36 | -------------------------------------------------------------------------------- /docs/site-example/image-customization.lua: -------------------------------------------------------------------------------- 1 | packages {'iwinfo'} 2 | 3 | features { 4 | 'autoupdater', 5 | 'ebtables-filter-multicast', 6 | 'ebtables-filter-ra-dhcp', 7 | 'ebtables-limit-arp', 8 | 'mesh-batman-adv-15', 9 | 'mesh-vpn-fastd', 10 | 'respondd', 11 | 'status-page', 12 | 'web-advanced', 13 | 'web-wizard' 14 | } 15 | 16 | if not device_class('tiny') then 17 | features { 18 | 'wireless-encryption-wpa3' 19 | } 20 | end 21 | -------------------------------------------------------------------------------- /docs/site-example/modules: -------------------------------------------------------------------------------- 1 | # This file allows specifying additional repositories to use 2 | # when building gluon. 3 | # 4 | # In most cases, it is not required so don't add it. 5 | 6 | ## GLUON_SITE_FEEDS 7 | # for each feed name given, add the corresponding PACKAGES_* lines 8 | # documented below 9 | #GLUON_SITE_FEEDS='my_own_packages' 10 | 11 | ## PACKAGES_$feedname_REPO 12 | # the git repository from where to clone the package feed 13 | #PACKAGES_MY_OWN_PACKAGES_REPO=https://github.com/.../my-own-packages.git 14 | 15 | ## PACKAGES_$feedname_COMMIT 16 | # the version/commit of the git repository to clone 17 | #PACKAGES_MY_OWN_PACKAGES_COMMIT=123456789aabcda1a69b04278e4d38f2a3f57e49 18 | 19 | ## PACKAGES_$feedname_BRANCH 20 | # the branch to check out 21 | #PACKAGES_MY_OWN_PACKAGES_BRANCH=my_branch 22 | -------------------------------------------------------------------------------- /docs/site-example/site.mk: -------------------------------------------------------------------------------- 1 | ## gluon site.mk makefile example 2 | 3 | ## DEFAULT_GLUON_RELEASE 4 | # version string to use for images 5 | # gluon relies on 6 | # opkg compare-versions "$1" '>>' "$2" 7 | # to decide if a version is newer or not. 8 | 9 | DEFAULT_GLUON_RELEASE := 0.6+exp$(shell date '+%Y%m%d') 10 | 11 | # Variables set with ?= can be overwritten from the command line 12 | 13 | ## GLUON_RELEASE 14 | # call make with custom GLUON_RELEASE flag, to use your own release version scheme. 15 | # e.g.: 16 | # $ make images GLUON_RELEASE=23.42+5 17 | # would generate images named like this: 18 | # gluon-ff%site_code%-23.42+5-%router_model%.bin 19 | 20 | GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE) 21 | 22 | # Default priority for updates. 23 | GLUON_PRIORITY ?= 0 24 | 25 | # Region code required for some images; supported values: us eu 26 | GLUON_REGION ?= eu 27 | 28 | # Languages to include 29 | GLUON_LANGS ?= en de 30 | -------------------------------------------------------------------------------- /docs/user/mtu-diagram_v5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/docs/user/mtu-diagram_v5.png -------------------------------------------------------------------------------- /modules: -------------------------------------------------------------------------------- 1 | GLUON_FEEDS='gluon packages routing' 2 | 3 | OPENWRT_REPO=https://github.com/openwrt/openwrt.git 4 | OPENWRT_BRANCH=openwrt-24.10 5 | OPENWRT_COMMIT=e709e9bc067f0e97f9ccc43fdec451ff83bba2d5 6 | 7 | PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git 8 | PACKAGES_GLUON_COMMIT=bae34a0f53b25dbd691c57c8ab2d0b7cfe811517 9 | 10 | PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git 11 | PACKAGES_PACKAGES_BRANCH=openwrt-24.10 12 | PACKAGES_PACKAGES_COMMIT=acd385976da5bd26c8837e847b76146a3c1b8ad7 13 | 14 | PACKAGES_ROUTING_REPO=https://github.com/openwrt/routing.git 15 | PACKAGES_ROUTING_BRANCH=openwrt-24.10 16 | PACKAGES_ROUTING_COMMIT=f2ee837d3714f86e9d636302e9f69612c71029cb 17 | -------------------------------------------------------------------------------- /package/gluon-alfred/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-alfred 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-alfred 8 | DEPENDS:=+gluon-core +gluon-respondd +gluon-neighbour-info gluon-mesh-batman-adv +micrond +alfred 9 | TITLE:=Configure alfred 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-alfred)) 13 | -------------------------------------------------------------------------------- /package/gluon-alfred/files/lib/gluon/reload.d/301-alfred-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/alfred stop 3 | -------------------------------------------------------------------------------- /package/gluon-alfred/files/lib/gluon/reload.d/799-alfred-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/alfred start 3 | -------------------------------------------------------------------------------- /package/gluon-alfred/files/usr/lib/autoupdater/abort.d/60gluon-alfred: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | start_enabled alfred 7 | -------------------------------------------------------------------------------- /package/gluon-alfred/files/usr/lib/autoupdater/download.d/40gluon-alfred: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | stop alfred 7 | -------------------------------------------------------------------------------- /package/gluon-alfred/files/usr/lib/micron.d/alfred: -------------------------------------------------------------------------------- 1 | * * * * * gluon-neighbour-info -d ::1 -p 1001 -t 1 -c 1 -r nodeinfo | gzip | alfred -s 158; gluon-neighbour-info -d ::1 -p 1001 -t 1 -c 1 -r statistics | gzip | alfred -s 159; gluon-neighbour-info -d ::1 -p 1001 -t 1 -c 1 -r neighbours | gzip | alfred -s 160 2 | -------------------------------------------------------------------------------- /package/gluon-alfred/luasrc/lib/gluon/upgrade/400-alfred-firewall: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | 5 | uci:section('firewall', 'rule', 'mesh_respondd', { 6 | name = 'mesh_respondd', 7 | src = 'mesh', 8 | src_ip = 'fe80::/64', 9 | dest_port = '16962', 10 | proto = 'udp', 11 | target = 'ACCEPT', 12 | }) 13 | 14 | uci:save('firewall') 15 | -------------------------------------------------------------------------------- /package/gluon-alfred/luasrc/lib/gluon/upgrade/500-enable-alfred: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | 5 | uci:delete('alfred', 'alfred') 6 | uci:section('alfred', 'alfred', 'alfred', { 7 | interface = 'br-client', 8 | mode = 'slave', 9 | batmanif = 'bat0', 10 | start_vis = true, 11 | run_facters = false, 12 | }) 13 | 14 | uci:save('alfred') 15 | -------------------------------------------------------------------------------- /package/gluon-authorized-keys/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-authorized-keys 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-authorized-keys 8 | TITLE:=Fill /etc/dropbear/authorized_keys from site.conf 9 | DEPENDS:=+gluon-core +gluon-lock-password 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-authorized-keys)) 13 | -------------------------------------------------------------------------------- /package/gluon-authorized-keys/check_site.lua: -------------------------------------------------------------------------------- 1 | need_string_array(in_site({'authorized_keys'})) 2 | -------------------------------------------------------------------------------- /package/gluon-authorized-keys/luasrc/lib/gluon/upgrade/100-authorized-keys: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local site = require 'gluon.site' 4 | local file = '/etc/dropbear/authorized_keys' 5 | 6 | local keys = {} 7 | 8 | local function load_keys() 9 | for line in io.lines(file) do 10 | keys[line] = true 11 | end 12 | end 13 | 14 | pcall(load_keys) 15 | 16 | local f = io.open(file, 'a') 17 | for _, key in ipairs(site.authorized_keys()) do 18 | if not keys[key] then 19 | f:write(key .. '\n') 20 | end 21 | end 22 | f:close() 23 | -------------------------------------------------------------------------------- /package/gluon-autoupdater/Config.in: -------------------------------------------------------------------------------- 1 | if PACKAGE_gluon-autoupdater 2 | 3 | config GLUON_AUTOUPDATER_BRANCH 4 | string "Autoupdater branch" 5 | default "" 6 | 7 | config GLUON_AUTOUPDATER_ENABLED 8 | bool "Enable autoupdater by default" 9 | 10 | endif 11 | -------------------------------------------------------------------------------- /package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh: -------------------------------------------------------------------------------- 1 | # Library to be sourced by download.d/abort.d scripts 2 | 3 | 4 | stop() { 5 | if [ -x /etc/init.d/"$1" ]; then 6 | echo "Stopping $1..." 7 | /etc/init.d/"$1" stop 8 | fi 9 | } 10 | 11 | start_enabled() { 12 | if [ -x /etc/init.d/"$1" ] && /etc/init.d/"$1" enabled; then 13 | echo "Starting $1..." 14 | /etc/init.d/"$1" start 15 | fi 16 | } 17 | -------------------------------------------------------------------------------- /package/gluon-autoupdater/files/usr/lib/autoupdater/abort.d/90gluon-autoupdater: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | 7 | start_enabled cron 8 | start_enabled urngd 9 | start_enabled micrond 10 | start_enabled sysntpd 11 | -------------------------------------------------------------------------------- /package/gluon-autoupdater/files/usr/lib/autoupdater/download.d/10gluon-autoupdater: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | 7 | stop cron 8 | stop urngd 9 | stop micrond 10 | stop sysntpd 11 | -------------------------------------------------------------------------------- /package/gluon-autoupdater/src/Makefile: -------------------------------------------------------------------------------- 1 | all: respondd.so 2 | 3 | CFLAGS += -Wall 4 | 5 | respondd.so: respondd.c 6 | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -D_GNU_SOURCE -o $@ $^ $(LDLIBS) -lgluonutil -luci 7 | -------------------------------------------------------------------------------- /package/gluon-client-bridge/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-client-bridge 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-client-bridge 8 | TITLE:=Provides a bridge and a wireless interface for clients to connect to 9 | DEPENDS:=+gluon-core +kmod-veth 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-client-bridge)) 13 | -------------------------------------------------------------------------------- /package/gluon-client-bridge/luasrc/usr/lib/lua/gluon/client_bridge.lua: -------------------------------------------------------------------------------- 1 | local site = require 'gluon.site' 2 | 3 | 4 | local M = {} 5 | 6 | function M.next_node_macaddr() 7 | return site.next_node.mac('16:41:95:40:f7:dc') 8 | end 9 | 10 | return M 11 | -------------------------------------------------------------------------------- /package/gluon-config-mode-autoupdater/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-config-mode-autoupdater 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-config-mode-autoupdater 8 | TITLE:=Config Mode: Let the user know whether the autoupdater is enabled or not 9 | DEPENDS:=+gluon-config-mode-core +gluon-autoupdater 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-config-mode-autoupdater)) 13 | -------------------------------------------------------------------------------- /package/gluon-config-mode-autoupdater/i18n/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2015-03-18 16:03+0100\n" 5 | "Last-Translator: Matthias Schiffer \n" 6 | "Language-Team: German\n" 7 | "Language: de\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "" 14 | "Automatic updates are disabled. They can be enabled in Advanced " 15 | "settings." 16 | msgstr "" 17 | "Automatische Updates sind deaktiviert. Sie können in den Erweiterten " 18 | "Einstellungen aktiviert werden." 19 | 20 | msgid "" 21 | "This node will automatically update its firmware when a new version is " 22 | "available." 23 | msgstr "" 24 | "Dieser Knoten aktualisiert seine Firmware automatisch, sobald eine neue " 25 | "Version vorliegt." 26 | -------------------------------------------------------------------------------- /package/gluon-config-mode-autoupdater/i18n/fr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2015-08-04 20:20+0100\n" 5 | "Last-Translator: Bernot Tobias \n" 6 | "Language-Team: French\n" 7 | "Language: fr\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "" 14 | "Automatic updates are disabled. They can be enabled in Advanced " 15 | "settings." 16 | msgstr "" 17 | "Mises à jour automatiques sont désactivées. Ils peuvent être activés dans " 18 | "Paramètres avancés." 19 | 20 | msgid "" 21 | "This node will automatically update its firmware when a new version is " 22 | "available." 23 | msgstr "" 24 | "Ce nœud s'actualisera automatiquement quand une nouvelle version sera " 25 | "disponible." 26 | -------------------------------------------------------------------------------- /package/gluon-config-mode-autoupdater/i18n/gluon-config-mode-autoupdater.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "" 5 | "Automatic updates are disabled. They can be enabled in Advanced " 6 | "settings." 7 | msgstr "" 8 | 9 | msgid "" 10 | "This node will automatically update its firmware when a new version is " 11 | "available." 12 | msgstr "" 13 | -------------------------------------------------------------------------------- /package/gluon-config-mode-autoupdater/luasrc/lib/gluon/config-mode/wizard/0050-autoupdater-info.lua: -------------------------------------------------------------------------------- 1 | return function(form, uci) 2 | local pkg_i18n = i18n 'gluon-config-mode-autoupdater' 3 | 4 | local enabled = uci:get_bool("autoupdater", "settings", "enabled") 5 | if enabled then 6 | form:section( 7 | Section, nil, 8 | pkg_i18n.translate('This node will automatically update its firmware when a new version is available.') 9 | ) 10 | else 11 | form:section( 12 | Section, nil, 13 | pkg_i18n.translate('Automatic updates are disabled. They can be enabled in Advanced settings.') 14 | ) 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /package/gluon-config-mode-contact-info/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-config-mode-contact-info 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-config-mode-contact-info 8 | TITLE:=Allows the user to provide contact information to be distributed in the mesh 9 | DEPENDS:=+gluon-config-mode-core +gluon-node-info 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-config-mode-contact-info)) 13 | -------------------------------------------------------------------------------- /package/gluon-config-mode-contact-info/check_site.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/package/gluon-config-mode-contact-info/check_site.lua -------------------------------------------------------------------------------- /package/gluon-config-mode-contact-info/i18n/gluon-config-mode-contact-info.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Contact info" 5 | msgstr "" 6 | 7 | msgid "" 8 | "Please provide your contact information here to allow others to contact you. " 9 | "Note that this information will be visible publicly on the internet " 10 | "together with your node's coordinates. This means it can be downloaded and " 11 | "processed by anyone. This information is not required to operate a node. If " 12 | "you chose to enter data, it will be stored on this node and can be deleted " 13 | "by yourself at any time." 14 | msgstr "" 15 | 16 | msgid "e.g. E-mail or phone number" 17 | msgstr "" 18 | -------------------------------------------------------------------------------- /package/gluon-config-mode-core/files/lib/gluon/config-mode/view/wizard/reboot.html: -------------------------------------------------------------------------------- 1 |

<%:Your node's setup is now complete.%>

2 | <% 3 | local util = require "gluon.util" 4 | 5 | local parts = {} 6 | for _, entry in ipairs(util.glob('/lib/gluon/config-mode/reboot/*')) do 7 | local p = assert(loadfile(entry)) 8 | setfenv(p, getfenv()) 9 | table.insert(parts, p) 10 | end 11 | 12 | for _, p in ipairs(parts) do 13 | p() 14 | end 15 | %> 16 | -------------------------------------------------------------------------------- /package/gluon-config-mode-core/files/lib/gluon/config-mode/view/wizard/welcome.html: -------------------------------------------------------------------------------- 1 | <%- 2 | local site_i18n = i18n 'gluon-site' 3 | 4 | local sysconfig = require 'gluon.sysconfig' 5 | 6 | local msg = site_i18n._translate('gluon-config-mode:welcome') 7 | if not msg then return end 8 | -%> 9 |

10 | <% 11 | renderer.render_string(msg, { 12 | hostname = hostname, 13 | sysconfig = sysconfig, 14 | }) 15 | %> 16 |

17 | -------------------------------------------------------------------------------- /package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /package/gluon-config-mode-core/files/lib/gluon/setup-mode/rc.d/S50uhttpd: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | START=50 4 | 5 | USE_PROCD=1 6 | 7 | UHTTPD_BIN="/usr/sbin/uhttpd" 8 | 9 | start_service() { 10 | procd_open_instance 11 | procd_set_param respawn 12 | procd_set_param command "$UHTTPD_BIN" -f -h /lib/gluon/config-mode/www -x /cgi-bin -A 1 -R -p 0.0.0.0:80 13 | procd_close_instance 14 | } 15 | -------------------------------------------------------------------------------- /package/gluon-config-mode-core/i18n/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2015-03-19 02:07+0100\n" 5 | "Last-Translator: Matthias Schiffer \n" 6 | "Language-Team: German\n" 7 | "Language: de\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "Save & restart" 14 | msgstr "Speichern & Neustarten" 15 | 16 | msgid "Welcome!" 17 | msgstr "Willkommen!" 18 | 19 | msgid "Wizard" 20 | msgstr "Wizard" 21 | 22 | msgid "Your node's setup is now complete." 23 | msgstr "Dein Knoten ist nun fertig eingerichtet." 24 | -------------------------------------------------------------------------------- /package/gluon-config-mode-core/i18n/fr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2015-08-12 23:30+0100\n" 5 | "Last-Translator:Tobias Bernot \n" 6 | "Language-Team: French\n" 7 | "Language: fr\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "Save & restart" 14 | msgstr "Enregistrer & Redémarer" 15 | 16 | msgid "Welcome!" 17 | msgstr "Bienvenue!" 18 | 19 | msgid "Wizard" 20 | msgstr "Assistant" 21 | 22 | msgid "Your node's setup is now complete." 23 | msgstr "La configuration de votre nœud est terminée." 24 | -------------------------------------------------------------------------------- /package/gluon-config-mode-core/i18n/gluon-config-mode-core.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Save & restart" 5 | msgstr "" 6 | 7 | msgid "Welcome!" 8 | msgstr "" 9 | 10 | msgid "Wizard" 11 | msgstr "" 12 | 13 | msgid "Your node's setup is now complete." 14 | msgstr "" 15 | -------------------------------------------------------------------------------- /package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/controller/gluon-config-mode/index.lua: -------------------------------------------------------------------------------- 1 | package 'gluon-config-mode-core' 2 | 3 | entry({}, alias("wizard")) 4 | entry({"wizard"}, model("gluon-config-mode/wizard"), _("Wizard"), 5) 5 | -------------------------------------------------------------------------------- /package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/reboot/0900-msg-reboot.lua: -------------------------------------------------------------------------------- 1 | local site_i18n = i18n 'gluon-site' 2 | 3 | local site = require 'gluon.site' 4 | local sysconfig = require 'gluon.sysconfig' 5 | local pretty_hostname = require 'pretty_hostname' 6 | 7 | local uci = require("simple-uci").cursor() 8 | 9 | local hostname = pretty_hostname.get(uci) 10 | local contact = uci:get_first('gluon-node-info', 'owner', 'contact') 11 | 12 | local msg = site_i18n._translate('gluon-config-mode:reboot') 13 | if not msg then return end 14 | 15 | renderer.render_string(msg, { 16 | hostname = hostname, 17 | site = site, 18 | sysconfig = sysconfig, 19 | contact = contact, 20 | }) 21 | -------------------------------------------------------------------------------- /package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/www/cgi-bin/config: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | require 'gluon.web.cgi' { 4 | base_path = '/lib/gluon/config-mode', 5 | 6 | layout_package = 'gluon-config-mode-theme', 7 | layout_template = 'theme/layout', 8 | } 9 | -------------------------------------------------------------------------------- /package/gluon-config-mode-domain-select/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-config-mode-domain-select 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-config-mode-domain-select 8 | TITLE:=UI for changing the node-config 9 | DEPENDS:=+gluon-config-mode-core @GLUON_MULTIDOMAIN 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-config-mode-domain-select)) 13 | -------------------------------------------------------------------------------- /package/gluon-config-mode-domain-select/check_site.lua: -------------------------------------------------------------------------------- 1 | local valid_domain_codes = table_keys(need_table(in_domain({'domain_names'}))) 2 | 3 | alternatives(function() 4 | need_boolean(in_domain({'hide_domain'}), false) 5 | end, function() 6 | need_array_of(in_domain({'hide_domain'}), valid_domain_codes, false) 7 | end) 8 | -------------------------------------------------------------------------------- /package/gluon-config-mode-geo-location-osm/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-config-mode-geo-location-osm 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-config-mode-geo-location-osm 8 | TITLE:=Set geographic location of a node (map support) 9 | DEPENDS:=+gluon-config-mode-geo-location +gluon-web-osm 10 | endef 11 | 12 | define Package/gluon-config-mode-geo-location-osm/install 13 | $(Gluon/Build/Install) 14 | 15 | $(INSTALL_DIR) $(1)/lib/gluon/config-mode/www/static/ 16 | $(LN) /lib/gluon/web/www/static/gluon-web-osm.js $(1)/lib/gluon/config-mode/www/static/ 17 | endef 18 | 19 | $(eval $(call BuildPackageGluon,gluon-config-mode-geo-location-osm)) 20 | -------------------------------------------------------------------------------- /package/gluon-config-mode-geo-location-osm/check_site.lua: -------------------------------------------------------------------------------- 1 | need_number(in_site({'config_mode', 'geo_location', 'osm', 'center', 'lon'})) 2 | need_number(in_site({'config_mode', 'geo_location', 'osm', 'center', 'lat'})) 3 | need_number(in_site({'config_mode', 'geo_location', 'osm', 'zoom'}), false) 4 | need_string(in_site({'config_mode', 'geo_location', 'osm', 'openlayers_url'}), false) 5 | 6 | if need_table(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer'}), nil, false) then 7 | need_one_of(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'type'}), {'XYZ'}) 8 | need_string(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'url'})) 9 | need_string(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'attributions'})) 10 | end 11 | -------------------------------------------------------------------------------- /package/gluon-config-mode-geo-location-osm/i18n/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: gluon-config-mode-geo-location\n" 4 | "Last-Translator: Matthias Schiffer \n" 5 | "Language-Team: German\n" 6 | "Language: de\n" 7 | "MIME-Version: 1.0\n" 8 | "Content-Type: text/plain; charset=UTF-8\n" 9 | "Content-Transfer-Encoding: 8bit\n" 10 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 11 | 12 | msgid "" 13 | "You may also select the position on the map displayed below if your computer " 14 | "is connected to the internet at the moment." 15 | msgstr "" 16 | "Wenn dein Computer aktuell mit dem Internet verbunden ist, kann die Position " 17 | "auch auf der hier angezeigten Karte ausgewählt werden." 18 | -------------------------------------------------------------------------------- /package/gluon-config-mode-geo-location-osm/i18n/gluon-config-mode-geo-location-osm.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "" 5 | "You may also select the position on the map displayed below if your computer " 6 | "is connected to the internet at the moment." 7 | msgstr "" 8 | -------------------------------------------------------------------------------- /package/gluon-config-mode-geo-location-osm/luasrc/usr/lib/lua/gluon/config-mode/geo-location-osm.lua: -------------------------------------------------------------------------------- 1 | local osm = require 'gluon.web.model.osm' 2 | local site = require 'gluon.site' 3 | 4 | 5 | local M = {} 6 | 7 | M.MapValue = osm.MapValue 8 | 9 | function M.help(i18n) 10 | local pkg_i18n = i18n 'gluon-config-mode-geo-location-osm' 11 | return pkg_i18n.translate( 12 | 'You may also select the position on the map displayed below ' 13 | .. 'if your computer is connected to the internet at the moment.' 14 | ) 15 | end 16 | 17 | function M.options() 18 | local config = site.config_mode.geo_location.osm 19 | 20 | return { 21 | openlayers_url = config.openlayers_url(), 22 | tile_layer = config.tile_layer(), 23 | zoom = config.zoom(12), 24 | pos = config.center(), 25 | } 26 | end 27 | 28 | return M 29 | -------------------------------------------------------------------------------- /package/gluon-config-mode-geo-location/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-config-mode-geo-location 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-config-mode-geo-location 8 | TITLE:=Set geographic location of a node 9 | DEPENDS:=+gluon-config-mode-core +gluon-node-info 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-config-mode-geo-location)) 13 | -------------------------------------------------------------------------------- /package/gluon-config-mode-geo-location/check_site.lua: -------------------------------------------------------------------------------- 1 | need_boolean(in_site({'config_mode', 'geo_location', 'show_altitude'}), false) 2 | -------------------------------------------------------------------------------- /package/gluon-config-mode-geo-location/i18n/gluon-config-mode-geo-location.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Advertise node position" 5 | msgstr "" 6 | 7 | msgid "Altitude" 8 | msgstr "" 9 | 10 | msgid "" 11 | "If you want the location of your node to be displayed on public maps, you " 12 | "can enter its coordinates here." 13 | msgstr "" 14 | 15 | msgid "Latitude" 16 | msgstr "" 17 | 18 | msgid "Longitude" 19 | msgstr "" 20 | 21 | msgid "Set node position" 22 | msgstr "" 23 | 24 | msgid "" 25 | "Specifying the altitude is optional; it should only be filled in if an " 26 | "accurate value is known." 27 | msgstr "" 28 | 29 | msgid "e.g. %s" 30 | msgstr "" 31 | -------------------------------------------------------------------------------- /package/gluon-config-mode-hostname/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-config-mode-hostname 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-config-mode-hostname 8 | TITLE:=Set the hostname 9 | DEPENDS:=+gluon-config-mode-core 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-config-mode-hostname)) 13 | -------------------------------------------------------------------------------- /package/gluon-config-mode-hostname/check_site.lua: -------------------------------------------------------------------------------- 1 | need_boolean(in_site({'config_mode', 'hostname', 'optional'}), false) 2 | need_boolean(in_site({'config_mode', 'hostname', 'prefill'}), false) 3 | -------------------------------------------------------------------------------- /package/gluon-config-mode-hostname/i18n/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2015-03-19 00:54+0100\n" 5 | "Last-Translator: Matthias Schiffer \n" 6 | "Language-Team: German\n" 7 | "Language: de\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "Node name" 14 | msgstr "Name dieses Knotens" 15 | 16 | msgid "" 17 | "The node name is used solely for identification of your node, e.g. on a node " 18 | "map. It does not affect the name (SSID) of the broadcasted WLAN." 19 | msgstr "" 20 | "Der Knotenname dient ausschließlich zur Identifikation deines Knotens, z.B. " 21 | "auf einer Knotenkarte. Er hat keinen Einfluss auf den Namen (SSID) des " 22 | "ausgestrahlten WLANs." 23 | -------------------------------------------------------------------------------- /package/gluon-config-mode-hostname/i18n/fr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2015-08-12 23:30+0100\n" 5 | "Last-Translator:Tobias Bernot \n" 6 | "Language-Team: French\n" 7 | "Language: fr\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "Node name" 14 | msgstr "Nom du nœud" 15 | 16 | msgid "" 17 | "The node name is used solely for identification of your node, e.g. on a node " 18 | "map. It does not affect the name (SSID) of the broadcasted WLAN." 19 | msgstr "" 20 | "Le nom du nœud est utilisé uniquement pour l'identification de votre nœud, " 21 | "par ex. sur un carte des nœuds. Il n'a aucune influence sur le nom du Wi-" 22 | "Fi(SSID) rayonné." 23 | -------------------------------------------------------------------------------- /package/gluon-config-mode-hostname/i18n/gluon-config-mode-hostname.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Node name" 5 | msgstr "" 6 | 7 | msgid "" 8 | "The node name is used solely for identification of your node, e.g. on a node " 9 | "map. It does not affect the name (SSID) of the broadcasted WLAN." 10 | msgstr "" 11 | -------------------------------------------------------------------------------- /package/gluon-config-mode-mesh-vpn/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-config-mode-mesh-vpn 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-config-mode-mesh-vpn 8 | TITLE:=Toggle mesh-vpn and bandwidth limit 9 | DEPENDS:=+gluon-config-mode-core +gluon-mesh-vpn-core 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-config-mode-mesh-vpn)) 13 | -------------------------------------------------------------------------------- /package/gluon-config-mode-mesh-vpn/i18n/gluon-config-mode-mesh-vpn.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Downstream (Mbit/s)" 5 | msgstr "" 6 | 7 | msgid "Limit bandwidth" 8 | msgstr "" 9 | 10 | msgid "Upstream (Mbit/s)" 11 | msgstr "" 12 | 13 | msgid "Use internet connection (mesh VPN)" 14 | msgstr "" 15 | 16 | msgid "" 17 | "Your internet connection can be used to establish a VPN connection with " 18 | "other nodes. Enable this option if there are no other nodes reachable over " 19 | "WLAN in your vicinity or you want to make a part of your connection's " 20 | "bandwidth available for the network. You can limit how much bandwidth the " 21 | "node will use at most." 22 | msgstr "" 23 | -------------------------------------------------------------------------------- /package/gluon-config-mode-outdoor/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-config-mode-outdoor 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-config-mode-outdoor 8 | TITLE:=UI for displaying & changing the outdoor mode flag in the wizard 9 | DEPENDS:=+gluon-config-mode-core 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-config-mode-outdoor)) 13 | -------------------------------------------------------------------------------- /package/gluon-config-mode-outdoor/i18n/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8\n" 3 | 4 | msgid "Node will be installed outdoors" 5 | msgstr "Knoten wird im Außenbereich betrieben" 6 | 7 | msgid "" 8 | "Please enable this option in case the node is to be installed outdoors to " 9 | "comply with local frequency regulations." 10 | msgstr "" 11 | "Wenn der Knoten im Freien aufgestellt werden soll, dann aktiviere bitte " 12 | "diese Option um den örtlichen Frequenzbestimmungen zu entsprechen." 13 | -------------------------------------------------------------------------------- /package/gluon-config-mode-outdoor/i18n/gluon-config-mode-outdoor.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Node will be installed outdoors" 5 | msgstr "" 6 | 7 | msgid "" 8 | "Please enable this option in case the node is to be installed outdoors to " 9 | "comply with local frequency regulations." 10 | msgstr "" 11 | -------------------------------------------------------------------------------- /package/gluon-config-mode-theme/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Nils Schneider 2 | # This is free software, licensed under the Apache 2.0 license. 3 | 4 | include $(TOPDIR)/rules.mk 5 | 6 | PKG_NAME:=gluon-config-mode-theme 7 | 8 | include ../gluon.mk 9 | 10 | define Package/gluon-config-mode-theme 11 | TITLE:=Gluon config mode theme for gluon-web 12 | DEPENDS:=+gluon-core +gluon-web 13 | endef 14 | 15 | $(eval $(call BuildPackageGluon,gluon-config-mode-theme)) 16 | -------------------------------------------------------------------------------- /package/gluon-config-mode-theme/i18n/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2013-03-29 12:13+0200\n" 5 | "Last-Translator: Matthias Schiffer \n" 6 | "Language-Team: German\n" 7 | "Language: de\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "JavaScript required!" 14 | msgstr "JavaScript benötigt!" 15 | 16 | msgid "" 17 | "You must enable JavaScript in your browser or the web interface will not " 18 | "work properly." 19 | msgstr "" 20 | "Bitte aktiviere JavaScript in deinem Browser, damit das Webinterface korrekt " 21 | "funktionieren kann." 22 | -------------------------------------------------------------------------------- /package/gluon-config-mode-theme/i18n/fr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2013-12-22 17:11+0200\n" 5 | "Last-Translator: goofy \n" 6 | "Language-Team: French\n" 7 | "Language: fr\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 12 | 13 | msgid "JavaScript required!" 14 | msgstr "" 15 | 16 | msgid "" 17 | "You must enable JavaScript in your browser or the web interface will not " 18 | "work properly." 19 | msgstr "" 20 | -------------------------------------------------------------------------------- /package/gluon-config-mode-theme/i18n/gluon-config-mode-theme.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "JavaScript required!" 5 | msgstr "" 6 | 7 | msgid "" 8 | "You must enable JavaScript in your browser or the web interface will not " 9 | "work properly." 10 | msgstr "" 11 | -------------------------------------------------------------------------------- /package/gluon-core/files/etc/config/gluon: -------------------------------------------------------------------------------- 1 | config core 'core' 2 | -------------------------------------------------------------------------------- /package/gluon-core/files/etc/hotplug.d/firmware/20-gluon-ath10k-fwcfg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ -e "/lib/firmware/$FIRMWARE" ] && exit 0 4 | 5 | case "$FIRMWARE" in 6 | ath10k/fwcfg*) 7 | cp "/lib/gluon/ath10k-fwcfg.txt" "/lib/firmware/$FIRMWARE" 8 | ;; 9 | esac 10 | -------------------------------------------------------------------------------- /package/gluon-core/files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "${ACTION}" = 'add' ]; then 4 | RAM=$(awk '/MemTotal/ {print $2}' /proc/meminfo) 5 | if [ "$RAM" -le $((32*1024)) ]; then 6 | echo 'fq_memory_limit 262144' > "/sys/kernel/debug/ieee80211/$DEVICENAME/aqm" 7 | fi 8 | fi 9 | -------------------------------------------------------------------------------- /package/gluon-core/files/etc/init.d/gluon-core-reconfigure: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | # Start right after S10boot 4 | START=10 5 | 6 | start() { 7 | config_load gluon 8 | config_get_bool reconfigure core reconfigure 0 9 | # shellcheck disable=SC2154 10 | if [ "$reconfigure" = 1 ]; then 11 | gluon-reconfigure 12 | fi 13 | } 14 | -------------------------------------------------------------------------------- /package/gluon-core/files/etc/sysctl.d/30-gluon-core.conf: -------------------------------------------------------------------------------- 1 | vm.panic_on_oom=1 2 | net.ipv4.tcp_ecn=1 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/etc/uci-defaults/zzz-gluon-upgrade: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Work around an issue with wifi setup timing by waiting a bit 4 | # while device initialisation is ongoing. 5 | # https://github.com/freifunk-gluon/gluon/issues/2779 6 | sleep 3 7 | 8 | gluon-reconfigure 9 | 10 | exit 0 11 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/ath10k-fwcfg.txt: -------------------------------------------------------------------------------- 1 | vdevs = 4 2 | peers = 96 3 | active_peers = 96 4 | stations = 96 5 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/core/mesh/post-setup.d/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/package/gluon-core/files/lib/gluon/core/mesh/post-setup.d/.keep -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/core/mesh/setup.d/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/package/gluon-core/files/lib/gluon/core/mesh/setup.d/.keep -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/core/mesh/teardown.d/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/package/gluon-core/files/lib/gluon/core/mesh/teardown.d/.keep -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/core/sysconfig/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/package/gluon-core/files/lib/gluon/core/sysconfig/.keep -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/label_mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck disable=SC1091 4 | 5 | . /lib/functions/system.sh 6 | 7 | get_mac_label 8 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/reload.d/302-sysntpd-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/sysntpd stop 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/reload.d/380-network-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/network stop 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/reload.d/381-dnsmasq-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/dnsmasq stop 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/reload.d/381-firewall-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/firewall stop 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/reload.d/710-gluon-core-reconfigure-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-core-reconfigure start 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/reload.d/719-dnsmasq-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/dnsmasq start 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/reload.d/719-firewall-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/firewall start 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/reload.d/720-network-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/network start 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/reload.d/798-sysntpd-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/sysntpd start 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/upgrade/001-reset-uci: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | NETWORK_CFG='/etc/config/network' 4 | NETWORK_SAVED="${NETWORK_CFG}_gluon-old" 5 | 6 | SYSTEM_CFG='/etc/config/system' 7 | SYSTEM_SAVED="${SYSTEM_CFG}_gluon-old" 8 | 9 | # Make sure everything is saved before we move away the config files 10 | uci commit 11 | 12 | # Save old configs (unless there is already a saved config, 13 | # which means that the previous upgrade was interrupted) 14 | if [ -s "$NETWORK_CFG" ] && ! [ -s "$NETWORK_SAVED" ]; then 15 | mv -f "$NETWORK_CFG" "$NETWORK_SAVED" 16 | fi 17 | if [ -s "$SYSTEM_CFG" ] && ! [ -s "$SYSTEM_SAVED" ]; then 18 | mv -f "$SYSTEM_CFG" "$SYSTEM_SAVED" 19 | fi 20 | 21 | # Generate a new network config 22 | rm -f /etc/board.json "$NETWORK_CFG" "$SYSTEM_CFG" 23 | config_generate 24 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/gluon/upgrade/998-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | uci -q batch <<-EOF 4 | delete gluon.core.reconfigure 5 | commit 6 | EOF 7 | 8 | # New config is saved, we can delete the old one 9 | rm -f /etc/config/*_gluon-old 10 | -------------------------------------------------------------------------------- /package/gluon-core/files/lib/upgrade/keep.d/gluon: -------------------------------------------------------------------------------- 1 | /lib/gluon/core/sysconfig/ 2 | -------------------------------------------------------------------------------- /package/gluon-core/files/usr/bin/gluon-list-mesh-interfaces: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ubus call network.interface dump | jsonfilter -e "@.interface[@.proto='gluon_mesh' && @.up=true].device" 3 | -------------------------------------------------------------------------------- /package/gluon-core/files/usr/bin/gluon-reconfigure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd /lib/gluon/upgrade || exit 1 4 | 5 | err=0 6 | 7 | for script in *; do 8 | echo "Configuring: ${script}" 9 | ./"$script" || err=1 10 | done 11 | 12 | if [ $err -eq 1 ]; then 13 | echo 'One or more upgrade scripts failed. Please review the above error messages.' 14 | exit 1 15 | fi 16 | 17 | exit 0 18 | -------------------------------------------------------------------------------- /package/gluon-core/files/usr/bin/gluon-reload: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd "/lib/gluon/reload.d" || exit 1 4 | 5 | err=0 6 | 7 | for script in *; do 8 | echo "Reloading: ${script}" 9 | ./"$script" || err=1 10 | done 11 | 12 | if [ $err -eq 1 ]; then 13 | echo 'One or more daemons failed to reload.' >&2 14 | exit 1 15 | fi 16 | 17 | exit 0 18 | -------------------------------------------------------------------------------- /package/gluon-core/i18n/gluon-core.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Domain" 5 | msgstr "" 6 | 7 | msgid "Firmware release" 8 | msgstr "" 9 | 10 | msgid "Gluon version" 11 | msgstr "" 12 | 13 | msgid "Hardware model" 14 | msgstr "" 15 | 16 | msgid "Hostname" 17 | msgstr "" 18 | 19 | msgid "MAC address" 20 | msgstr "" 21 | 22 | msgid "Public VPN key" 23 | msgstr "" 24 | 25 | msgid "Site" 26 | msgstr "" 27 | 28 | msgid "Site version" 29 | msgstr "" 30 | 31 | msgid "Switch type" 32 | msgstr "" 33 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/lib/gluon/upgrade/030-system: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local sysconfig = require 'gluon.sysconfig' 4 | 5 | -- Initial 6 | if sysconfig.gluon_version then 7 | os.exit(0) 8 | end 9 | 10 | 11 | local site = require 'gluon.site' 12 | local util = require 'gluon.util' 13 | local uci = require('simple-uci').cursor() 14 | local pretty_hostname = require 'pretty_hostname' 15 | 16 | local system = uci:get_first('system', 'system') 17 | 18 | pretty_hostname.set(uci, util.default_hostname()) 19 | uci:set('system', system, 'timezone', site.timezone()) 20 | 21 | uci:save('system') 22 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/lib/gluon/upgrade/115-swconfig: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local platform = require 'gluon.platform' 4 | local uci = require('simple-uci').cursor() 5 | 6 | local switch_vlans = { 7 | -- device identifier, lan ports, wan ports 8 | ["ubnt,unifiac-mesh-pro"] = {"3 0t", "2 0t"}, 9 | ["ubnt,unifiac-pro"] = {"2 0t", "3 0t"}, 10 | } 11 | 12 | local board_name = platform.get_board_name() 13 | local assignments = switch_vlans[board_name] 14 | 15 | if not platform.match('ath79', 'generic') or not assignments then 16 | return 17 | end 18 | 19 | uci:delete_all('network', 'switch_vlan') 20 | 21 | for vlan, ports in ipairs(assignments) do 22 | uci:section("network", "switch_vlan", nil, { 23 | device = "switch0", 24 | vlan = vlan, 25 | ports = ports, 26 | }) 27 | end 28 | 29 | uci:save('network') 30 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/lib/gluon/upgrade/120-ntp-servers: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local site = require 'gluon.site' 4 | 5 | if #site.ntp_servers({}) == 0 then 6 | os.exit(0) 7 | end 8 | 9 | 10 | local uci = require('simple-uci').cursor() 11 | uci:delete('system', 'ntp', 'server') 12 | uci:set_list('system', 'ntp', 'server', site.ntp_servers({})) 13 | uci:save('system') 14 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/lib/gluon/upgrade/150-poe-passthrough: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local sysconfig = require 'gluon.sysconfig' 4 | local site = require 'gluon.site' 5 | 6 | if sysconfig.gluon_version or not site.poe_passthrough(false) then 7 | os.exit(0) 8 | end 9 | 10 | 11 | local uci = require('simple-uci').cursor() 12 | 13 | if uci:get('system', 'poe_passthrough') then 14 | uci:set('system', 'poe_passthrough', 'value', true) 15 | uci:save('system') 16 | end 17 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/lib/gluon/upgrade/190-preserve-wireless-channels: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local wireless = require 'gluon.wireless' 4 | local uci = require('simple-uci').cursor() 5 | 6 | local preserve_channels = wireless.preserve_channels(uci) 7 | 8 | uci:section('gluon', 'wireless', 'wireless', { 9 | preserve_channels = preserve_channels or false, 10 | }) 11 | uci:save('gluon') 12 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/lib/gluon/upgrade/205-dsa-conduit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | local platform = require 'gluon.platform' 5 | 6 | -- This is a workaround to result in a configuration where all ports 7 | -- on the DSA switch are connected to the same CPU interface. 8 | -- 9 | -- See Gluon issue #3479 for details. 10 | -- https://github.com/freifunk-gluon/gluon/issues/3479 11 | 12 | if not platform.match('ipq806x', 'generic', { 13 | 'netgear,r7800', 14 | 'tplink,c2600', 15 | }) then 16 | return 17 | end 18 | 19 | 20 | local ports = { 21 | 'lan1', 22 | 'lan2', 23 | 'lan3', 24 | 'lan4', 25 | 'wan', 26 | } 27 | local cpu_conduit = 'eth0' 28 | 29 | for _, port in ipairs(ports) do 30 | local section_name = 'port_' .. port 31 | 32 | uci:section('network', 'device', section_name, { 33 | name = port, 34 | conduit = cpu_conduit, 35 | }) 36 | end 37 | 38 | uci:save('network') 39 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/lib/gluon/upgrade/997-migrate-preserved: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | 5 | for _, config in ipairs({'system', 'network'}) do 6 | uci:foreach(config .. '_gluon-old', nil, function(s) 7 | if s.gluon_preserve ~= '1' then return end 8 | 9 | -- Unnamed sections can't be preserved 10 | if s['.anonymous'] then return end 11 | 12 | -- We don't allow overwriting existing sections 13 | if uci:get(config, s['.name']) then return end 14 | 15 | uci:section(config, s['.type'], s['.name'], s) 16 | end) 17 | 18 | uci:save(config) 19 | end 20 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/lib/gluon/upgrade/999-version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local sysconfig = require 'gluon.sysconfig' 4 | 5 | local util = require 'gluon.util' 6 | 7 | 8 | -- Save the Gluon version in the sysconfig so we know which version we 9 | -- upgraded from after the next upgrade 10 | sysconfig.gluon_version = util.trim(util.readfile('/lib/gluon/gluon-version')) 11 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/usr/bin/gluon-info: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local info = require 'gluon.info' 4 | 5 | local values = info.get_info_pretty() 6 | 7 | local padTo = 24 8 | 9 | for _, value in ipairs(values) do 10 | local labelLen = string.len(value[1]) + 1 11 | 12 | print(value[1] .. ':' .. string.rep(' ', padTo - labelLen), value[2]) 13 | end 14 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/usr/bin/gluon-show-site: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local json = require 'jsonc' 4 | local site = require 'gluon.site' 5 | 6 | print(json.stringify(site(), true)) 7 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/usr/lib/lua/gluon/sysconfig.lua: -------------------------------------------------------------------------------- 1 | local sysconfigdir = '/lib/gluon/core/sysconfig/' 2 | 3 | local function get(_, name) 4 | local f = io.open(sysconfigdir .. name) 5 | if f then 6 | local ret = f:read('*line') 7 | f:close() 8 | return (ret or '') 9 | end 10 | return nil 11 | end 12 | 13 | local function set(_, name, val) 14 | if val == get(nil, name) then 15 | return 16 | end 17 | 18 | if val then 19 | local f = io.open(sysconfigdir .. name, 'w+') 20 | f:write(val, '\n') 21 | f:close() 22 | else 23 | os.remove(sysconfigdir .. name) 24 | end 25 | end 26 | 27 | return setmetatable({}, { 28 | __index = get, 29 | __newindex = set, 30 | }) 31 | -------------------------------------------------------------------------------- /package/gluon-core/luasrc/usr/lib/lua/gluon/users.lua: -------------------------------------------------------------------------------- 1 | local util = require 'gluon.util' 2 | 3 | 4 | local M = {} 5 | 6 | function M.remove_user(username) 7 | os.execute('exec lock /var/lock/passwd') 8 | util.replace_prefix('/etc/passwd', username .. ':') 9 | util.replace_prefix('/etc/shadow', username .. ':') 10 | os.execute('exec lock -u /var/lock/passwd') 11 | end 12 | 13 | function M.remove_group(groupname) 14 | os.execute('exec lock /var/lock/group') 15 | util.replace_prefix('/etc/group', groupname .. ':') 16 | os.execute('exec lock -u /var/lock/group') 17 | end 18 | 19 | return M 20 | -------------------------------------------------------------------------------- /package/gluon-core/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | 3 | project(gluon-core C) 4 | 5 | add_library(site MODULE site.c) 6 | set_property(TARGET site PROPERTY PREFIX "") 7 | set_property(TARGET site PROPERTY COMPILE_FLAGS "-Wall -std=c99") 8 | target_link_libraries(site gluonutil lua lua-jsonc) 9 | 10 | install(TARGETS site 11 | LIBRARY DESTINATION lib/lua/gluon 12 | ) 13 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-ebtables-filter-multicast 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-ebtables-filter-multicast 8 | TITLE:=Ebtables filters for multicast packets 9 | DEPENDS:=+gluon-core +gluon-ebtables gluon-mesh-batman-adv 10 | endef 11 | 12 | define Package/gluon-ebtables-filter-multicast/description 13 | Gluon community wifi mesh firmware framework: Ebtables filters for multicast packets 14 | 15 | These filters drop non-essential multicast traffic before it enters the mesh. 16 | 17 | Allowed protocols are: DHCP, DHCPv6, ARP, ICMP, ICMPv6, BitTorrent local peer discovery, BABEL and OSPF 18 | endef 19 | 20 | $(eval $(call BuildPackageGluon,gluon-ebtables-filter-multicast)) 21 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/110-mcast-allow-arp: -------------------------------------------------------------------------------- 1 | -- Bridge loop avoidance 2 | rule 'MULTICAST_OUT -p ARP --arp-opcode Reply --arp-gratuitous --arp-mac-dst ff:43:05:00:00:00/ff:ff:ff:fc:00:00 -j RETURN' 3 | rule 'MULTICAST_OUT -p ARP --arp-opcode Reply --arp-gratuitous --arp-mac-dst ff:43:05:05:00:00/ff:ff:ff:ff:00:00 -j RETURN' 4 | 5 | rule 'MULTICAST_OUT -p ARP --arp-opcode Reply --arp-ip-src 0.0.0.0 -j DROP' 6 | rule 'MULTICAST_OUT -p ARP --arp-opcode Request --arp-ip-dst 0.0.0.0 -j DROP' 7 | rule 'MULTICAST_OUT -p ARP -j RETURN' 8 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/110-mcast-allow-babel: -------------------------------------------------------------------------------- 1 | rule 'MULTICAST_OUT -p IPv6 --ip6-protocol udp --ip6-destination-port 6696 -j RETURN' 2 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/110-mcast-allow-btlpd: -------------------------------------------------------------------------------- 1 | rule 'MULTICAST_OUT -p IPv4 --ip-destination 239.192.152.143 --ip-protocol udp --ip-destination-port 6771 -j RETURN' 2 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/110-mcast-allow-dhcpv4: -------------------------------------------------------------------------------- 1 | rule 'MULTICAST_OUT -p IPv4 --ip-protocol udp --ip-destination-port 67 -j RETURN' 2 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/110-mcast-allow-dhcpv6: -------------------------------------------------------------------------------- 1 | rule 'MULTICAST_OUT -p IPv6 --ip6-protocol udp --ip6-destination-port 547 -j RETURN' 2 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/110-mcast-allow-icmpv6: -------------------------------------------------------------------------------- 1 | rule 'MULTICAST_OUT_ICMPV6 -p IPv6 --ip6-protocol ipv6-icmp --ip6-icmp-type echo-request -j RETURN' 2 | rule 'MULTICAST_OUT_ICMPV6 -p IPv6 --ip6-protocol ipv6-icmp --ip6-icmp-type 139 -j RETURN' -- ICMP Node Information Query 3 | rule 'MULTICAST_OUT_ICMPV6 -j ACCEPT' 4 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/110-mcast-allow-igmp: -------------------------------------------------------------------------------- 1 | rule 'MULTICAST_OUT -p IPv4 --ip-protocol igmp -j RETURN' 2 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/110-mcast-allow-ospf: -------------------------------------------------------------------------------- 1 | rule 'MULTICAST_OUT -p IPv4 --ip-protocol ospf -j RETURN' 2 | rule 'MULTICAST_OUT -p IPv6 --ip6-protocol ospf -j RETURN' 3 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/110-mcast-allow-respondd: -------------------------------------------------------------------------------- 1 | rule 'MULTICAST_OUT -p IPv6 --ip6-protocol udp --ip6-destination-port 1001 --ip6-dst ff05::2:1001 -j RETURN' 2 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/110-mcast-allow-ripng: -------------------------------------------------------------------------------- 1 | rule 'MULTICAST_OUT -p IPv6 --ip6-protocol udp --ip6-destination ff02::9 --ip6-destination-port 521 -j RETURN' 2 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-multicast/luasrc/lib/gluon/ebtables/355-mcast-drop: -------------------------------------------------------------------------------- 1 | rule ('MULTICAST_OUT -p IPv6 --ip6-dst ff02::1/128 -j DROP') 2 | rule ('MULTICAST_OUT -p IPv6 --ip6-dst ff02::15c/128 -j DROP') -- Gluon VXLAN multicast group 3 | rule ('MULTICAST_OUT -p IPv6 --ip6-dst ff00::/8 -j mark --set-mark 0x4 --mark-target RETURN') 4 | rule ('MULTICAST_OUT -j DROP') 5 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-ra-dhcp/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-ebtables-filter-ra-dhcp 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-ebtables-filter-ra-dhcp 8 | TITLE:=Ebtables filters for Router Advertisement and DHCP packets 9 | DEPENDS:=+gluon-core +gluon-ebtables gluon-mesh-batman-adv 10 | endef 11 | 12 | define Package/gluon-ebtables-filter-ra-dhcp/description 13 | Gluon community wifi mesh firmware framework: Ebtables filters for Router Advertisement and DHCP packets 14 | 15 | These filters ensure that RA and DHCP packets are only forwarded from the mesh into the 16 | client network, and not vice-versa. 17 | endef 18 | 19 | $(eval $(call BuildPackageGluon,gluon-ebtables-filter-ra-dhcp)) 20 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-ra-dhcp/luasrc/lib/gluon/ebtables/200-dir-dhcpv4: -------------------------------------------------------------------------------- 1 | local uci = require('simple-uci').cursor() 2 | 3 | local gw_mode = uci:get('network', 'gluon_bat0', 'gw_mode') 4 | 5 | if gw_mode ~= 'server' then 6 | rule 'FORWARD -p IPv4 --ip-protocol udp --ip-destination-port 67 -j OUT_ONLY' 7 | rule 'OUTPUT -p IPv4 --ip-protocol udp --ip-destination-port 67 -j OUT_ONLY' 8 | 9 | rule 'FORWARD -p IPv4 --ip-protocol udp --ip-destination-port 68 -j IN_ONLY' 10 | rule 'INPUT -p IPv4 --ip-protocol udp --ip-destination-port 68 -j IN_ONLY' 11 | end 12 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-ra-dhcp/luasrc/lib/gluon/ebtables/200-dir-dhcpv6: -------------------------------------------------------------------------------- 1 | rule 'FORWARD -p IPv6 --ip6-protocol udp --ip6-destination-port 547 -j OUT_ONLY' 2 | rule 'OUTPUT -p IPv6 --ip6-protocol udp --ip6-destination-port 547 -j OUT_ONLY' 3 | 4 | rule 'FORWARD -p IPv6 --ip6-protocol udp --ip6-destination-port 546 -j IN_ONLY' 5 | rule 'INPUT -p IPv6 --ip6-protocol udp --ip6-destination-port 546 -j IN_ONLY' 6 | -------------------------------------------------------------------------------- /package/gluon-ebtables-filter-ra-dhcp/luasrc/lib/gluon/ebtables/200-dir-radv: -------------------------------------------------------------------------------- 1 | rule 'FORWARD -p IPv6 --ip6-protocol ipv6-icmp --ip6-icmp-type router-solicitation -j OUT_ONLY' 2 | rule 'OUTPUT -p IPv6 --ip6-protocol ipv6-icmp --ip6-icmp-type router-solicitation -j OUT_ONLY' 3 | 4 | rule 'FORWARD -p IPv6 --ip6-protocol ipv6-icmp --ip6-icmp-type router-advertisement -j IN_ONLY' 5 | rule 'INPUT -p IPv6 --ip6-protocol ipv6-icmp --ip6-icmp-type router-advertisement -j IN_ONLY' 6 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/files/etc/init.d/gluon-arp-limiter: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | USE_PROCD=1 4 | START=20 5 | STOP=90 6 | 7 | start_service() { 8 | procd_open_instance 9 | procd_set_param command /usr/sbin/gluon-arp-limiter 10 | procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}" 11 | 12 | procd_set_param stderr 1 13 | procd_close_instance 14 | } 15 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/files/lib/gluon/reload.d/380-gluon-arp-limiter-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-arp-limiter stop 3 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/files/lib/gluon/reload.d/720-gluon-arp-limiter-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-arp-limiter start 3 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/files/usr/lib/autoupdater/abort.d/15start-arp-limiter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | # Start after network 7 | start_enabled gluon-arp-limiter 8 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/files/usr/lib/autoupdater/upgrade.d/05stop-arp-limiter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | # Stop before network 7 | stop gluon-arp-limiter 8 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/luasrc/lib/gluon/ebtables/100-arp-limit-chains: -------------------------------------------------------------------------------- 1 | chain('ARP_LIMIT', 'DROP') 2 | chain('ARP_LIMIT_DATCHECK', 'RETURN') 3 | chain('ARP_LIMIT_TLCHECK', 'RETURN') 4 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/luasrc/lib/gluon/ebtables/320-arp-limit-rules: -------------------------------------------------------------------------------- 1 | rule('ARP_LIMIT -j ARP_LIMIT_DATCHECK') 2 | rule('ARP_LIMIT --mark 0x2/0x2 -j RETURN') 3 | rule('ARP_LIMIT -j ARP_LIMIT_TLCHECK') 4 | rule('ARP_LIMIT --limit 1/sec --limit-burst 50 -j RETURN') 5 | 6 | rule('FORWARD -p ARP --logical-out br-client -o bat0 --arp-op Request -j ARP_LIMIT') 7 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/src/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2017 Linus Lüssing 2 | # SPDX-License-Identifier: GPL-2.0-or-later 3 | 4 | all: gluon-arp-limiter 5 | 6 | CFLAGS += -Wall 7 | 8 | gluon-arp-limiter: gluon-arp-limiter.c addr_store.c lookup3.c mac.c 9 | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -fPIC -D_GNU_SOURCE -o $@ $^ $(LDLIBS) 10 | 11 | clean: 12 | rm -f gluon-arp-limiter 13 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/src/addr_store.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2017 Linus Lüssing 2 | // SPDX-License-Identifier: GPL-2.0-or-later 3 | 4 | #ifndef _ADDR_STORE_H_ 5 | #define _ADDR_STORE_H_ 6 | 7 | #define ADDR_STORE_NUM_BUCKETS 32 8 | 9 | struct addr_list { 10 | struct addr_list *next; 11 | int tic; 12 | char addr[0]; 13 | }; 14 | 15 | struct addr_store { 16 | struct addr_list *buckets[ADDR_STORE_NUM_BUCKETS]; 17 | size_t addr_len; 18 | void (*destructor)(struct addr_list *); 19 | char *(*ntoa)(void *); 20 | }; 21 | 22 | int addr_store_init(size_t addr_len, 23 | void (*destructor)(struct addr_list *), 24 | char *(*ntoa)(void *), 25 | struct addr_store *store); 26 | int addr_store_add(void *addr, struct addr_store *store); 27 | void addr_store_cleanup(struct addr_store *store); 28 | 29 | #endif /* _ADDR_STORE_H_ */ 30 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/src/gluon-arp-limiter.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2017 Linus Lüssing 2 | // SPDX-License-Identifier: GPL-2.0-or-later 3 | 4 | #ifndef _GLUON_ARP_LIMITER_H_ 5 | #define _GLUON_ARP_LIMITER_H_ 6 | 7 | extern int clock; 8 | 9 | #endif /* _GLUON_ARP_LIMITER_H_ */ 10 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/src/lookup3.h: -------------------------------------------------------------------------------- 1 | #include /* defines uint32_t etc */ 2 | 3 | uint32_t hashword( 4 | const uint32_t *k, /* the key, an array of uint32_t values */ 5 | size_t length, /* the length of the key, in uint32_ts */ 6 | uint32_t initval); /* the previous hash, or an arbitrary value */ 7 | -------------------------------------------------------------------------------- /package/gluon-ebtables-limit-arp/src/mac.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2017 Linus Lüssing 2 | // SPDX-License-Identifier: GPL-2.0-or-later 3 | 4 | #ifndef _MAC_H_ 5 | #define _MAC_H_ 6 | 7 | struct mac_addr { 8 | /* 8 instead of 6 for multiples of uint32_t for hashword() */ 9 | unsigned char storage[8]; 10 | }; 11 | 12 | int mac_aton(const char *cp, struct mac_addr *mac); 13 | char *mac_ntoa(struct mac_addr *mac); 14 | 15 | static inline int mac_is_multicast(struct mac_addr *addr) 16 | { 17 | return addr->storage[0] & 0x01; 18 | } 19 | 20 | #endif /* _MAC_H_ */ 21 | -------------------------------------------------------------------------------- /package/gluon-ebtables-source-filter/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-ebtables-source-filter 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-ebtables-source-filter 8 | TITLE:=Ebtables rules to filter unreasonable L2 traffic. 9 | DEPENDS:=+gluon-core +gluon-ebtables gluon-mesh-batman-adv 10 | endef 11 | 12 | define Package/gluon-ebtables-source-filter/description 13 | This package adds an additional layer-2 filter-ruleset to prevent unreasonable 14 | traffic entering the network via the nodes. 15 | endef 16 | 17 | $(eval $(call BuildPackageGluon,gluon-ebtables-source-filter)) 18 | -------------------------------------------------------------------------------- /package/gluon-ebtables-source-filter/luasrc/lib/gluon/ebtables/100-local-forward-chain: -------------------------------------------------------------------------------- 1 | chain('LOCAL_FORWARD', 'DROP') 2 | -------------------------------------------------------------------------------- /package/gluon-ebtables-source-filter/luasrc/lib/gluon/ebtables/110-local-forward-allow-arp: -------------------------------------------------------------------------------- 1 | local prefix4 = require('gluon.site').prefix4() 2 | 3 | if prefix4 then 4 | rule('LOCAL_FORWARD -p ARP --arp-ip-src ' .. prefix4 .. ' --arp-ip-dst ' .. prefix4 .. ' -j RETURN') 5 | rule('LOCAL_FORWARD -p ARP --arp-ip-src 0.0.0.0 --arp-ip-dst ' .. prefix4 .. ' -j RETURN') 6 | end 7 | -------------------------------------------------------------------------------- /package/gluon-ebtables-source-filter/luasrc/lib/gluon/ebtables/110-local-forward-allow-ipv4: -------------------------------------------------------------------------------- 1 | local prefix4 = require('gluon.site').prefix4() 2 | 3 | if prefix4 then 4 | rule('LOCAL_FORWARD -p IPv4 --ip-protocol udp --ip-destination-port 67 -j RETURN') 5 | rule('LOCAL_FORWARD -p IPv4 --ip-src ' .. prefix4 .. ' -j RETURN') 6 | end 7 | -------------------------------------------------------------------------------- /package/gluon-ebtables-source-filter/luasrc/lib/gluon/ebtables/110-local-forward-allow-ipv6: -------------------------------------------------------------------------------- 1 | local site = require 'gluon.site' 2 | 3 | rule('LOCAL_FORWARD -p IPv6 --ip6-src fe80::/64 -j RETURN') 4 | rule('LOCAL_FORWARD -p IPv6 --ip6-src ::/128 --ip6-proto ipv6-icmp -j RETURN') 5 | rule('LOCAL_FORWARD -p IPv6 --ip6-src ' .. site.prefix6() .. ' -j RETURN') 6 | 7 | for _, prefix in ipairs(site.extra_prefixes6({})) do 8 | rule('LOCAL_FORWARD -p IPv6 --ip6-src ' .. prefix .. ' -j RETURN') 9 | end 10 | -------------------------------------------------------------------------------- /package/gluon-ebtables-source-filter/luasrc/lib/gluon/ebtables/300-local-forward-rules: -------------------------------------------------------------------------------- 1 | rule('FORWARD --logical-in br-client -i ! bat0 -j LOCAL_FORWARD') 2 | -------------------------------------------------------------------------------- /package/gluon-ebtables/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-ebtables 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-ebtables 8 | TITLE:=Ebtables support 9 | DEPENDS:=+gluon-core +ebtables-tiny \ 10 | +kmod-ebtables +kmod-ebtables-ipv4 +kmod-ebtables-ipv6 11 | endef 12 | 13 | define Package/gluon-ebtables/description 14 | Gluon community wifi mesh firmware framework: ebtables support 15 | endef 16 | 17 | $(eval $(call BuildPackageGluon,gluon-ebtables)) 18 | -------------------------------------------------------------------------------- /package/gluon-ebtables/check_site.lua: -------------------------------------------------------------------------------- 1 | need_boolean({'mesh', 'filter_membership_reports'}, false) 2 | -------------------------------------------------------------------------------- /package/gluon-ebtables/files/lib/gluon/reload.d/381-gluon-ebtables-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-ebtables stop 3 | -------------------------------------------------------------------------------- /package/gluon-ebtables/files/lib/gluon/reload.d/719-gluon-ebtables-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-ebtables start 3 | -------------------------------------------------------------------------------- /package/gluon-ebtables/luasrc/lib/gluon/ebtables/100-dir-chain: -------------------------------------------------------------------------------- 1 | chain('IN_ONLY', 'RETURN') 2 | chain('OUT_ONLY', 'RETURN') 3 | 4 | -- nat chain runs early, so we can drop IGMP/MLD 5 | chain('MULTICAST_IN', 'RETURN', 'nat') 6 | chain('MULTICAST_IN_ICMPV6', 'RETURN', 'nat') 7 | 8 | chain('MULTICAST_OUT', 'RETURN') 9 | chain('MULTICAST_OUT_ICMPV6', 'RETURN') 10 | -------------------------------------------------------------------------------- /package/gluon-ebtables/luasrc/lib/gluon/ebtables/101-dir-rules: -------------------------------------------------------------------------------- 1 | rule 'IN_ONLY --logical-in br-client -i bat0 -j RETURN' 2 | rule 'IN_ONLY --logical-in br-client -i local-port -j RETURN' 3 | rule 'IN_ONLY --logical-in br-client -j DROP' 4 | 5 | rule 'OUT_ONLY --logical-out br-client -o bat0 -j RETURN' 6 | rule 'OUT_ONLY --logical-out br-client -o local-port -j RETURN' 7 | rule 'OUT_ONLY --logical-out br-client -j DROP' 8 | -------------------------------------------------------------------------------- /package/gluon-ebtables/luasrc/lib/gluon/ebtables/350-mcast-dir-rules: -------------------------------------------------------------------------------- 1 | rule ('PREROUTING -d Multicast --logical-in br-client -i bat0 -j MULTICAST_IN', 'nat') 2 | rule 'OUTPUT -d Multicast --logical-out br-client -o bat0 -j MULTICAST_OUT' 3 | rule 'FORWARD -d Multicast --logical-out br-client -o bat0 -j MULTICAST_OUT' 4 | 5 | rule ('MULTICAST_IN -p IPv6 --ip6-protocol ipv6-icmp -j MULTICAST_IN_ICMPV6', 'nat') 6 | rule 'MULTICAST_OUT -p IPv6 --ip6-protocol ipv6-icmp -j MULTICAST_OUT_ICMPV6' 7 | -------------------------------------------------------------------------------- /package/gluon-hoodselector/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-hoodselector 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-hoodselector 8 | TITLE:=Automatically migrate nodes between domains. 9 | DEPENDS:=+luaposix +libgluonutil +lua-math-polygon +libjson-c +gluon-site +micrond +lua-bit32 @GLUON_MULTIDOMAIN 10 | CONFLICTS:=+gluon-config-mode-domain-select 11 | endef 12 | 13 | define Package/gluon-hoodselector/description 14 | Hoodselector automatically detects in which domain the node is 15 | located based on its geolocation settings. Domains require 16 | bounding boxes defined as polygons or rectangles. Hoodselector 17 | selects a domain from the list of known domains and migrate 18 | towards it without requiring a reboot. 19 | endef 20 | 21 | $(eval $(call BuildPackageGluon,gluon-hoodselector)) 22 | -------------------------------------------------------------------------------- /package/gluon-hoodselector/check_site.lua: -------------------------------------------------------------------------------- 1 | local function check_lat_lon_range(pos, range, label) 2 | need({'hoodselector', 'shapes'}, function() 3 | if (type(pos) ~= "number") then 4 | return false 5 | end 6 | if pos > range or pos < -range then 7 | return false 8 | end 9 | return true 10 | end, true, label.." must match a range +/-"..range) 11 | end 12 | 13 | if this_domain() ~= need_string(in_site({'default_domain'})) then 14 | for _, shape in pairs(need_table(in_domain({'hoodselector', 'shapes'}))) do 15 | need({'hoodselector', 'shapes'}, function() 16 | if #shape < 2 then 17 | return false 18 | end 19 | for _, v in ipairs(shape) do 20 | check_lat_lon_range(v.lat, 90.0, "lat") 21 | check_lat_lon_range(v.lon, 180.0, "lon") 22 | end 23 | return true 24 | end, true, "needs to have at least 2 coordinates for rectangular shapes.") 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /package/gluon-hoodselector/files/usr/lib/micron.d/hoodselector: -------------------------------------------------------------------------------- 1 | */2 * * * * /usr/sbin/hoodselector 2 | -------------------------------------------------------------------------------- /package/gluon-iptables-clamp-mss-to-pmtu/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-iptables-clamp-mss-to-pmtu 4 | 5 | include ../gluon.mk 6 | 7 | define Package/$(PKG_NAME) 8 | TITLE:=This will establish a firewall rule to clamp the mss to pmtu on the mesh-vpn interface when the connection is towards 64:ff9b::/96 9 | DEPENDS:= +ip6tables-zz-legacy 10 | endef 11 | 12 | define Package/$(PKG_NAME)/description 13 | Package working around icmp blackholes in the internet. 14 | endef 15 | 16 | define Package/$(PKG_NAME)/install 17 | $(Gluon/Build/Install) 18 | 19 | $(INSTALL_DIR) $(1)/lib/gluon 20 | endef 21 | 22 | $(eval $(call BuildPackageGluon,$(PKG_NAME))) 23 | -------------------------------------------------------------------------------- /package/gluon-iptables-clamp-mss-to-pmtu/files/lib/gluon/mesh-vpn/iptables-mss.rules: -------------------------------------------------------------------------------- 1 | *mangle 2 | -A FORWARD -o mesh-vpn+ -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu 3 | COMMIT 4 | -------------------------------------------------------------------------------- /package/gluon-iptables-clamp-mss-to-pmtu/luasrc/lib/gluon/upgrade/800-iptables-mesh-vpn-clamp-mss-to-pmtu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | uci:section('firewall', 'include', 'vpn_clamp_mss', { 5 | family = 'ipv6', 6 | type = 'restore', 7 | path = '/lib/gluon/mesh-vpn/iptables-mss.rules' 8 | }) 9 | 10 | uci:save('firewall') 11 | -------------------------------------------------------------------------------- /package/gluon-l3roamd/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-l3roamd 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-l3roamd 8 | TITLE:=Configure l3roamd for l3-mesh 9 | DEPENDS:=+gluon-core +gluon-mesh-layer3-common +l3roamd +uc 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-l3roamd)) 13 | -------------------------------------------------------------------------------- /package/gluon-l3roamd/luasrc/lib/gluon/upgrade/320-firewall-l3roamd: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | 5 | uci:section('firewall', 'zone', 'l3roamd', { 6 | name = 'l3roamd', 7 | input = 'ACCEPT', 8 | output = 'ACCEPT', 9 | forward = 'REJECT', 10 | device = 'l3roam+', 11 | log = '1', 12 | }) 13 | 14 | uci:section('firewall', 'forwarding', 'flc', { 15 | src = 'l3roamd', 16 | dest = 'loc_client', 17 | }) 18 | 19 | uci:section('firewall', 'forwarding', 'fcl', { 20 | src = 'loc_client', 21 | dest = 'l3roamd', 22 | }) 23 | 24 | uci:section('firewall', 'rule', 'mesh_l3roamd', { 25 | name = 'mesh_l3roamd', 26 | src = 'mesh', 27 | dest_port = '5523', 28 | proto = 'udp', 29 | target = 'ACCEPT', 30 | }) 31 | 32 | uci:save('firewall') 33 | -------------------------------------------------------------------------------- /package/gluon-lock-password/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-lock-password 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-lock-password 8 | TITLE:=Locks the root account by default 9 | DEPENDS:=+gluon-core 10 | endef 11 | 12 | define Package/gluon-lock-password/description 13 | This packages locks the root account by default. 14 | endef 15 | 16 | $(eval $(call BuildPackageGluon,gluon-lock-password)) 17 | -------------------------------------------------------------------------------- /package/gluon-lock-password/files/lib/gluon/upgrade/100-lock-password: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | has_root_pwd() { 4 | local pwd 5 | 6 | pwd=$([ -f "$1" ] && cat "$1") 7 | pwd="${pwd#*root:}" 8 | pwd="${pwd%%:*}" 9 | 10 | test -n "${pwd}" 11 | } 12 | 13 | has_root_pwd /etc/shadow || passwd -l root 14 | -------------------------------------------------------------------------------- /package/gluon-logging/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-logging 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-logging 8 | TITLE:=Configure remote syslog from site.conf 9 | DEPENDS:=+gluon-core 10 | CONFLICTS:=gluon-web-logging 11 | endef 12 | 13 | $(eval $(call BuildPackageGluon,gluon-logging)) 14 | 15 | -------------------------------------------------------------------------------- /package/gluon-logging/check_site.lua: -------------------------------------------------------------------------------- 1 | need_string({'syslog', 'ip'}, true) 2 | need_number_range({'syslog', 'port'}, 1, 65535, false) 3 | need_one_of({'syslog', 'proto'}, {'tcp', 'udp'}, false) 4 | -------------------------------------------------------------------------------- /package/gluon-logging/luasrc/lib/gluon/upgrade/040-syslog: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | local site = require('gluon.site') 3 | local uci = require('simple-uci').cursor() 4 | 5 | local system = uci:get_first('system', 'system') 6 | 7 | if not site.syslog.ip() then 8 | uci:delete('system', system, 'log_remote') 9 | uci:delete('system', system, 'log_ip') 10 | uci:delete('system', system, 'log_port') 11 | uci:delete('system', system, 'log_proto') 12 | else 13 | uci:set('system', system, 'log_remote', 1) 14 | uci:set('system', system, 'log_ip', site.syslog.ip()) 15 | uci:set('system', system, 'log_port', site.syslog.port(514)) 16 | uci:set('system', system, 'log_proto', site.syslog.proto('udp')) 17 | end 18 | 19 | uci:save('system') 20 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-mesh-batman-adv 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-mesh-batman-adv-15 8 | PROVIDES:=gluon-mesh-batman-adv 9 | TITLE:=Support for batman-adv meshing (compat level 15) 10 | DEPENDS+= \ 11 | +kmod-batman-adv \ 12 | +gluon-core \ 13 | +libgluonutil \ 14 | +gluon-client-bridge \ 15 | +gluon-ebtables \ 16 | +firewall \ 17 | +libiwinfo \ 18 | +kmod-dummy \ 19 | +libnl-tiny \ 20 | +libbatadv \ 21 | +batctl 22 | endef 23 | 24 | $(eval $(call BuildPackageGluon,gluon-mesh-batman-adv-15)) 25 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/check_site.lua: -------------------------------------------------------------------------------- 1 | -- mesh/vxlan is required in single domain setups (this_domain() is nil) 2 | need_boolean(in_domain({'mesh', 'vxlan'}), not this_domain()) 3 | 4 | need_number({'mesh', 'batman_adv', 'gw_sel_class'}, false) 5 | need_one_of({'mesh', 'batman_adv', 'routing_algo'}, {'BATMAN_IV', 'BATMAN_V'}) 6 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/files/etc/sysctl.d/31-gluon-mesh-batman-adv.conf: -------------------------------------------------------------------------------- 1 | net.ipv6.conf.br-client.forwarding=0 2 | net.ipv6.conf.local-node.forwarding=0 3 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/files/lib/gluon/core/mesh/post-setup.d/30-gluon-mesh-batman-adv: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ubus call network.interface.gluon_bat0 renew 4 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/files/lib/gluon/core/mesh/setup.d/30-gluon-mesh-batman-adv: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$FIXED_MTU" -eq 0 ]; then 4 | ip link set dev "$IFNAME" mtu 1532 5 | fi 6 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/files/lib/gluon/core/mesh/teardown.d/70-gluon-mesh-batman-adv: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | lock /var/lock/gluon_bat0.lock 4 | batctl interface -M del "$IFNAME" 2>/dev/null 5 | lock -u /var/lock/gluon_bat0.lock 6 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/files/lib/gluon/respondd/client.dev: -------------------------------------------------------------------------------- 1 | client 2 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/files/lib/gluon/state/check.d/has_default_gw4: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | out=$(batctl gwl -H 2>/dev/null) && [ -n "$out" ] 3 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/files/lib/gluon/state/check.d/has_neighbours: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | out=$(batctl n -H 2>/dev/null) && [ -n "$out" ] 3 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/files/usr/lib/autoupdater/abort.d/10start-network: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | pidof netifd >/dev/null || start_enabled network 7 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/files/usr/lib/autoupdater/upgrade.d/10stop-network: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | wifi down 7 | sleep 1 8 | stop network 9 | ip link del bat0 10 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/luasrc/lib/gluon/ebtables/300-radv-input-output: -------------------------------------------------------------------------------- 1 | rule 'INPUT -p IPv6 --ip6-protocol ipv6-icmp --ip6-icmp-type router-solicitation -i bat0 -j DROP' 2 | rule 'OUTPUT -p IPv6 --ip6-protocol ipv6-icmp --ip6-icmp-type router-advertisement -o bat0 -j DROP' 3 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/luasrc/lib/gluon/radvd/arguments: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local site = require "gluon.site" 4 | 5 | io.write("-i local-node -p " .. site.prefix6()) 6 | 7 | if site.dns.servers() and site.next_node.ip6() then 8 | io.write(" --rdnss " .. site.next_node.ip6()) 9 | end 10 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/310-gluon-mesh-batman-adv-mesh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local sysconfig = require 'gluon.sysconfig' 4 | local util = require 'gluon.util' 5 | 6 | local uci = require('simple-uci').cursor() 7 | 8 | 9 | uci:delete('batman-adv', 'bat0') 10 | uci:save('batman-adv') 11 | 12 | local gw_mode = uci:get('network_gluon-old', 'gluon_bat0', 'gw_mode') or 'client' 13 | uci:section('network', 'interface', 'gluon_bat0', { 14 | proto = 'gluon_bat0', 15 | gw_mode = gw_mode, 16 | }) 17 | 18 | uci:section('network', 'interface', 'bat0', { 19 | ifname = 'bat0', 20 | proto = 'none', 21 | auto = true, 22 | macaddr = sysconfig.primary_mac, 23 | multicast_router = 2, 24 | learning = true, 25 | }) 26 | 27 | local interfaces = uci:get_list('network', 'client', 'ifname') 28 | util.add_to_set(interfaces, 'bat0') 29 | uci:set_list('network', 'client', 'ifname', interfaces) 30 | 31 | uci:save('network') 32 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/luasrc/lib/gluon/upgrade/330-gluon-mesh-batman-adv-mac-addresses: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local site = require 'gluon.site' 4 | local util = require 'gluon.util' 5 | local uci = require('simple-uci').cursor() 6 | 7 | 8 | -- fix up potentially duplicate MAC addresses (for meshing) 9 | if not site.mesh.vxlan(true) then 10 | uci:set('network', 'wan', 'macaddr', util.generate_mac(0)) 11 | end 12 | if uci:get('network', 'mesh_other') then 13 | uci:set('network', 'mesh_other', 'macaddr', util.generate_mac(4)) 14 | end 15 | uci:save('network') 16 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/src/respondd-common.h: -------------------------------------------------------------------------------- 1 | /* SPDX-FileCopyrightText: 2016-2019, Matthias Schiffer */ 2 | /* SPDX-License-Identifier: BSD-2-Clause */ 3 | 4 | 5 | #pragma once 6 | 7 | struct json_object * respondd_provider_nodeinfo(void); 8 | struct json_object * respondd_provider_statistics(void); 9 | struct json_object * respondd_provider_neighbours(void); 10 | -------------------------------------------------------------------------------- /package/gluon-mesh-batman-adv/src/respondd.c: -------------------------------------------------------------------------------- 1 | /* SPDX-FileCopyrightText: 2016-2019, Matthias Schiffer */ 2 | /* SPDX-License-Identifier: BSD-2-Clause */ 3 | 4 | #include "respondd-common.h" 5 | 6 | #include 7 | 8 | 9 | __attribute__ ((visibility ("default"))) 10 | const struct respondd_provider_info respondd_providers[] = { 11 | {"nodeinfo", respondd_provider_nodeinfo}, 12 | {"statistics", respondd_provider_statistics}, 13 | {"neighbours", respondd_provider_neighbours}, 14 | {} 15 | }; 16 | -------------------------------------------------------------------------------- /package/gluon-mesh-layer3-common/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-mesh-layer3-common 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-mesh-layer3-common 8 | TITLE:=Layer3 common files 9 | DEPENDS:=+gluon-core +gluon-mmfd +firewall 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-mesh-layer3-common)) 13 | -------------------------------------------------------------------------------- /package/gluon-mesh-layer3-common/check_site.lua: -------------------------------------------------------------------------------- 1 | need_string_match(in_domain({'node_prefix6'}), '^[%x:]+/64$') 2 | -------------------------------------------------------------------------------- /package/gluon-mesh-layer3-common/luasrc/lib/gluon/radvd/arguments: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | local site = require "gluon.site" 3 | 4 | io.write("-i local-node --default-lifetime 900 -a " .. site.prefix6()) 5 | if site.dns() and site.dns.servers() then 6 | io.write(" --rdnss " .. site.next_node.ip6()) 7 | end 8 | -------------------------------------------------------------------------------- /package/gluon-mesh-layer3-common/luasrc/lib/gluon/upgrade/250-layer3-ip6: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local sysconfig = require 'gluon.sysconfig' 4 | local uci = require('simple-uci').cursor() 5 | local site = require 'gluon.site' 6 | local iputil = require 'gluon.iputil' 7 | 8 | local ip = iputil.mac_to_ip(site.node_prefix6(), sysconfig.primary_mac) 9 | 10 | uci:set('network', 'loopback', 'ip6addr', ip) 11 | uci:save('network') 12 | -------------------------------------------------------------------------------- /package/gluon-mesh-layer3-common/luasrc/lib/gluon/upgrade/310-layer3-firewall: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | 5 | uci:section('firewall', 'forwarding', 'fcc', { 6 | src = 'loc_client', 7 | dest = 'loc_client', 8 | }) 9 | 10 | uci:section('firewall', 'forwarding', 'fcm', { 11 | src = 'loc_client', 12 | dest = 'mesh', 13 | }) 14 | 15 | uci:section('firewall', 'forwarding', 'fmc', { 16 | src = 'mesh', 17 | dest = 'loc_client', 18 | }) 19 | 20 | uci:section('firewall', 'forwarding', 'fmm', { 21 | src = 'mesh', 22 | dest = 'mesh', 23 | }) 24 | 25 | uci:save('firewall') 26 | -------------------------------------------------------------------------------- /package/gluon-mesh-layer3-common/luasrc/usr/lib/lua/gluon/l3.lua: -------------------------------------------------------------------------------- 1 | local util = require("gluon.util") 2 | 3 | local M = {} 4 | 5 | -- returns a prefix generated from the domain-seed 6 | -- for l3roamd -P 7 | function M.node_client_prefix6() 8 | local key = "gluon-l3roamd.node_client_prefix6" 9 | local prefix_seed = util.domain_seed_bytes(key, 7) 10 | return ("fd" .. prefix_seed):gsub(("(%x%x%x%x)"):rep(4), "%1:%2:%3:%4" .. "::/64") 11 | end 12 | 13 | return M 14 | -------------------------------------------------------------------------------- /package/gluon-mesh-olsrd/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-mesh-olsrd 4 | PKG_VERSION=1 5 | 6 | include ../gluon.mk 7 | 8 | define Package/gluon-mesh-olsrd 9 | TITLE:=olsrd mesh 10 | DEPENDS:= \ 11 | +gluon-core \ 12 | @IPV6 \ 13 | +oonf-olsrd2 \ 14 | +firewall \ 15 | +gluon-mesh-layer3-common \ 16 | +gluon-l3roamd 17 | PROVIDES:=gluon-mesh-provider 18 | endef 19 | 20 | $(eval $(call BuildPackageGluon,gluon-mesh-olsrd)) 21 | -------------------------------------------------------------------------------- /package/gluon-mesh-olsrd/check_site.lua: -------------------------------------------------------------------------------- 1 | need_table({'mesh', 'olsrd', 'v2', 'config'}, nil, false) 2 | -------------------------------------------------------------------------------- /package/gluon-mesh-olsrd/files/lib/gluon/core/mesh/post-setup.d/30-reload-olsr: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | reload_running() { 4 | if [ -x /etc/init.d/"$1" ] && /etc/init.d/"$1" enabled && /etc/init.d/"$1" running; then 5 | echo "(post-setup.d:$IFNAME) Reloading $1..." 6 | /etc/init.d/"$1" reload 7 | fi 8 | } 9 | 10 | reload_running olsrd2 11 | -------------------------------------------------------------------------------- /package/gluon-mesh-olsrd/files/lib/gluon/core/mesh/teardown.d/70-reload-olsr: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | reload_running() { 4 | if [ -x /etc/init.d/"$1" ] && /etc/init.d/"$1" enabled && /etc/init.d/"$1" running; then 5 | echo "(teardown.d:$IFNAME) Reloading $1..." 6 | /etc/init.d/"$1" reload 7 | fi 8 | } 9 | 10 | reload_running olsrd2 11 | -------------------------------------------------------------------------------- /package/gluon-mesh-olsrd/files/lib/gluon/respondd/client.dev: -------------------------------------------------------------------------------- 1 | mmfd 2 | -------------------------------------------------------------------------------- /package/gluon-mesh-olsrd/files/usr/lib/autoupdater/abort.d/10olsrd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | 7 | start_enabled olsrd2 8 | wifi up 9 | -------------------------------------------------------------------------------- /package/gluon-mesh-olsrd/files/usr/lib/autoupdater/upgrade.d/10olsrd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | 7 | stop olsrd2 8 | wifi down 9 | -------------------------------------------------------------------------------- /package/gluon-mesh-olsrd/luasrc/lib/gluon/upgrade/370-gluon-mesh-olsrd-setup-fw: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | local util = require 'gluon.util' 5 | 6 | local networks = uci:get_list('firewall', 'drop', 'network') 7 | util.remove_from_set(networks, 'client') 8 | uci:set_list('firewall', 'drop', 'network', networks) 9 | 10 | uci:save('firewall') 11 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-core/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-mesh-vpn-core 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-mesh-vpn-core 8 | TITLE:=Basic support for connecting meshes via VPN tunnels 9 | DEPENDS:=+gluon-core +gluon-wan-dnsmasq +iptables-zz-legacy +iptables-mod-extra 10 | USERID:=:gluon-mesh-vpn=800 11 | endef 12 | 13 | $(eval $(call BuildPackageGluon,gluon-mesh-vpn-core)) 14 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-core/check_site.lua: -------------------------------------------------------------------------------- 1 | need_boolean(in_site({'mesh_vpn', 'enabled'}), false) 2 | need_boolean(in_site({'mesh_vpn', 'pubkey_privacy'}), false) 3 | 4 | need_boolean(in_site({'mesh_vpn', 'bandwidth_limit', 'enabled'}), false) 5 | need_number(in_site({'mesh_vpn', 'bandwidth_limit', 'ingress'}), false) 6 | need_number(in_site({'mesh_vpn', 'bandwidth_limit', 'egress'}), false) 7 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-core/files/lib/gluon/mesh-vpn/iptables.rules: -------------------------------------------------------------------------------- 1 | *nat 2 | -I OUTPUT -m owner --gid-owner gluon-mesh-vpn -o lo -d 127.0.0.1 -p udp --dport 53 -j DNAT --to-destination :54 3 | COMMIT 4 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-core/luasrc/lib/gluon/mesh-vpn/update-config: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | local vpn_name, vpn = require('gluon.mesh-vpn').get_active_provider() 5 | 6 | local vpn_config = { 7 | enabled = uci:get_bool('gluon', 'mesh_vpn', 'enabled'), 8 | limit_enabled = uci:get_bool('gluon', 'mesh_vpn', 'limit_enabled'), 9 | limit_egress = uci:get('gluon', 'mesh_vpn', 'limit_egress'), 10 | limit_ingress = uci:get('gluon', 'mesh_vpn', 'limit_ingress'), 11 | } 12 | 13 | if vpn_name ~= 'fastd' then 14 | uci:set('fastd', 'mesh_vpn', 'enabled', false) 15 | uci:save('fastd') 16 | end 17 | 18 | vpn.enable(vpn_config.enabled) 19 | if vpn_config.limit_enabled then 20 | vpn.set_limit(vpn_config.limit_ingress, vpn_config.limit_egress) 21 | else 22 | vpn.set_limit(nil, nil) 23 | end 24 | 25 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-core/luasrc/usr/bin/gluon-wan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local GROUP = 'gluon-mesh-vpn' 4 | 5 | local grp = require 'posix.grp' 6 | local unistd = require 'posix.unistd' 7 | 8 | if #arg < 1 then 9 | io.stderr:write('Usage: gluon-wan ...\n') 10 | os.exit(1) 11 | end 12 | 13 | local g = grp.getgrnam(GROUP) 14 | if not g then 15 | io.stderr:write(string.format("gluon-wan: unable to find group '%s'\n", GROUP)) 16 | os.exit(1) 17 | end 18 | 19 | local ok, err = unistd.setpid('g', g.gr_gid) 20 | if ok ~= 0 then 21 | io.stderr:write(string.format("gluon-wan: unable to change to group: %s\n", err)) 22 | os.exit(1) 23 | end 24 | local args = {[0] = arg[1], unpack(arg)} 25 | table.remove(args, 1) 26 | 27 | local _ 28 | _, err = unistd.execp(args[0], args) 29 | 30 | io.stderr:write(string.format("gluon-wan: exec failed: %s\n", err)) 31 | os.exit(1) 32 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-core/src/Makefile: -------------------------------------------------------------------------------- 1 | all: respondd.so 2 | 3 | CFLAGS += -Wall -Werror-implicit-function-declaration 4 | 5 | respondd.so: respondd.c 6 | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -D_GNU_SOURCE -o $@ $^ $(LDLIBS) -lgluonutil -luci 7 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-fastd-l2tp/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-mesh-vpn-fastd-l2tp 4 | PKG_VERSION:=1 5 | 6 | include ../gluon.mk 7 | 8 | define Package/gluon-mesh-vpn-fastd-l2tp 9 | TITLE:=Support for connecting meshes via fastd (with L2TP kernel offloading) 10 | DEPENDS:=+gluon-core +gluon-mesh-vpn-fastd +kmod-l2tp-eth 11 | endef 12 | 13 | $(eval $(call BuildPackageGluon,gluon-mesh-vpn-fastd-l2tp)) 14 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-fastd-l2tp/files/lib/gluon/mesh-vpn/fastd/l2tp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/package/gluon-mesh-vpn-fastd-l2tp/files/lib/gluon/mesh-vpn/fastd/l2tp -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-fastd/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-mesh-vpn-fastd 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-mesh-vpn-fastd 8 | TITLE:=Support for connecting meshes via fastd 9 | DEPENDS:=+gluon-core +libgluonutil +gluon-mesh-vpn-core +fastd +simple-tc 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-mesh-vpn-fastd)) 13 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-fastd/files/lib/gluon/mesh-vpn/fastd/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/package/gluon-mesh-vpn-fastd/files/lib/gluon/mesh-vpn/fastd/.keep -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-fastd/files/lib/gluon/mesh-vpn/provider/fastd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/package/gluon-mesh-vpn-fastd/files/lib/gluon/mesh-vpn/provider/fastd -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-fastd/files/lib/gluon/reload.d/305-fastd-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/fastd stop 3 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-fastd/files/lib/gluon/reload.d/795-fastd-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/fastd start 3 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-fastd/src/Makefile: -------------------------------------------------------------------------------- 1 | all: respondd.so 2 | 3 | CFLAGS += -Wall 4 | 5 | respondd.so: respondd.c 6 | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -D_GNU_SOURCE -o $@ $^ $(LDLIBS) -lgluonutil -luci 7 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-sqm/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-mesh-vpn-sqm 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-mesh-vpn-sqm 8 | TITLE:=Adds support for SQM with CAKE on VPN links 9 | DEPENDS:= +gluon-mesh-vpn-core +sqm-scripts 10 | endef 11 | 12 | define Package/gluon-mesh-vpn-sqm/install 13 | $(Gluon/Build/Install) 14 | $(INSTALL_DIR) $(1)/lib/gluon/mesh-vpn 15 | touch $(1)/lib/gluon/mesh-vpn/sqm 16 | endef 17 | 18 | $(eval $(call BuildPackageGluon,gluon-mesh-vpn-sqm)) 19 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-wireguard/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-mesh-vpn-wireguard 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-mesh-vpn-wireguard 8 | TITLE:=Support for connecting meshes via wireguard 9 | DEPENDS:=+gluon-core +libgluonutil +gluon-mesh-vpn-core +wireguard-tools +wgpeerselector +libubox +libubus +simple-tc 10 | endef 11 | 12 | define Package/gluon-mesh-vpn-wireguard/install 13 | $(Gluon/Build/Install) 14 | $(INSTALL_DIR) $(1)/usr/sbin 15 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/gluon-hex-to-b64 $(1)/usr/sbin/ 16 | endef 17 | 18 | $(eval $(call BuildPackageGluon,gluon-mesh-vpn-wireguard)) 19 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-wireguard/check_site.lua: -------------------------------------------------------------------------------- 1 | local function check_peer(k) 2 | need_alphanumeric_key(k) 3 | 4 | need_string_match(in_domain(extend(k, 5 | {'public_key'})), "^" .. ("[%a%d+/]"):rep(42) .. "[AEIMQUYcgkosw480]=$") 6 | need_string(in_domain(extend(k, {'endpoint'}))) 7 | end 8 | 9 | need_table({'mesh_vpn', 'wireguard', 'peers'}, check_peer) 10 | need_number({'mesh_vpn', 'wireguard', 'mtu'}) 11 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-wireguard/files/lib/gluon/mesh-vpn/provider/wireguard: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freifunk-gluon/gluon/73865b6d35626d01c6056c31bf028ebc0aacd071/package/gluon-mesh-vpn-wireguard/files/lib/gluon/mesh-vpn/provider/wireguard -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-wireguard/files/lib/gluon/mesh-vpn/wireguard_pubkey.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck disable=SC1091,SC2034 4 | 5 | INCLUDE_ONLY=1 6 | . /lib/netifd/proto/wireguard.sh 7 | 8 | ensure_key_is_generated wg_mesh 9 | uci get "network.wg_mesh.private_key" | /usr/bin/wg pubkey 10 | -------------------------------------------------------------------------------- /package/gluon-mesh-vpn-wireguard/src/Makefile: -------------------------------------------------------------------------------- 1 | all: respondd.so gluon-hex-to-b64 2 | 3 | CFLAGS += -Wall -Werror-implicit-function-declaration 4 | 5 | gluon-hex-to-b64: gluon-hex-to-b64.c 6 | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -Wall -o $@ $^ $(LDLIBS) -lubox 7 | 8 | respondd.so: respondd.c 9 | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -D_GNU_SOURCE -o $@ $^ $(LDLIBS) -lgluonutil -lubus 10 | -------------------------------------------------------------------------------- /package/gluon-mesh-wireless-sae/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-mesh-wireless-sae 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-mesh-wireless-sae 8 | TITLE:=Encryption of 802.11s Mesh Links through SAE 9 | DEPENDS:=+gluon-core +wpa-supplicant-mesh-mbedtls 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-mesh-wireless-sae)) 13 | -------------------------------------------------------------------------------- /package/gluon-mesh-wireless-sae/check_site.lua: -------------------------------------------------------------------------------- 1 | need_boolean({'wifi', 'mesh', 'sae'}, false) 2 | need_string({'wifi', 'mesh', 'sae_passphrase'}, false) 3 | -------------------------------------------------------------------------------- /package/gluon-mesh-wireless-sae/luasrc/lib/gluon/upgrade/205-wireless-mesh-sae: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local site = require 'gluon.site' 4 | local wireless = require 'gluon.wireless' 5 | local hash = require 'hash' 6 | local uci = require('simple-uci').cursor() 7 | 8 | 9 | local function configure_sae(vif) 10 | uci:set('wireless', vif, 'encryption', 'sae') 11 | uci:set('wireless', vif, 'key', site.wifi.mesh.sae_passphrase() or hash.md5(site.prefix6())) 12 | end 13 | 14 | wireless.foreach_radio(uci, function(radio) 15 | local radio_name = radio['.name'] 16 | local vif = 'mesh_' .. radio_name 17 | local enable = site.wifi.mesh.sae(false) 18 | 19 | if uci:get('wireless', vif) then 20 | uci:delete('wireless', vif, 'encryption') 21 | uci:delete('wireless', vif, 'key') 22 | 23 | if enable then 24 | configure_sae(vif) 25 | end 26 | end 27 | end) 28 | 29 | uci:save('wireless') 30 | -------------------------------------------------------------------------------- /package/gluon-mmfd/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-mmfd 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-mmfd 8 | TITLE:=Mesh multicast forwarding daemon - Gluon integration 9 | DEPENDS:=+mmfd +uc +gluon-core 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-mmfd)) 13 | -------------------------------------------------------------------------------- /package/gluon-mmfd/luasrc/lib/gluon/upgrade/430-gluon-mmfd-interface: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | 5 | uci:section('network', 'interface', 'mmfd', { 6 | proto = 'static', 7 | ifname = 'mmfd0', 8 | ip6addr = 'fe80::1/64' 9 | }) 10 | 11 | uci:save('network') 12 | -------------------------------------------------------------------------------- /package/gluon-neighbour-info/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-neighbour-info 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-neighbour-info 8 | TITLE:=neighbour-info 9 | DEPENDS:= 10 | endef 11 | 12 | define Package/gluon-neighbour-info/description 13 | Gluon community wifi mesh firmware framework: neighbour-info 14 | endef 15 | 16 | define Package/gluon-neighbour-info/install 17 | $(Gluon/Build/Install) 18 | 19 | $(INSTALL_DIR) $(1)/usr/bin 20 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/gluon-neighbour-info $(1)/usr/bin/ 21 | endef 22 | 23 | $(eval $(call BuildPackageGluon,gluon-neighbour-info)) 24 | -------------------------------------------------------------------------------- /package/gluon-neighbour-info/luasrc/lib/gluon/upgrade/400-neighbour-info-firewall: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | 5 | -- Allow incoming respondd replies to queries on WAN 6 | -- If the query was via multicast, the response isn't matched by --state RELATED 7 | uci:section('firewall', 'rule', 'wan_respondd_reply', { 8 | name = 'wan_respondd_reply', 9 | src = 'wan', 10 | src_ip = 'fe80::/64', 11 | src_port = '1001', 12 | dest_port = '32768:61000', -- see /proc/sys/net/ipv4/ip_local_port_range 13 | proto = 'udp', 14 | target = 'ACCEPT', 15 | }) 16 | 17 | uci:section('firewall', 'rule', 'mesh_respondd_reply', { 18 | name = 'mesh_respondd_reply', 19 | src = 'mesh', 20 | src_ip = 'fe80::/64', 21 | src_port = '1001', 22 | dest_port = '32768:61000', -- see /proc/sys/net/ipv4/ip_local_port_range 23 | proto = 'udp', 24 | target = 'ACCEPT', 25 | }) 26 | 27 | uci:save('firewall') 28 | -------------------------------------------------------------------------------- /package/gluon-neighbour-info/src/Makefile: -------------------------------------------------------------------------------- 1 | all: gluon-neighbour-info 2 | 3 | gluon-neighbour-info: gluon-neighbour-info.c 4 | 5 | clean: 6 | rm gluon-neighbour-info 7 | -------------------------------------------------------------------------------- /package/gluon-node-info/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-node-info 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-node-info 8 | TITLE:=Add /etc/config/gluon-node-info to uci 9 | DEPENDS:=+gluon-core +libgluonutil 10 | endef 11 | 12 | define Package/gluon-node-info/conffiles 13 | /etc/config/gluon-node-info 14 | endef 15 | 16 | $(eval $(call BuildPackageGluon,gluon-node-info)) 17 | -------------------------------------------------------------------------------- /package/gluon-node-info/check_site.lua: -------------------------------------------------------------------------------- 1 | need_string(in_site({'roles', 'default'}), false) 2 | -------------------------------------------------------------------------------- /package/gluon-node-info/files/etc/config/gluon-node-info: -------------------------------------------------------------------------------- 1 | config location 2 | option share_location '0' 3 | 4 | config owner 5 | 6 | config system 7 | -------------------------------------------------------------------------------- /package/gluon-node-info/luasrc/lib/gluon/upgrade/500-node-info-system: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | 5 | local config = 'gluon-node-info' 6 | 7 | if not uci:get_first(config, 'system') then 8 | uci:section(config, 'system') 9 | uci:save(config) 10 | end 11 | -------------------------------------------------------------------------------- /package/gluon-node-info/luasrc/lib/gluon/upgrade/510-node-info-role: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local site = require 'gluon.site' 4 | local uci = require('simple-uci').cursor() 5 | 6 | local config = 'gluon-node-info' 7 | local role = uci:get(config, uci:get_first(config, 'system'), 'role') 8 | 9 | if not role then 10 | uci:set(config, uci:get_first(config, 'system'), 'role', site.roles.default('')) 11 | uci:save(config) 12 | end 13 | -------------------------------------------------------------------------------- /package/gluon-node-info/src/Makefile: -------------------------------------------------------------------------------- 1 | all: respondd.so 2 | 3 | CFLAGS += -Wall 4 | 5 | respondd.so: respondd.c 6 | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -D_GNU_SOURCE -o $@ $^ $(LDLIBS) -lgluonutil -luci 7 | -------------------------------------------------------------------------------- /package/gluon-private-wifi/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-private-wifi 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-private-wifi 8 | TITLE:=Provides a virtual access point for the nodes WAN network 9 | DEPENDS:=+gluon-core 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-private-wifi)) 13 | -------------------------------------------------------------------------------- /package/gluon-private-wifi/luasrc/lib/gluon/upgrade/325-gluon-private-wifi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require("simple-uci").cursor() 4 | local wireless = require 'gluon.wireless' 5 | 6 | wireless.foreach_radio(uci, function(radio) 7 | local radio_name = radio['.name'] 8 | local suffix = radio_name:match('^radio(%d+)$') 9 | local name = "wan_" .. radio_name 10 | 11 | if not uci:get('wireless', name, 'device') then 12 | return 13 | end 14 | 15 | uci:set('wireless', name, 'ifname', suffix and 'wl-wan' .. suffix) 16 | 17 | -- migrate encryption from Gluon v2023.2.x or older 18 | -- remove in 2027 or on first release supporting only upgrades from >=v2025.1.x 19 | local encryption = uci:get('wireless', name, 'encryption') 20 | uci:set('wireless', name, 'encryption', encryption:gsub("psk3", "sae")) 21 | end) 22 | 23 | uci:save('wireless') 24 | -------------------------------------------------------------------------------- /package/gluon-radv-filterd/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-radv-filterd 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-radv-filterd 8 | TITLE:=Filter IPv6 router advertisements 9 | DEPENDS:=+gluon-ebtables +libgluonutil +libbatadv +libnl-tiny 10 | endef 11 | 12 | MAKE_VARS += \ 13 | LIBNL_NAME="libnl-tiny" \ 14 | LIBNL_GENL_NAME="libnl-tiny" 15 | 16 | define Package/gluon-radv-filterd/install 17 | $(Gluon/Build/Install) 18 | 19 | $(INSTALL_DIR) $(1)/usr/sbin/ 20 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/gluon-radv-filterd $(1)/usr/sbin/ 21 | endef 22 | 23 | $(eval $(call BuildPackageGluon,gluon-radv-filterd)) 24 | -------------------------------------------------------------------------------- /package/gluon-radv-filterd/check_site.lua: -------------------------------------------------------------------------------- 1 | need_number({'radv_filterd', 'threshold'}, false) 2 | -------------------------------------------------------------------------------- /package/gluon-radv-filterd/files/etc/init.d/gluon-radv-filterd: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | USE_PROCD=1 4 | START=50 5 | DAEMON=/usr/sbin/gluon-radv-filterd 6 | 7 | start_service() { 8 | local threshold 9 | threshold="$(lua -e 'print(require("gluon.site").radv_filterd.threshold(20))')" 10 | 11 | procd_open_instance 12 | procd_set_param command "$DAEMON" -i br-client -c RADV_FILTER -t "$threshold" 13 | procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}" 14 | procd_set_param netdev br-client 15 | procd_set_param stderr 1 16 | procd_close_instance 17 | } 18 | 19 | service_triggers() { 20 | procd_open_trigger 21 | procd_add_raw_trigger "interface.*" 1000 /etc/init.d/gluon-radv-filterd reload 22 | procd_close_trigger 23 | } 24 | -------------------------------------------------------------------------------- /package/gluon-radv-filterd/files/lib/gluon/reload.d/350-gluon-radv-filterd-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-radv-filterd stop 3 | -------------------------------------------------------------------------------- /package/gluon-radv-filterd/files/lib/gluon/reload.d/750-gluon-radv-filterd-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-radv-filterd start 3 | -------------------------------------------------------------------------------- /package/gluon-radv-filterd/luasrc/lib/gluon/ebtables/400-radv-filterd: -------------------------------------------------------------------------------- 1 | chain('RADV_FILTER', 'DROP') 2 | rule 'FORWARD -p IPv6 -i bat0 --ip6-protocol ipv6-icmp --ip6-icmp-type router-advertisement -j RADV_FILTER' 3 | rule 'RADV_FILTER -j ACCEPT' 4 | -------------------------------------------------------------------------------- /package/gluon-radv-filterd/src/mac.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #define F_MAC "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx" 8 | #define F_MAC_LEN 17 9 | #define F_MAC_VAR(var) \ 10 | (var).ether_addr_octet[0], (var).ether_addr_octet[1], \ 11 | (var).ether_addr_octet[2], (var).ether_addr_octet[3], \ 12 | (var).ether_addr_octet[4], (var).ether_addr_octet[5] 13 | #define F_MAC_VAR_REF(var) \ 14 | &(var).ether_addr_octet[0], &(var).ether_addr_octet[1], \ 15 | &(var).ether_addr_octet[2], &(var).ether_addr_octet[3], \ 16 | &(var).ether_addr_octet[4], &(var).ether_addr_octet[5] 17 | #define MAC2ETHER(_ether, _mac) memcpy((_ether).ether_addr_octet, \ 18 | (_mac), ETH_ALEN) 19 | 20 | #define ether_addr_equal(_a, _b) (memcmp((_a).ether_addr_octet, \ 21 | (_b).ether_addr_octet, ETH_ALEN) == 0) 22 | -------------------------------------------------------------------------------- /package/gluon-radvd/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-radvd 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-radvd 8 | TITLE:=Advertise an IPv6 prefix from the node 9 | DEPENDS:=+gluon-core +uradvd 10 | endef 11 | 12 | define Package/gluon-radvd/description 13 | Gluon community wifi mesh firmware framework: Advertise an IPv6 prefix from the node 14 | endef 15 | 16 | $(eval $(call BuildPackageGluon,gluon-radvd)) 17 | -------------------------------------------------------------------------------- /package/gluon-radvd/files/etc/init.d/gluon-radvd: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | USE_PROCD=1 4 | START=50 5 | 6 | start_service() { 7 | [ -x /lib/gluon/radvd/arguments ] || return 1 8 | 9 | procd_open_instance 10 | # shellcheck disable=SC2046 11 | procd_set_param command /usr/sbin/uradvd $(/lib/gluon/radvd/arguments) 12 | procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}" 13 | procd_set_param stderr 1 14 | procd_close_instance 15 | } 16 | -------------------------------------------------------------------------------- /package/gluon-radvd/files/lib/gluon/reload.d/350-gluon-radvd-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-radvd stop 3 | -------------------------------------------------------------------------------- /package/gluon-radvd/files/lib/gluon/reload.d/750-gluon-radvd-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-radvd start 3 | -------------------------------------------------------------------------------- /package/gluon-radvd/files/usr/lib/autoupdater/abort.d/80gluon-radvd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | start_enabled gluon-radvd 7 | -------------------------------------------------------------------------------- /package/gluon-radvd/files/usr/lib/autoupdater/download.d/20gluon-radvd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | stop gluon-radvd 7 | -------------------------------------------------------------------------------- /package/gluon-respondd/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-respondd 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-respondd 8 | TITLE:=Provides node information to the network 9 | DEPENDS:=+gluon-core +libplatforminfo +libgluonutil +libuci +ubus +respondd 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-respondd)) 13 | -------------------------------------------------------------------------------- /package/gluon-respondd/files/lib/gluon/reload.d/350-gluon-respondd-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-respondd stop 3 | -------------------------------------------------------------------------------- /package/gluon-respondd/files/lib/gluon/reload.d/750-gluon-respondd-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-respondd start 3 | -------------------------------------------------------------------------------- /package/gluon-respondd/files/lib/gluon/respondd/neighbours.cache: -------------------------------------------------------------------------------- 1 | 10000 2 | -------------------------------------------------------------------------------- /package/gluon-respondd/files/lib/gluon/respondd/nodeinfo.cache: -------------------------------------------------------------------------------- 1 | 300000 2 | -------------------------------------------------------------------------------- /package/gluon-respondd/files/lib/gluon/respondd/statistics.cache: -------------------------------------------------------------------------------- 1 | 5000 2 | -------------------------------------------------------------------------------- /package/gluon-respondd/files/usr/lib/autoupdater/abort.d/50gluon-respondd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | 7 | start_enabled gluon-respondd 8 | -------------------------------------------------------------------------------- /package/gluon-respondd/files/usr/lib/autoupdater/download.d/50gluon-respondd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | stop gluon-respondd 7 | -------------------------------------------------------------------------------- /package/gluon-respondd/src/Makefile: -------------------------------------------------------------------------------- 1 | all: respondd.so 2 | 3 | CFLAGS += -Wall 4 | 5 | SOURCES = respondd.c respondd-nodeinfo.c respondd-statistics.c respondd-neighbours.c 6 | 7 | respondd.so: $(SOURCES) respondd-common.h 8 | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -fvisibility=hidden -D_GNU_SOURCE -o $@ $(SOURCES) $(LDLIBS) -lgluonutil -lplatforminfo -luci -liwinfo 9 | -------------------------------------------------------------------------------- /package/gluon-respondd/src/respondd-common.h: -------------------------------------------------------------------------------- 1 | /* SPDX-FileCopyrightText: 2016-2019, Matthias Schiffer */ 2 | /* SPDX-License-Identifier: BSD-2-Clause */ 3 | 4 | #pragma once 5 | 6 | #define MAX_INACTIVITY 60000 7 | 8 | struct json_object * respondd_provider_nodeinfo(void); 9 | struct json_object * respondd_provider_statistics(void); 10 | struct json_object * respondd_provider_neighbours(void); 11 | -------------------------------------------------------------------------------- /package/gluon-respondd/src/respondd.c: -------------------------------------------------------------------------------- 1 | /* SPDX-FileCopyrightText: 2016-2019, Matthias Schiffer */ 2 | /* SPDX-License-Identifier: BSD-2-Clause */ 3 | 4 | #include "respondd-common.h" 5 | 6 | #include 7 | 8 | 9 | __attribute__ ((visibility ("default"))) 10 | const struct respondd_provider_info respondd_providers[] = { 11 | {"nodeinfo", respondd_provider_nodeinfo}, 12 | {"statistics", respondd_provider_statistics}, 13 | {"neighbours", respondd_provider_neighbours}, 14 | {} 15 | }; 16 | -------------------------------------------------------------------------------- /package/gluon-scheduled-domain-switch/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-scheduled-domain-switch 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-scheduled-domain-switch 8 | TITLE:=Allows scheduled migrations between domains 9 | DEPENDS:=+gluon-core @GLUON_MULTIDOMAIN 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-scheduled-domain-switch)) 13 | -------------------------------------------------------------------------------- /package/gluon-scheduled-domain-switch/check_site.lua: -------------------------------------------------------------------------------- 1 | if need_table(in_domain({'domain_switch'}), nil, false) then 2 | need_domain_name(in_domain({'domain_switch', 'target_domain'})) 3 | need_number(in_domain({'domain_switch', 'switch_after_offline_mins'})) 4 | need_number(in_domain({'domain_switch', 'switch_time'})) 5 | need_string_array_match(in_domain({'domain_switch', 'connection_check_targets'}), '^[%x:]+$') 6 | end 7 | -------------------------------------------------------------------------------- /package/gluon-scheduled-domain-switch/luasrc/lib/gluon/upgrade/950-gluon-scheduled-domain-switch: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local site = require 'gluon.site' 4 | 5 | local cronfile = "/usr/lib/micron.d/gluon-scheduled-domain-switch" 6 | 7 | -- Check if domain switch is scheduled 8 | if site.domain_switch() == nil then 9 | -- In case no domain switch is scheduled, remove cronfile 10 | os.remove(cronfile) 11 | os.exit(0) 12 | end 13 | 14 | -- Only in case domain switch is scheduled 15 | local f = io.open(cronfile, "w") 16 | f:write("* * * * * /usr/bin/gluon-check-connection\n") 17 | f:write("*/5 * * * * /lib/gluon/scheduled-domain-switch/switch-domain\n") 18 | f:close() 19 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/check_site.lua: -------------------------------------------------------------------------------- 1 | need_boolean(in_site({'setup_mode', 'skip'}), false) 2 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/etc/config/gluon-setup-mode: -------------------------------------------------------------------------------- 1 | config setup_mode 2 | option enabled '0' 3 | option configured '0' 4 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | wait=3 5 | 6 | 7 | wait_setup_mode() { 8 | sleep $wait 9 | gluon-enter-setup-mode 10 | } 11 | 12 | 13 | if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || [ "$BUTTON" = phone ]; then 14 | case "$ACTION" in 15 | pressed) 16 | wait_setup_mode & 17 | PID=$! 18 | echo $PID > /tmp/.wait_setup_mode 19 | ;; 20 | released) 21 | if [ -r /tmp/.wait_setup_mode ]; then 22 | kill "$(cat /tmp/.wait_setup_mode)" 23 | rm /tmp/.wait_setup_mode 24 | fi 25 | ;; 26 | esac 27 | fi 28 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/lib/gluon/setup-mode/ash-login: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec /bin/ash --login 4 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S11bootcount: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | # shellcheck disable=SC1091 4 | 5 | if [ -x /etc/init.d/bootcount ] && /etc/init.d/bootcount enabled; then 6 | . /etc/init.d/bootcount 7 | fi 8 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S13urngd: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | # shellcheck disable=SC1091 4 | 5 | if [ -x /etc/init.d/urngd ] && /etc/init.d/urngd enabled; then 6 | . /etc/init.d/urngd 7 | fi 8 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S15gluon-setup-mode: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | START=15 4 | 5 | boot() { 6 | local enabled configured 7 | enabled="$(uci -q get 'gluon-setup-mode.@setup_mode[0].enabled')" 8 | configured="$(uci -q get 'gluon-setup-mode.@setup_mode[0].configured')" 9 | 10 | uci set 'gluon-setup-mode.@setup_mode[0].enabled=0' 11 | uci commit gluon-setup-mode 12 | 13 | if [ "$enabled" != 1 ] && [ "$configured" = 1 ]; then 14 | # This can happen after an upgrade from a version before the config file was called gluon-setup-mode 15 | # We'll just reboot to return to the normal mode... 16 | /etc/init.d/done boot 17 | reboot 18 | fi 19 | } 20 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S50dropbear: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | # shellcheck disable=SC1091 4 | 5 | USE_PROCD=1 6 | PROG=/usr/sbin/dropbear 7 | NAME=dropbear 8 | 9 | start_service() { 10 | [ -x /etc/init.d/dropbear ] || return 0 11 | 12 | . /etc/init.d/dropbear 13 | 14 | hk_generate_as_needed 15 | 16 | . /lib/functions.sh 17 | . /lib/functions/network.sh 18 | 19 | procd_open_instance 20 | procd_set_param command "$PROG" -F -f 21 | procd_set_param respawn 22 | procd_close_instance 23 | } 24 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S60dnsmasq: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | SETUP_MODE_DHCP_RANGE=192.168.1.2,192.168.1.254 4 | 5 | 6 | START=60 7 | 8 | USE_PROCD=1 9 | PROG=/usr/sbin/dnsmasq 10 | 11 | 12 | start_service() { 13 | procd_open_instance 14 | procd_set_param command $PROG -k -p 0 -F $SETUP_MODE_DHCP_RANGE -l /tmp/dhcp.leases -O option:router 15 | procd_set_param respawn 16 | procd_close_instance 17 | } 18 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/lib/gluon/setup-mode/rc.d/S96led: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | # shellcheck disable=SC1091,SC2154 4 | 5 | START=96 6 | 7 | start() { 8 | local custom_led 9 | 10 | /etc/init.d/led start 11 | 12 | . /etc/diag.sh 13 | 14 | get_status_led 2> /dev/null 15 | 16 | if [ -z "$status_led" ]; then 17 | status_led="$running" 18 | fi 19 | 20 | if [ -z "$status_led" ]; then 21 | status_led="$boot" 22 | fi 23 | 24 | custom_led="$(lua -e 'print(require("gluon.setup-mode").get_status_led() or "")')" 25 | if [ -z "$status_led" ]; then 26 | status_led="$custom_led" 27 | fi 28 | 29 | status_led_set_timer 1000 300 30 | } 31 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/lib/preinit/90_setup_mode: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | setup_mode_enable() { 5 | local enabled configured 6 | enabled="$(uci -q get 'gluon-setup-mode.@setup_mode[0].enabled')" 7 | configured="$(uci -q get 'gluon-setup-mode.@setup_mode[0].configured')" 8 | 9 | if [ "$enabled" = 1 ] || [ "$configured" != 1 ]; then 10 | echo '/lib/gluon/setup-mode/rc.d' > /tmp/rc_d_path 11 | 12 | # This directory is a marker for scripts to know that we're 13 | # in config mode, but it is also used for temporary files 14 | mkdir -p /var/gluon/setup-mode 15 | fi 16 | } 17 | 18 | boot_hook_add preinit_main setup_mode_enable 19 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/files/usr/bin/gluon-enter-setup-mode: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | echo "Entering setup mode and rebooting..." 6 | uci set gluon-setup-mode.@setup_mode[0].enabled='1' 7 | uci commit gluon-setup-mode 8 | reboot 9 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/luasrc/lib/gluon/upgrade/300-setup-mode: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local site = require 'gluon.site' 4 | local uci = require('simple-uci').cursor() 5 | 6 | 7 | if site.setup_mode.skip(false) and not uci:get_first('gluon-setup-mode', 'setup_mode', 'configured', false) then 8 | local name = uci:get_first("gluon-setup-mode", "setup_mode") 9 | uci:set("gluon-setup-mode", name, "configured", true) 10 | uci:save('gluon-setup-mode') 11 | end 12 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/luasrc/lib/gluon/upgrade/320-setup-ifname: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local platform = require 'gluon.platform' 4 | local sysconfig = require 'gluon.sysconfig' 5 | 6 | if platform.is_outdoor_device() or 7 | platform.match('ath79', 'generic', { 8 | 'ubnt,unifi-ap-pro', 9 | 'ubnt,unifiac-pro', 10 | }) 11 | then 12 | sysconfig.setup_ifname = sysconfig.single_ifname or sysconfig.wan_ifname 13 | else 14 | sysconfig.setup_ifname = sysconfig.single_ifname or sysconfig.lan_ifname 15 | end 16 | -------------------------------------------------------------------------------- /package/gluon-setup-mode/luasrc/usr/lib/lua/gluon/setup-mode.lua: -------------------------------------------------------------------------------- 1 | local platform = require 'gluon.platform' 2 | 3 | 4 | local M = {} 5 | 6 | function M.get_status_led() 7 | if platform.match('ath79', 'nand', { 8 | 'glinet,gl-xe300', 9 | }) then 10 | return "green:wlan" 11 | end 12 | end 13 | 14 | return M 15 | -------------------------------------------------------------------------------- /package/gluon-state-check/files/lib/gluon/state/check.d/has_default_gw6: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | out=$(ip -6 route show default dev br-client 2>/dev/null) && [ -n "$out" ] 3 | -------------------------------------------------------------------------------- /package/gluon-state-check/files/usr/lib/micron.d/gluon-state-check: -------------------------------------------------------------------------------- 1 | * * * * * /usr/sbin/gluon-state-check 2 | -------------------------------------------------------------------------------- /package/gluon-status-page-mesh-batman-adv/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-status-page-mesh-batman-adv 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-status-page-mesh-batman-adv 8 | TITLE:=Batman-data provider for gluon-status-page 9 | DEPENDS:=+gluon-status-page gluon-mesh-batman-adv +libnl-tiny +libbatadv +libjson-c 10 | endef 11 | 12 | define Package/gluon-status-page-mesh-batman-adv/install 13 | $(Gluon/Build/Install) 14 | 15 | $(INSTALL_DIR) $(1)/lib/gluon/status-page/providers 16 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/neighbours-batadv $(1)/lib/gluon/status-page/providers/ 17 | endef 18 | 19 | $(eval $(call BuildPackageGluon,gluon-status-page-mesh-batman-adv)) 20 | -------------------------------------------------------------------------------- /package/gluon-status-page-mesh-batman-adv/files/lib/gluon/status-page/www/cgi-bin/dyn/neighbours-batadv: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CMD='exec /lib/gluon/status-page/providers/neighbours-batadv' 4 | 5 | exec /usr/sbin/sse-multiplex "$CMD" 6 | -------------------------------------------------------------------------------- /package/gluon-status-page-mesh-batman-adv/luasrc/lib/gluon/status-page/mesh.lua: -------------------------------------------------------------------------------- 1 | return { 2 | provider = '/cgi-bin/dyn/neighbours-batadv', 3 | -- List of mesh-specific attributes, each a tuple of 4 | -- 1) the internal identifier (JSON key) 5 | -- 2) human-readable key (not translatable yet) 6 | -- 3) value suffix (optional) 7 | attrs = { 8 | {'tq', 'TQ', ' %'}, 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /package/gluon-status-page/files/lib/gluon/status-page/view/layout.html: -------------------------------------------------------------------------------- 1 | <%- 2 | http:prepare_content("text/html") 3 | -%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | <%:Error%> 12 | 13 | 14 | 15 | 16 |
17 |

<%:Error%>

18 |
19 |
20 |
21 | <% renderer.render(content, scope, pkg) %> 22 |
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /package/gluon-status-page/files/lib/gluon/status-page/www/cgi-bin/dyn/neighbours-nodeinfo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | badrequest() { 4 | echo 'Status: 400 Bad Request' 5 | echo 6 | exit 1 7 | } 8 | 9 | ( gluon-list-mesh-interfaces | grep -qxF "$QUERY_STRING" ) 2>/dev/null || badrequest 10 | 11 | exec gluon-neighbour-info -s neighbour -i "$QUERY_STRING" -d ff02::2:1001 -p 1001 -r nodeinfo 12 | -------------------------------------------------------------------------------- /package/gluon-status-page/files/lib/gluon/status-page/www/cgi-bin/dyn/stations: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | badrequest() { 4 | echo 'Status: 400 Bad Request' 5 | echo 6 | exit 1 7 | } 8 | 9 | ( gluon-list-mesh-interfaces | grep -qxF "$QUERY_STRING" ) 2>/dev/null || badrequest 10 | 11 | CMD="exec /lib/gluon/status-page/providers/stations '$QUERY_STRING'" 12 | 13 | exec sse-multiplex "$CMD" 14 | -------------------------------------------------------------------------------- /package/gluon-status-page/files/lib/gluon/status-page/www/cgi-bin/dyn/statistics: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CMD='exec gluon-neighbour-info -s "" -l -d ::1 -p 1001 -t 3 -r statistics' 4 | 5 | exec /usr/sbin/sse-multiplex "$CMD" 6 | -------------------------------------------------------------------------------- /package/gluon-status-page/files/lib/gluon/status-page/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /package/gluon-status-page/files/lib/gluon/status-page/www/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /package/gluon-status-page/files/usr/lib/autoupdater/abort.d/70gluon-status-page: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | 7 | start_enabled sse-multiplexd 8 | start_enabled uhttpd 9 | -------------------------------------------------------------------------------- /package/gluon-status-page/files/usr/lib/autoupdater/download.d/30gluon-status-page: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh 4 | . /lib/gluon/autoupdater/lib.sh 5 | 6 | 7 | stop uhttpd 8 | stop sse-multiplexd 9 | -------------------------------------------------------------------------------- /package/gluon-status-page/i18n/fr.README: -------------------------------------------------------------------------------- 1 | Draft for french translation, taken from gluon-config-mode-mesh-vpn 2 | 3 | msgid "" 4 | msgstr "" 5 | 6 | msgid "downstream" 7 | msgstr "débit déscendant" 8 | 9 | msgid "upstream" 10 | msgstr "débit ascendant" 11 | -------------------------------------------------------------------------------- /package/gluon-status-page/luasrc/lib/gluon/status-page/www/cgi-bin/status: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | require 'gluon.web.cgi' { 4 | base_path = '/lib/gluon/status-page', 5 | 6 | layout_package = 'gluon-status-page', 7 | layout_template = 'layout', -- only used for error pages 8 | } 9 | -------------------------------------------------------------------------------- /package/gluon-status-page/luasrc/lib/gluon/upgrade/500-status-page: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local uci = require('simple-uci').cursor() 4 | local util = require 'gluon.util' 5 | 6 | 7 | local max_requests = 32 8 | if util.get_mem_total() < 48*1024 then 9 | max_requests = 16 10 | end 11 | 12 | uci:section('uhttpd', 'uhttpd', 'main', { 13 | listen_http = { '0.0.0.0:80', '[::]:80' }, 14 | listen_https = {}, 15 | 16 | home = '/lib/gluon/status-page/www', 17 | max_requests = max_requests, 18 | }) 19 | uci:save('uhttpd') 20 | 21 | 22 | for _, zone in ipairs({'mesh', 'loc_client'}) do 23 | uci:section('firewall', 'rule', zone .. '_http', { 24 | src = zone, 25 | dest_port = '80', 26 | proto = 'tcp', 27 | target = 'ACCEPT', 28 | }) 29 | end 30 | 31 | uci:save('firewall') 32 | -------------------------------------------------------------------------------- /package/gluon-tls/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-tls 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-tls 8 | DEPENDS:=+libustream-mbedtls +ca-bundle 9 | TITLE:=Enable TLS support 10 | endef 11 | 12 | define Package/gluon-tls/install 13 | $(INSTALL_DIR) $(1)/lib/gluon/features 14 | touch $(1)/lib/gluon/features/tls 15 | endef 16 | 17 | $(eval $(call BuildPackageGluon,gluon-tls)) 18 | -------------------------------------------------------------------------------- /package/gluon-wan-dnsmasq/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-wan-dnsmasq 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-wan-dnsmasq 8 | TITLE:=Support for a secondary DNS server using the WAN interface 9 | DEPENDS:=+gluon-core +libubus-lua +dnsmasq-full +libpacketmark 10 | endef 11 | 12 | define Package/gluon-wan-dnsmasq/description 13 | Gluon community wifi mesh firmware framework: Support for a secondary DNS server using the WAN interface 14 | endef 15 | 16 | define Package/gluon-wan-dnsmasq/conffiles 17 | /etc/config/gluon-wan-dnsmasq 18 | endef 19 | 20 | $(eval $(call BuildPackageGluon,gluon-wan-dnsmasq)) 21 | -------------------------------------------------------------------------------- /package/gluon-wan-dnsmasq/files/etc/config/gluon-wan-dnsmasq: -------------------------------------------------------------------------------- 1 | config 'static' 2 | # list 'server' '192.168.0.1' # Example 3 | -------------------------------------------------------------------------------- /package/gluon-wan-dnsmasq/files/etc/hotplug.d/iface/50-gluon-wan-dnsmasq: -------------------------------------------------------------------------------- 1 | if [ "$INTERFACE" = 'wan' -o "$INTERFACE" = 'wan6' -o "$INTERFACE" = 'cellular_4' -o "$INTERFACE" = 'cellular_6' ]; then 2 | /lib/gluon/wan-dnsmasq/update.lua 3 | fi 4 | -------------------------------------------------------------------------------- /package/gluon-wan-dnsmasq/files/lib/gluon/reload.d/340-gluon-wan-dnsmasq-stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-wan-dnsmasq stop 3 | -------------------------------------------------------------------------------- /package/gluon-wan-dnsmasq/files/lib/gluon/reload.d/760-gluon-wan-dnsmasq-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/gluon-wan-dnsmasq start 3 | -------------------------------------------------------------------------------- /package/gluon-wan-dnsmasq/files/lib/gluon/wan-dnsmasq/interface.d/050-gluon-wan-dnsmasq: -------------------------------------------------------------------------------- 1 | wan6 2 | wan 3 | cellular_4 4 | cellular_6 5 | -------------------------------------------------------------------------------- /package/gluon-web-admin/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Nils Schneider 2 | # This is free software, licensed under the Apache 2.0 license. 3 | 4 | include $(TOPDIR)/rules.mk 5 | 6 | PKG_NAME:=gluon-web-admin 7 | 8 | include ../gluon.mk 9 | 10 | define Package/gluon-web-admin 11 | TITLE:=Web-based simple administration interface for mesh nodes 12 | DEPENDS:=+gluon-config-mode-core +pretty-hostname 13 | endef 14 | 15 | $(eval $(call BuildPackageGluon,gluon-web-admin)) 16 | -------------------------------------------------------------------------------- /package/gluon-web-admin/check_site.lua: -------------------------------------------------------------------------------- 1 | need_boolean(in_site({'config_mode', 'remote_login', 'show_password_form'}), false) 2 | need_number(in_site({'config_mode', 'remote_login', 'min_password_length'}), false) 3 | -------------------------------------------------------------------------------- /package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/info.html: -------------------------------------------------------------------------------- 1 | <%- 2 | local info = require 'gluon.info' 3 | 4 | local values = info.get_info_pretty(i18n) 5 | -%> 6 |

<%:Information%>

7 | <% for _, v in ipairs(values) do %> 8 |
9 |
<%|v[1]%>
<%|v[2] or 'n/a'%>
10 |
11 | <% end %> 12 | -------------------------------------------------------------------------------- /package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade_reboot.html: -------------------------------------------------------------------------------- 1 |

2 | <%:The firmware is currently being upgraded.%> 3 | <%:Don't switch off the device in any circumstance!%> 4 | <%:The upgrade will take a few minutes. When it is finished, your node will reboot automatically.%> 5 |

6 | -------------------------------------------------------------------------------- /package/gluon-web-admin/luasrc/lib/gluon/config-mode/controller/admin/index.lua: -------------------------------------------------------------------------------- 1 | package 'gluon-web-admin' 2 | 3 | 4 | local root = node() 5 | if not root.target then 6 | root.target = alias("admin") 7 | end 8 | 9 | entry({"admin"}, alias("admin", "info"), _("Advanced settings"), 10) 10 | 11 | entry({"admin", "info"}, template("admin/info"), _("Information"), 1) 12 | entry({"admin", "remote"}, model("admin/remote"), _("Remote access"), 10) 13 | -------------------------------------------------------------------------------- /package/gluon-web-autoupdater/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Nils Schneider 2 | # This is free software, licensed under the Apache 2.0 license. 3 | 4 | include $(TOPDIR)/rules.mk 5 | 6 | PKG_NAME:=gluon-web-autoupdater 7 | 8 | include ../gluon.mk 9 | 10 | define Package/gluon-web-autoupdater 11 | TITLE:=gluon-web module for gluon-autoupdater 12 | DEPENDS:=+gluon-web-admin +gluon-autoupdater 13 | endef 14 | 15 | $(eval $(call BuildPackageGluon,gluon-web-autoupdater)) 16 | -------------------------------------------------------------------------------- /package/gluon-web-autoupdater/i18n/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2015-05-04 01:55+0200\n" 5 | "Last-Translator: \n" 6 | "Language-Team: German\n" 7 | "Language: de\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "Automatic updates" 14 | msgstr "Automatische Updates" 15 | 16 | msgid "Branch" 17 | msgstr "Branch" 18 | 19 | msgid "Enable" 20 | msgstr "Aktivieren" 21 | -------------------------------------------------------------------------------- /package/gluon-web-autoupdater/i18n/fr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2015-08-19 20:20+0100\n" 5 | "Last-Translator: Bernot Tobias \n" 6 | "Language-Team: French\n" 7 | "Language: fr\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "Automatic updates" 14 | msgstr "Mise a jour automatique" 15 | 16 | msgid "Branch" 17 | msgstr "Branche" 18 | 19 | msgid "Enable" 20 | msgstr "Activer" 21 | -------------------------------------------------------------------------------- /package/gluon-web-autoupdater/i18n/gluon-web-autoupdater.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Automatic updates" 5 | msgstr "" 6 | 7 | msgid "Branch" 8 | msgstr "" 9 | 10 | msgid "Enable" 11 | msgstr "" 12 | -------------------------------------------------------------------------------- /package/gluon-web-autoupdater/luasrc/lib/gluon/config-mode/controller/admin/autoupdater.lua: -------------------------------------------------------------------------------- 1 | package 'gluon-web-autoupdater' 2 | 3 | entry({"admin", "autoupdater"}, model("admin/autoupdater"), _("Automatic updates"), 80) 4 | -------------------------------------------------------------------------------- /package/gluon-web-cellular/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-web-cellular 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-web-cellular 8 | DEPENDS:=+gluon-web-admin 9 | TITLE:=UI for activating cellular WAN 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-web-cellular)) 13 | -------------------------------------------------------------------------------- /package/gluon-web-cellular/i18n/gluon-web-cellular.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "APN" 5 | msgstr "" 6 | 7 | msgid "Cellular" 8 | msgstr "" 9 | 10 | msgid "Enabled" 11 | msgstr "" 12 | 13 | msgid "IPv4" 14 | msgstr "" 15 | 16 | msgid "IPv4/IPv6" 17 | msgstr "" 18 | 19 | msgid "IPv6" 20 | msgstr "" 21 | 22 | msgid "Password" 23 | msgstr "" 24 | 25 | msgid "SIM PIN" 26 | msgstr "" 27 | 28 | msgid "Type" 29 | msgstr "" 30 | 31 | msgid "Username" 32 | msgstr "" 33 | 34 | msgid "" 35 | "You can enable uplink via cellular service. If you decide so, the VPN " 36 | "connection is established using the integrated WWAN modem." 37 | msgstr "" 38 | 39 | msgid "Authentication" 40 | msgstr "" 41 | 42 | msgid "None" 43 | msgstr "" 44 | 45 | msgid "PAP" 46 | msgstr "" 47 | 48 | msgid "CHAP" 49 | msgstr "" 50 | 51 | msgid "Both" 52 | msgstr "" 53 | -------------------------------------------------------------------------------- /package/gluon-web-cellular/luasrc/lib/gluon/config-mode/controller/admin/cellular.lua: -------------------------------------------------------------------------------- 1 | local platform = require 'gluon.platform' 2 | 3 | package 'gluon-web-cellular' 4 | 5 | if platform.is_cellular_device() then 6 | entry({"admin", "cellular"}, model("admin/cellular"), _("Cellular"), 30) 7 | end 8 | -------------------------------------------------------------------------------- /package/gluon-web-logging/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-web-logging 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-web-logging 8 | DEPENDS:=+gluon-web-admin 9 | TITLE:=UI for remote syslog configuration 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-web-logging)) 13 | -------------------------------------------------------------------------------- /package/gluon-web-logging/i18n/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8\n" 3 | 4 | msgid "Enable" 5 | msgstr "" 6 | 7 | msgid "IP" 8 | msgstr "" 9 | 10 | msgid "" 11 | "If you want to use a remote syslog server, you can set it up here. Please " 12 | "keep in mind that the data is not encrypted, which may cause individual-" 13 | "related data to be transmitted unencrypted over the internet." 14 | msgstr "" 15 | "Wenn du einen Remote-Syslog-Server nutzen möchtest, dann kannst du ihn hier " 16 | "eintragen. Bitte beachte, dass diese Daten nicht verschlüsselt werden. Dies " 17 | "kann dazu führen, dass personenbezogene Daten unverschlüsselt über das " 18 | "Internet übertragen werden." 19 | 20 | msgid "Logging" 21 | msgstr "Logging" 22 | 23 | msgid "Port" 24 | msgstr "" 25 | -------------------------------------------------------------------------------- /package/gluon-web-logging/i18n/gluon-web-logging.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Enable" 5 | msgstr "" 6 | 7 | msgid "IP" 8 | msgstr "" 9 | 10 | msgid "" 11 | "If you want to use a remote syslog server, you can set it up here. Please " 12 | "keep in mind that the data is not encrypted, which may cause individual-" 13 | "related data to be transmitted unencrypted over the internet." 14 | msgstr "" 15 | 16 | msgid "Logging" 17 | msgstr "" 18 | 19 | msgid "Port" 20 | msgstr "" 21 | -------------------------------------------------------------------------------- /package/gluon-web-logging/luasrc/lib/gluon/config-mode/controller/admin/logging.lua: -------------------------------------------------------------------------------- 1 | package 'gluon-web-logging' 2 | 3 | entry({"admin", "logging"}, model("admin/logging"), _("Logging"), 85) 4 | -------------------------------------------------------------------------------- /package/gluon-web-mesh-vpn-fastd/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-web-mesh-vpn-fastd 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-web-mesh-vpn-fastd 8 | TITLE:=gluon-web module to enable and disable encryption for the mesh VPN 9 | DEPENDS:=+gluon-web-admin +gluon-mesh-vpn-fastd 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-web-mesh-vpn-fastd)) 13 | -------------------------------------------------------------------------------- /package/gluon-web-mesh-vpn-fastd/check_site.lua: -------------------------------------------------------------------------------- 1 | need_value(in_site({'mesh_vpn', 'fastd', 'configurable'}), true) 2 | -------------------------------------------------------------------------------- /package/gluon-web-mesh-vpn-fastd/i18n/gluon-web-mesh-vpn-fastd.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "" 5 | "In performance mode, no encryption is used. This usually allows for higher " 6 | "throughput, but the data exchanged over your node is not protected against " 7 | "eavesdropping." 8 | msgstr "" 9 | 10 | msgid "" 11 | "In security mode, the mesh VPN uses an encrypted tunnel to connect to the " 12 | "VPN servers. The encryption ensures that it is impossible for your internet " 13 | "access provider to see what data is exchanged over your node." 14 | msgstr "" 15 | 16 | msgid "Mesh VPN" 17 | msgstr "" 18 | 19 | msgid "Performance mode" 20 | msgstr "" 21 | 22 | msgid "Security mode" 23 | msgstr "" 24 | -------------------------------------------------------------------------------- /package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/config-mode/controller/admin/mesh_vpn_fastd.lua: -------------------------------------------------------------------------------- 1 | package 'gluon-web-mesh-vpn-fastd' 2 | 3 | entry({"admin", "mesh_vpn_fastd"}, model("admin/mesh_vpn_fastd"), _("Mesh VPN"), 50) 4 | -------------------------------------------------------------------------------- /package/gluon-web-model/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-web-model 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-web-model 8 | TITLE:=Minimal Lua web framework derived from LuCI (model support) 9 | DEPENDS:=+gluon-web 10 | endef 11 | 12 | PKG_CONFIG_DEPENDS += CONFIG_GLUON_MINIFY 13 | 14 | define Package/gluon-web-model/install 15 | $(Gluon/Build/Install) 16 | $(INSTALL_DIR) $(1)/lib/gluon/web/www/static/ 17 | 18 | ifdef CONFIG_GLUON_MINIFY 19 | $(INSTALL_DATA) ./javascript/gluon-web-model.min.js $(1)/lib/gluon/web/www/static/gluon-web-model.js 20 | else 21 | $(INSTALL_DATA) ./javascript/gluon-web-model.js $(1)/lib/gluon/web/www/static/ 22 | endif 23 | endef 24 | 25 | $(eval $(call BuildPackageGluon,gluon-web-model)) 26 | -------------------------------------------------------------------------------- /package/gluon-web-model/files/lib/gluon/web/view/model/dynlist.html: -------------------------------------------------------------------------------- 1 | > 10 | <% 11 | for i, val in ipairs(self:cfgvalue()) do 12 | %> 13 | >
19 | <% end %> 20 | 21 | -------------------------------------------------------------------------------- /package/gluon-web-model/files/lib/gluon/web/view/model/fvalue.html: -------------------------------------------------------------------------------- 1 | > 5 | > 6 | -------------------------------------------------------------------------------- /package/gluon-web-model/files/lib/gluon/web/view/model/section.html: -------------------------------------------------------------------------------- 1 |
> 2 | <% if self.title and #self.title > 0 then -%> 3 | <%|self.title%> 4 | <%- end %> 5 | <% if self.description and #self.description > 0 then -%> 6 |
<%=self.description%>
7 | <%- end %> 8 |
9 | <% self:render_children(renderer, scope) %> 10 |
11 |
12 | -------------------------------------------------------------------------------- /package/gluon-web-model/files/lib/gluon/web/view/model/tvalue.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /package/gluon-web-model/files/lib/gluon/web/view/model/value.html: -------------------------------------------------------------------------------- 1 | > 12 | -------------------------------------------------------------------------------- /package/gluon-web-model/files/lib/gluon/web/view/model/valuewrapper.html: -------------------------------------------------------------------------------- 1 |
> 2 | <%- if self.title and #self.title > 0 then -%> 3 | 6 |
7 | <%- end -%> 8 | <% if self.subtemplate then include(self.subtemplate) end %> 9 | <% if self.description and #self.description > 0 then -%> 10 |
11 |
12 | <%=self.description%> 13 |
14 | <%- end %> 15 | <%- if self.title and #self.title > 0 then -%> 16 |
17 | <%- end -%> 18 |
19 | -------------------------------------------------------------------------------- /package/gluon-web-model/files/lib/gluon/web/view/model/warning.html: -------------------------------------------------------------------------------- 1 | <%- if not self.hide then -%> 2 |
> 7 | <%- if self.content then -%> 8 | <%= self.content %> 9 | <%- else -%> 10 | <%= self.title %>
11 | <%= self.description %> 12 | <%- end -%> 13 |
14 | <%- end -%> 15 | -------------------------------------------------------------------------------- /package/gluon-web-model/files/lib/gluon/web/view/model/wrapper.html: -------------------------------------------------------------------------------- 1 | <% 2 | for _, map in ipairs(maps) do 3 | map:render(renderer) 4 | end 5 | %> 6 | 7 | -------------------------------------------------------------------------------- /package/gluon-web-model/i18n/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2013-03-29 12:13+0200\n" 5 | "Last-Translator: Matthias Schiffer \n" 6 | "Language-Team: German\n" 7 | "Language: de\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "Reset" 14 | msgstr "Zurücksetzen" 15 | 16 | msgid "Save" 17 | msgstr "Speichern" 18 | -------------------------------------------------------------------------------- /package/gluon-web-model/i18n/fr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2013-12-22 17:11+0200\n" 5 | "Last-Translator: goofy \n" 6 | "Language-Team: French\n" 7 | "Language: fr\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 12 | 13 | msgid "Reset" 14 | msgstr "Remise à zéro" 15 | 16 | msgid "Save" 17 | msgstr "Soumettre" 18 | -------------------------------------------------------------------------------- /package/gluon-web-model/i18n/gluon-web-model.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Reset" 5 | msgstr "" 6 | 7 | msgid "Save" 8 | msgstr "" 9 | -------------------------------------------------------------------------------- /package/gluon-web-network/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Nils Schneider 2 | # This is free software, licensed under the Apache 2.0 license. 3 | 4 | include $(TOPDIR)/rules.mk 5 | 6 | PKG_NAME:=gluon-web-network 7 | 8 | include ../gluon.mk 9 | 10 | define Package/gluon-web-network 11 | TITLE:=gluon-web module for network port configuration 12 | DEPENDS:=+gluon-web-admin +gluon-client-bridge 13 | endef 14 | 15 | $(eval $(call BuildPackageGluon,gluon-web-network)) 16 | -------------------------------------------------------------------------------- /package/gluon-web-network/luasrc/lib/gluon/config-mode/controller/admin/network.lua: -------------------------------------------------------------------------------- 1 | package 'gluon-web-network' 2 | 3 | entry({"admin", "network"}, model("admin/network"), _("Network"), 40) 4 | -------------------------------------------------------------------------------- /package/gluon-web-node-role/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-web-node-role 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-web-node-role 8 | DEPENDS:=+gluon-web-admin +gluon-node-info 9 | TITLE:=UI for specifying node role 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-web-node-role)) 13 | -------------------------------------------------------------------------------- /package/gluon-web-node-role/check_site.lua: -------------------------------------------------------------------------------- 1 | need_string(in_site({'roles', 'default'})) 2 | need_string_array(in_site({'roles', 'list'})) 3 | -------------------------------------------------------------------------------- /package/gluon-web-node-role/i18n/gluon-web-node-role.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "" 5 | "If this node has a special role within the mesh network you can specify this " 6 | "role here. Please find out about the available roles and their impact first. " 7 | "Only change the role if you know what you are doing." 8 | msgstr "" 9 | 10 | msgid "Node role" 11 | msgstr "" 12 | 13 | msgid "Role" 14 | msgstr "" 15 | -------------------------------------------------------------------------------- /package/gluon-web-node-role/luasrc/lib/gluon/config-mode/controller/admin/noderole.lua: -------------------------------------------------------------------------------- 1 | package 'gluon-web-node-role' 2 | 3 | entry({"admin", "noderole"}, model("admin/noderole"), "Node role", 60) 4 | -------------------------------------------------------------------------------- /package/gluon-web-osm/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-web-osm 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-web-osm 8 | TITLE:=base src for OSM inlay 9 | endef 10 | 11 | PKG_CONFIG_DEPENDS += CONFIG_GLUON_MINIFY 12 | 13 | define Package/gluon-web-osm/install 14 | $(Gluon/Build/Install) 15 | $(INSTALL_DIR) $(1)/lib/gluon/web/www/static/ 16 | 17 | ifdef CONFIG_GLUON_MINIFY 18 | $(INSTALL_DATA) ./javascript/gluon-web-osm.min.js $(1)/lib/gluon/web/www/static/gluon-web-osm.js 19 | else 20 | $(INSTALL_DATA) ./javascript/gluon-web-osm.js $(1)/lib/gluon/web/www/static/ 21 | endif 22 | endef 23 | 24 | $(eval $(call BuildPackageGluon,gluon-web-osm)) 25 | -------------------------------------------------------------------------------- /package/gluon-web-private-wifi/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-web-private-wifi 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-web-private-wifi 8 | DEPENDS:=+gluon-web-admin +gluon-private-wifi 9 | TITLE:=UI for activating a private WLAN 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-web-private-wifi)) 13 | -------------------------------------------------------------------------------- /package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/controller/admin/privatewifi.lua: -------------------------------------------------------------------------------- 1 | local uci = require("simple-uci").cursor() 2 | local wireless = require 'gluon.wireless' 3 | 4 | package 'gluon-web-private-wifi' 5 | 6 | if wireless.device_uses_wlan(uci) then 7 | entry({"admin", "privatewifi"}, model("admin/privatewifi"), _("Private WLAN"), 30) 8 | end 9 | -------------------------------------------------------------------------------- /package/gluon-web-wifi-config/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-web-wifi-config 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-web-wifi-config 8 | DEPENDS:=+gluon-web-admin +libiwinfo-lua 9 | TITLE:=UI for Wifi Settings 10 | endef 11 | 12 | $(eval $(call BuildPackageGluon,gluon-web-wifi-config)) 13 | -------------------------------------------------------------------------------- /package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/controller/admin/wifi-config.lua: -------------------------------------------------------------------------------- 1 | local uci = require("simple-uci").cursor() 2 | local wireless = require 'gluon.wireless' 3 | 4 | package 'gluon-web-wifi-config' 5 | 6 | if wireless.device_uses_wlan(uci) then 7 | entry({"admin", "wifi-config"}, model("admin/wifi-config"), _("WLAN"), 20) 8 | end 9 | -------------------------------------------------------------------------------- /package/gluon-web/files/lib/gluon/web/view/error/404.html: -------------------------------------------------------------------------------- 1 | <%# 2 | SPDX-FileCopyrightText: 2008 Steven Barth 3 | SPDX-FileCopyrightText: 2008 Jo-Philipp Wich 4 | SPDX-License-Identifier: Apache-2.0 5 | -%> 6 | 7 |

404 <%:Not Found%>

8 |

<%:Sorry, the object you requested was not found.%>

9 | <%|message%> 10 | -------------------------------------------------------------------------------- /package/gluon-web/files/lib/gluon/web/view/error/500.html: -------------------------------------------------------------------------------- 1 | <%# 2 | SPDX-FileCopyrightText: 2008 Steven Barth 3 | SPDX-FileCopyrightText: 2008 Jo-Philipp Wich 4 | SPDX-License-Identifier: Apache-2.0 5 | -%> 6 | 7 |

500 <%:Internal Server Error%>

8 |

<%:Sorry, the server encountered an unexpected error.%>

9 |
<%|message%>
10 | -------------------------------------------------------------------------------- /package/gluon-web/i18n/de.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2013-03-29 12:13+0200\n" 5 | "Last-Translator: Matthias Schiffer \n" 6 | "Language-Team: German\n" 7 | "Language: de\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 12 | 13 | msgid "Internal Server Error" 14 | msgstr "Interner Serverfehler" 15 | 16 | msgid "Not Found" 17 | msgstr "Nicht Gefunden" 18 | 19 | msgid "Sorry, the object you requested was not found." 20 | msgstr "Entschuldigung, das angeforderte Objekt wurde nicht gefunden." 21 | 22 | msgid "Sorry, the server encountered an unexpected error." 23 | msgstr "" 24 | "Entschuldigung, auf dem Server ist ein unerwarteter Fehler aufgetreten." 25 | -------------------------------------------------------------------------------- /package/gluon-web/i18n/fr.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: PACKAGE VERSION\n" 4 | "PO-Revision-Date: 2013-12-22 17:11+0200\n" 5 | "Last-Translator: goofy \n" 6 | "Language-Team: French\n" 7 | "Language: fr\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 12 | 13 | msgid "Internal Server Error" 14 | msgstr "Erreur Serveur Interne" 15 | 16 | msgid "Not Found" 17 | msgstr "Pas trouvé" 18 | 19 | msgid "Sorry, the object you requested was not found." 20 | msgstr "Désolé, l'objet que vous avez demandé n'as pas été trouvé." 21 | 22 | msgid "Sorry, the server encountered an unexpected error." 23 | msgstr "Désolé, le serveur à rencontré une erreur inattendue." 24 | -------------------------------------------------------------------------------- /package/gluon-web/i18n/gluon-web.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "Internal Server Error" 5 | msgstr "" 6 | 7 | msgid "Not Found" 8 | msgstr "" 9 | 10 | msgid "Sorry, the object you requested was not found." 11 | msgstr "" 12 | 13 | msgid "Sorry, the server encountered an unexpected error." 14 | msgstr "" 15 | -------------------------------------------------------------------------------- /package/gluon-web/src/Makefile: -------------------------------------------------------------------------------- 1 | all: compile 2 | 3 | %.o: %.c 4 | $(CC) $(CPPFLAGS) $(CFLAGS) -D_GNU_SOURCE -std=c99 -Wall -Wextra -fPIC -fvisibility=hidden -c -o $@ $< 5 | 6 | clean: 7 | rm -f parser.so *.o 8 | 9 | parser.so: template_parser.o template_utils.o template_lmo.o template_lualib.o 10 | $(CC) $(LDFLAGS) -shared -o $@ $^ 11 | 12 | gluon-po2lmo: gluon-po2lmo.o template_lmo.o 13 | 14 | compile: parser.so 15 | 16 | install: compile 17 | mkdir -p $(DESTDIR)/usr/lib/lua/gluon/web/template 18 | cp parser.so $(DESTDIR)/usr/lib/lua/gluon/web/template/parser.so 19 | -------------------------------------------------------------------------------- /package/gluon-wireless-encryption-wpa3/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=gluon-wireless-encryption-wpa3 4 | 5 | include ../gluon.mk 6 | 7 | define Package/gluon-wireless-encryption-wpa3 8 | DEPENDS:=+hostapd-mbedtls 9 | TITLE:=Package for supporting WPA3 encrypted wireless networks 10 | endef 11 | 12 | define Package/gluon-wireless-encryption-wpa3/install 13 | $(INSTALL_DIR) $(1)/lib/gluon/features 14 | 15 | touch $(1)/lib/gluon/features/wpa2 16 | touch $(1)/lib/gluon/features/wpa3 17 | endef 18 | 19 | $(eval $(call BuildPackageGluon,gluon-wireless-encryption-wpa3)) 20 | -------------------------------------------------------------------------------- /package/libgluonutil/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=libgluonutil 4 | PKG_VERSION:=1 5 | CMAKE_INSTALL:=1 6 | 7 | PKG_LICENSE:=BSD-2-Clause 8 | 9 | include $(INCLUDE_DIR)/package.mk 10 | include $(INCLUDE_DIR)/cmake.mk 11 | 12 | define Package/libgluonutil 13 | SECTION:=libs 14 | CATEGORY:=Libraries 15 | TITLE:=Gluon utility library 16 | DEPENDS:=+libjson-c +libuci 17 | endef 18 | 19 | define Package/libgluonutil/install 20 | $(INSTALL_DIR) $(1)/usr/lib 21 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libgluonutil.so $(1)/usr/lib/ 22 | endef 23 | 24 | $(eval $(call BuildPackage,libgluonutil)) 25 | -------------------------------------------------------------------------------- /package/libgluonutil/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | 3 | project(libgluonutil C) 4 | 5 | set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS _GNU_SOURCE) 6 | 7 | add_library(gluonutil SHARED libgluonutil.c) 8 | set_property(TARGET gluonutil PROPERTY COMPILE_FLAGS "-Wall -std=c99") 9 | target_link_libraries(gluonutil json-c uci) 10 | install(TARGETS gluonutil 11 | ARCHIVE DESTINATION lib 12 | LIBRARY DESTINATION lib 13 | ) 14 | 15 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libgluonutil.h DESTINATION include) 16 | -------------------------------------------------------------------------------- /patches/openwrt/0004-HACK-opkg-do-not-preserve-opkg-keys-on-upgrades-by-default.patch: -------------------------------------------------------------------------------- 1 | From: Matthias Schiffer 2 | Date: Sun, 30 Mar 2025 13:16:02 +0200 3 | Subject: HACK: opkg: do not preserve opkg keys on upgrades by default 4 | 5 | Custom keys can still be preserved by listing them in sysupgrade.conf. 6 | 7 | Signed-off-by: Matthias Schiffer 8 | 9 | diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile 10 | index e7c45e3523135a6cc35385a81c65cf2831b842bb..fc5ec6a7ed1eb559a478b00b03102fbccd543c57 100644 11 | --- a/package/system/opkg/Makefile 12 | +++ b/package/system/opkg/Makefile 13 | @@ -56,7 +56,6 @@ endef 14 | 15 | define Package/opkg/conffiles 16 | /etc/opkg.conf 17 | -/etc/opkg/keys/ 18 | /etc/opkg/customfeeds.conf 19 | endef 20 | 21 | -------------------------------------------------------------------------------- /scripts/basic_openwrt_config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | echo "CONFIG_DEVEL=y" 6 | if [ "$GLUON_AUTOREMOVE" != "0" ]; then 7 | echo "CONFIG_AUTOREMOVE=y" 8 | else 9 | echo "# CONFIG_AUTOREMOVE is not set" 10 | fi 11 | -------------------------------------------------------------------------------- /scripts/clean_output.lua: -------------------------------------------------------------------------------- 1 | local lib = dofile('scripts/target_lib.lua') 2 | local env = lib.env 3 | 4 | 5 | local subtarget = env.SUBTARGET 6 | if subtarget == '' then 7 | subtarget = 'generic' 8 | end 9 | 10 | local bindir = env.BOARD .. '/' .. subtarget 11 | 12 | 13 | lib.exec({'rm', '-f', 'openwrt/bin/targets/'..bindir..'/\0'}, true, '2>/dev/null') 14 | 15 | -- Full builds will output the "packages" directory, so clean up first 16 | if (env.GLUON_DEVICES or '') == '' then 17 | lib.exec {'rm', '-rf', 'openwrt/bin/targets/'..bindir..'/packages'} 18 | end 19 | -------------------------------------------------------------------------------- /scripts/container.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck enable=check-unassigned-uppercase 3 | 4 | set -euo pipefail 5 | 6 | # move into base directory, in case this script is not executed via `make container` 7 | cd "$(dirname "$0")/.." 8 | 9 | # normalize branch name to reflect a valid image name 10 | BRANCH=$(git branch --show-current 2>/dev/null | sed 's/[^a-z0-9-]/_/ig') 11 | TAG="gluon:${BRANCH:-latest}" 12 | 13 | if [ "$(command -v podman)" ] 14 | then 15 | podman build -t "${TAG}" contrib/docker 16 | podman run -it --rm -u "$(id -u):$(id -g)" --userns=keep-id --volume="$(pwd):/gluon:z" "${TAG}" 17 | elif [ "$(command -v docker)" ] 18 | then 19 | docker build -t "${TAG}" contrib/docker 20 | docker run -it --rm -u "$(id -u):$(id -g)" --volume="$(pwd):/gluon" -e HOME=/gluon "${TAG}" 21 | else 22 | echo "Please install either podman or docker. Exiting" >&2 23 | exit 1 24 | fi 25 | -------------------------------------------------------------------------------- /scripts/default_feeds.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # list feeds which don't start with # 4 | DEFAULT_FEEDS="$(awk '!/^#/ {print $2}' openwrt/feeds.conf.default)" 5 | export DEFAULT_FEEDS 6 | -------------------------------------------------------------------------------- /scripts/domain_aliases.lua: -------------------------------------------------------------------------------- 1 | local json = require 'jsonc' 2 | 3 | local domain = assert(json.load(arg[1])) 4 | for k, _ in pairs(domain.domain_names) do 5 | print(k) 6 | end 7 | -------------------------------------------------------------------------------- /scripts/feeds.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | . scripts/modules.sh 6 | . scripts/default_feeds.sh 7 | 8 | 9 | rm -rf openwrt/tmp 10 | rm -rf openwrt/feeds 11 | rm -rf openwrt/package/feeds 12 | 13 | ( 14 | echo "$GLUON_BASE_FEEDS" 15 | for feed in $FEEDS; do 16 | echo "src-link $feed ../../packages/$feed" 17 | done 18 | for feed in $(echo "$DEFAULT_FEEDS" | grep -vxF "$FEEDS"); do 19 | echo "src-dummy $feed" 20 | done 21 | ) > openwrt/feeds.conf 22 | 23 | openwrt/scripts/feeds update -a 24 | openwrt/scripts/feeds install -a 25 | -------------------------------------------------------------------------------- /scripts/filesize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | check_command() { 4 | command -v "$1" >/dev/null 5 | } 6 | 7 | if check_command gnustat; then 8 | gnustat -c%s "$@" 9 | elif check_command gstat; then 10 | gstat -c%s "$@" 11 | elif check_command stat; then 12 | stat -c%s "$@" 13 | else 14 | echo "$0: no suitable stat implementation was found" >&2 15 | exit 1 16 | fi 17 | -------------------------------------------------------------------------------- /scripts/getversion.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# -ne 1 ]; then 4 | echo >&2 "Usage: getversion.sh " 5 | exit 1 6 | fi 7 | 8 | cd "$1" || exit 1 9 | 10 | cat .scmversion 2>/dev/null && exit 0 11 | git --git-dir=.git describe --tags --always --abbrev=7 --dirty=+ 2>/dev/null && exit 0 12 | 13 | echo unknown 14 | -------------------------------------------------------------------------------- /scripts/lint-editorconfig.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | editorconfig-checker .github contrib docs package scripts targets tests ./*.* .luacheckrc .editorconfig 6 | -------------------------------------------------------------------------------- /scripts/lint-lua.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | luacheck package scripts targets 6 | -------------------------------------------------------------------------------- /scripts/modules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # shellcheck source=./modules 4 | . ./modules 5 | 6 | [ ! -f "$GLUON_SITEDIR"/modules ] || . "$GLUON_SITEDIR"/modules 7 | 8 | # shellcheck disable=SC2086 9 | FEEDS="$(echo $GLUON_SITE_FEEDS $GLUON_FEEDS | tr ' ' '\n')" 10 | 11 | GLUON_MODULES=openwrt 12 | 13 | for feed in $FEEDS; do 14 | GLUON_MODULES="$GLUON_MODULES packages/$feed" 15 | done 16 | -------------------------------------------------------------------------------- /scripts/rfc3339date.lua: -------------------------------------------------------------------------------- 1 | local time = os.time() 2 | local timestamp = os.date('%F %T', time) 3 | local timezone = os.date('%z', time):gsub('^([%+%-]%d%d)(%d%d)$', '%1:%2') 4 | 5 | print(timestamp .. timezone) 6 | -------------------------------------------------------------------------------- /scripts/sha256sum.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | check_command() { 4 | command -v "$1" >/dev/null 2>&1 5 | } 6 | 7 | if check_command sha256sum; then 8 | ret="$(sha256sum "$@")" 9 | elif check_command shasum; then 10 | ret="$(shasum -a 256 "$@")" 11 | elif check_command cksum; then 12 | ret="$(cksum -q -a sha256 "$@")" 13 | else 14 | echo "$0: no suitable sha256sum implementation was found" >&2 15 | exit 1 16 | fi 17 | 18 | # shellcheck disable=SC2181 19 | [ "$?" -eq 0 ] || exit 1 20 | 21 | echo "$ret" | awk '{ print $1 }' 22 | -------------------------------------------------------------------------------- /scripts/site_config.lua: -------------------------------------------------------------------------------- 1 | local site = os.getenv('GLUON_SITEDIR') .. '/' 2 | 3 | return function(config) 4 | local function loader() 5 | coroutine.yield('return ') 6 | coroutine.yield(io.open(site..config):read('*a')) 7 | end 8 | 9 | -- setfenv doesn't work with Lua 5.2 anymore, but we're using 5.1 10 | return setfenv(assert(load(coroutine.wrap(loader), config)), {})() 11 | end 12 | -------------------------------------------------------------------------------- /scripts/target_config.lua: -------------------------------------------------------------------------------- 1 | local lib = dofile('scripts/target_config_lib.lua') 2 | 3 | for _, config in pairs(lib.configs) do 4 | io.stdout:write(config:format(), '\n') 5 | end 6 | -------------------------------------------------------------------------------- /scripts/update-ci.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | make --no-print-directory list-targets BROKEN=1 | ./contrib/actions/generate-target-filters.py > .github/filters.yml 4 | -------------------------------------------------------------------------------- /scripts/update-patches.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck enable=check-unassigned-uppercase 3 | 4 | set -e 5 | shopt -s nullglob 6 | 7 | [ "$GLUON_PATCHESDIR" ] || exit 1 8 | 9 | . scripts/modules.sh 10 | 11 | 12 | GLUONDIR="$(pwd)" 13 | 14 | for module in $GLUON_MODULES; do 15 | echo "--- Updating patches for module '$module' ---" 16 | 17 | rm -rf "${GLUON_PATCHESDIR:?}/$module" 18 | 19 | cd "$GLUONDIR"/"$module" 20 | 21 | n=0 22 | for commit in $(git rev-list --reverse --no-merges base..patched); do 23 | (( ++n )) 24 | mkdir -p "${GLUON_PATCHESDIR}/$module" 25 | echo "Updating: $(git log --format=%s -n 1 "$commit")" 26 | git -c core.abbrev=40 show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' --no-renames --binary "$commit" > "${GLUON_PATCHESDIR}/$module/$(printf '%04u' "$n")-$(git show -s --pretty=format:%f "$commit").patch" 27 | done 28 | done 29 | -------------------------------------------------------------------------------- /scripts/update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | . scripts/modules.sh 6 | 7 | 8 | GLUONDIR="$(pwd)" 9 | 10 | for module in $GLUON_MODULES; do 11 | echo "--- Updating module '$module' ---" 12 | var=${module//\//_} 13 | _remote_url=${var^^}_REPO 14 | _remote_branch=${var^^}_BRANCH 15 | _remote_commit=${var^^}_COMMIT 16 | 17 | repo=${!_remote_url} 18 | branch=${!_remote_branch} 19 | commit=${!_remote_commit} 20 | 21 | mkdir -p "$GLUONDIR/$module" 22 | cd "$GLUONDIR/$module" 23 | git init 24 | 25 | if ! git branch -f base "$commit" 2>/dev/null; then 26 | git fetch "$repo" "$branch" 27 | git branch -f base "$commit" || { 28 | echo "unable to find commit \"$commit\" on branch \"$branch\" in repo \"$repo\"." >&2 29 | exit 1 30 | } 31 | fi 32 | done 33 | -------------------------------------------------------------------------------- /targets/armsr-armv7: -------------------------------------------------------------------------------- 1 | include 'armsr.inc' 2 | 3 | device('armsr-armv7', 'generic') 4 | -------------------------------------------------------------------------------- /targets/armsr-armv8: -------------------------------------------------------------------------------- 1 | include 'armsr.inc' 2 | 3 | device('armsr-armv8', 'generic') 4 | -------------------------------------------------------------------------------- /targets/armsr.inc: -------------------------------------------------------------------------------- 1 | -- We do not use the ext4 images, so we do not want to build them. 2 | config('TARGET_ROOTFS_EXT4FS', false) 3 | 4 | defaults { 5 | factory = '-squashfs-combined-efi', 6 | factory_ext = '.img.gz', 7 | sysupgrade = '-squashfs-combined-efi', 8 | sysupgrade_ext = '.img.gz', 9 | } 10 | -------------------------------------------------------------------------------- /targets/ath79-mikrotik: -------------------------------------------------------------------------------- 1 | include 'mikrotik.inc' 2 | 3 | device('mikrotik-routerboard-951ui-2nd-hap', 'mikrotik_routerboard-951ui-2nd') 4 | 5 | device('mikrotik-routerboard-wapr-2nd', 'mikrotik_routerboard-wapr-2nd') 6 | -------------------------------------------------------------------------------- /targets/bcm27xx-bcm2708: -------------------------------------------------------------------------------- 1 | include 'bcm27xx.inc' 2 | 3 | device('raspberrypi-model-b', 'rpi', { 4 | manifest_aliases = { 5 | 'raspberrypi-model-b-plus', 6 | 'raspberrypi-model-b-rev2', 7 | 8 | -- from Gluon 2023.1 and older 9 | 'raspberry-pi-model-b-rev-1', 10 | 'raspberry-pi-model-b-rev-2', 11 | 'raspberry-pi-model-b-plus-rev-1.2', 12 | }, 13 | }) 14 | -------------------------------------------------------------------------------- /targets/bcm27xx-bcm2709: -------------------------------------------------------------------------------- 1 | include 'bcm27xx.inc' 2 | 3 | device('raspberrypi-2-model-b', 'rpi-2', { 4 | manifest_aliases = { 5 | -- from Gluon 2023.1 and older 6 | 'raspberry-pi-2-model-b-rev-1.1', 7 | }, 8 | }) 9 | -------------------------------------------------------------------------------- /targets/bcm27xx-bcm2710: -------------------------------------------------------------------------------- 1 | include 'bcm27xx.inc' 2 | 3 | device('raspberrypi-3-model-b', 'rpi-3', { 4 | manifest_aliases = { 5 | 'raspberrypi-3-model-b-plus', 6 | 7 | -- from Gluon 2023.1 and older 8 | 'raspberry-pi-3-model-b-rev-1.2', 9 | 'raspberry-pi-3-model-b-plus-rev-1.3', 10 | }, 11 | }) 12 | -------------------------------------------------------------------------------- /targets/bcm27xx-bcm2711: -------------------------------------------------------------------------------- 1 | include 'bcm27xx.inc' 2 | 3 | device('raspberrypi-4-model-b', 'rpi-4', { 4 | manifest_aliases = { 5 | -- from Gluon 2023.1 and older 6 | 'raspberry-pi-4-model-b-rev-1.1', 7 | 'raspberry-pi-4-model-b-rev-1.2', -- untested 8 | 'raspberry-pi-4-model-b-rev-1.4', -- untested 9 | 'raspberry-pi-4-model-b-rev-1.5', -- untested 10 | }, 11 | }) 12 | -------------------------------------------------------------------------------- /targets/bcm27xx.inc: -------------------------------------------------------------------------------- 1 | -- We do not use the ext4 images, so we do not want to build them. 2 | config('TARGET_ROOTFS_EXT4FS', false) 3 | 4 | defaults { 5 | factory_ext = '.img.gz', 6 | sysupgrade_ext = '.img.gz', 7 | } 8 | -------------------------------------------------------------------------------- /targets/ipq40xx-mikrotik: -------------------------------------------------------------------------------- 1 | include 'mikrotik.inc' 2 | 3 | local ATH10K_PACKAGES_IPQ40XX_SMALLBUFFERS = {} 4 | 5 | device('mikrotik-hap-ac2', 'mikrotik_hap-ac2', { 6 | packages = ATH10K_PACKAGES_IPQ40XX_SMALLBUFFERS, 7 | }) 8 | 9 | device('mikrotik-sxtsq-5-ac-rbsxtsqg-5acd', 'mikrotik_sxtsq-5-ac', { 10 | factory = false, 11 | aliases = {'mikrotik-discg-5acd'}, 12 | }) 13 | -------------------------------------------------------------------------------- /targets/kirkwood-generic: -------------------------------------------------------------------------------- 1 | -- Linksys 2 | 3 | device('linksys-e4200-v2-viper', 'linksys_e4200-v2', { 4 | broken = true, -- no 802.11s support 5 | }) 6 | 7 | device('linksys-ea4500-viper', 'linksys_ea4500', { 8 | broken = true, -- no 802.11s support 9 | }) 10 | -------------------------------------------------------------------------------- /targets/lantiq-xrx200_legacy: -------------------------------------------------------------------------------- 1 | packages { 2 | '-ltq-vdsl-vr9-vectoring-fw-installer', 3 | '-kmod-ltq-vdsl-vr9-mei', 4 | '-kmod-ltq-vdsl-vr9', 5 | '-kmod-ltq-atm-vr9', 6 | '-kmod-ltq-ptm-vr9', 7 | '-kmod-ltq-deu-vr9', 8 | '-ltq-vdsl-vr9-app', 9 | '-dsl-vrx200-firmware-xdsl-a', 10 | '-dsl-vrx200-firmware-xdsl-b-patch', 11 | '-ppp-mod-pppoa', 12 | '-ltq-dsl-base', 13 | } 14 | 15 | -- TP-Link 16 | 17 | -- CAVEAT: These devices don't have a dedicated WAN port. 18 | -- All ethernet ports on the device are bridged and 19 | -- used as WAN ports. Clients connected to these 20 | -- ports will be connected to your private network. 21 | 22 | device('tp-link-td-w8970', 'tplink_tdw8970', { 23 | factory = false, 24 | }) 25 | 26 | device('tp-link-td-w8980', 'tplink_tdw8980', { 27 | factory = false, 28 | aliases = {'tp-link-td-w9980'}, 29 | broken = true, -- 5GHz unsupported 30 | }) 31 | -------------------------------------------------------------------------------- /targets/lantiq-xway: -------------------------------------------------------------------------------- 1 | packages { 2 | '-kmod-ltq-adsl-ar9-mei', 3 | '-kmod-ltq-adsl-ar9', 4 | '-kmod-ltq-adsl-ar9-fw-b', 5 | '-kmod-ltq-atm-ar9', 6 | '-ltq-adsl-app', 7 | '-ppp-mod-pppoa', 8 | '-kmod-ltq-deu-ar9' 9 | } 10 | 11 | 12 | -- AVM 13 | 14 | device('avm-fritz-box-7312', 'avm_fritz7312', { 15 | factory = false, 16 | }) 17 | 18 | 19 | -- NETGEAR 20 | 21 | device('netgear-dgn3500b', 'netgear_dgn3500b', { 22 | factory_ext = '.img', 23 | }) 24 | -------------------------------------------------------------------------------- /targets/mediatek-mt7622: -------------------------------------------------------------------------------- 1 | -- Linksys 2 | 3 | device('linksys-e8450-ubi', 'linksys_e8450-ubi', { 4 | factory = false, 5 | sysupgrade_ext = '.itb', 6 | }) 7 | 8 | 9 | -- Ubiquiti 10 | 11 | device('ubiquiti-unifi-6-lr-v1', 'ubnt_unifi-6-lr-v1', { 12 | factory = false, 13 | manifest_aliases = {'ubiquiti-unifi-6-lr'}, -- Upgrade from OpenWrt 22.03 14 | }) 15 | 16 | -------------------------------------------------------------------------------- /targets/mikrotik.inc: -------------------------------------------------------------------------------- 1 | -- Mikrotik images are netbooted via TFTP, then persisted with sysupgrade 2 | defaults { 3 | factory = '-initramfs-kernel' 4 | } 5 | 6 | config('TARGET_ROOTFS_INITRAMFS', true) 7 | config('TARGET_INITRAMFS_COMPRESSION_LZMA', true) 8 | -------------------------------------------------------------------------------- /targets/mpc85xx-p1010: -------------------------------------------------------------------------------- 1 | -- Enterasys 2 | 3 | device('enterasys-ws-ap3715i', 'enterasys_ws-ap3715i', { 4 | factory = false, 5 | }) 6 | 7 | 8 | -- Sophos 9 | 10 | device('sophos-red-15w-rev.1', 'sophos_red-15w-rev1', { 11 | factory = false, 12 | }) 13 | 14 | 15 | -- TP-Link 16 | 17 | device('tp-link-tl-wdr4900-v1', 'tplink_tl-wdr4900-v1') 18 | -------------------------------------------------------------------------------- /targets/mpc85xx-p1020: -------------------------------------------------------------------------------- 1 | local ATH10K_PACKAGES_QCA9880 = { 2 | 'kmod-ath10k', 3 | '-kmod-ath10k-ct', 4 | '-kmod-ath10k-ct-smallbuffers', 5 | 'ath10k-firmware-qca988x', 6 | '-ath10k-firmware-qca988x-ct', 7 | } 8 | 9 | 10 | -- Aerohive 11 | 12 | device('aerohive-hiveap-330', 'aerohive_hiveap-330', { 13 | factory = false, 14 | }) 15 | 16 | 17 | -- Enterasys 18 | 19 | device('enterasys-ws-ap3710i', 'enterasys_ws-ap3710i', { 20 | factory = false, 21 | }) 22 | 23 | 24 | -- Extreme Networks 25 | 26 | device('extreme-networks-ws-ap3825i', 'extreme-networks_ws-ap3825i', { 27 | factory = false, 28 | packages = ATH10K_PACKAGES_QCA9880, 29 | }) 30 | 31 | 32 | -- Hewlett-Packard 33 | 34 | device('hewlett-packard-msm460', 'hpe_msm460') 35 | 36 | 37 | -- OCEDO 38 | 39 | device('ocedo-panda', 'ocedo_panda', { 40 | factory = false, 41 | }) 42 | -------------------------------------------------------------------------------- /targets/mvebu-cortexa9: -------------------------------------------------------------------------------- 1 | device('linksys-wrt1200ac', 'linksys_wrt1200ac', { 2 | factory_ext = '.img', 3 | }) 4 | -------------------------------------------------------------------------------- /targets/rockchip-armv8: -------------------------------------------------------------------------------- 1 | defaults { 2 | factory = false, 3 | sysupgrade_ext = '.img.gz', 4 | } 5 | 6 | device('friendlyelec-nanopi-r2s', 'friendlyarm_nanopi-r2s') 7 | device('friendlyelec-nanopi-r3s', 'friendlyarm_nanopi-r3s') 8 | device('friendlyelec-nanopi-r4s', 'friendlyarm_nanopi-r4s') -- 4GB LPDDR4 9 | -------------------------------------------------------------------------------- /targets/sunxi-cortexa7: -------------------------------------------------------------------------------- 1 | defaults { 2 | factory = '-ext4-sdcard', 3 | factory_ext = '.img.gz', 4 | sysupgrade = '-ext4-sdcard', 5 | sysupgrade_ext = '.img.gz', 6 | } 7 | 8 | 9 | device('lemaker-banana-pi', 'lemaker_bananapi') 10 | 11 | device('lemaker-banana-pro', 'lemaker_bananapro', { 12 | broken = true, -- WiFi chip not supported 13 | }) 14 | 15 | device('lamobo-r1', 'lamobo_lamobo-r1', { 16 | broken = true, -- AP+11s not working 17 | }) 18 | -------------------------------------------------------------------------------- /targets/x86-64: -------------------------------------------------------------------------------- 1 | include 'x86.inc' 2 | 3 | packages { 4 | 'kmod-gpio-nct5104d', 5 | 'kmod-leds-gpio', 6 | 'kmod-pcengines-apuv2', 7 | } 8 | 9 | device('x86-64', 'generic', { 10 | extra_images = { 11 | {'-kernel', '-kernel', '.bin'}, 12 | {'-squashfs-rootfs', '-rootfs', '.img.gz'}, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /targets/x86-generic: -------------------------------------------------------------------------------- 1 | include 'x86.inc' 2 | 3 | packages { 4 | 'kmod-gpio-nct5104d', 5 | 'kmod-leds-gpio', 6 | 'kmod-pcengines-apuv2', 7 | } 8 | 9 | device('x86-generic', 'generic', { 10 | extra_images = { 11 | {'-kernel', '-kernel', '.bin'}, 12 | {'-squashfs-rootfs', '-rootfs', '.img.gz'}, 13 | }, 14 | }) 15 | -------------------------------------------------------------------------------- /targets/x86-geode: -------------------------------------------------------------------------------- 1 | packages { 2 | 'kmod-3c59x', 3 | 'kmod-8139cp', 4 | 'kmod-8139too', 5 | 'kmod-e100', 6 | 'kmod-e1000', 7 | 'kmod-forcedeth', 8 | 'kmod-igb', 9 | 'kmod-natsemi', 10 | 'kmod-ne2k-pci', 11 | 'kmod-pcnet32', 12 | 'kmod-r8169', 13 | 'kmod-sis900', 14 | 'kmod-sky2', 15 | 'kmod-tg3', 16 | 'kmod-tulip', 17 | 'kmod-via-rhine', 18 | 'kmod-via-velocity', 19 | } 20 | 21 | device('x86-geode', 'generic', { 22 | factory = '-squashfs-combined', 23 | factory_ext = '.img.gz', 24 | sysupgrade = '-squashfs-combined', 25 | sysupgrade_ext = '.img.gz', 26 | }) 27 | -------------------------------------------------------------------------------- /targets/x86-legacy: -------------------------------------------------------------------------------- 1 | include 'x86.inc' 2 | 3 | device('x86-legacy', 'generic') 4 | -------------------------------------------------------------------------------- /tests/test_batctl_tpmeter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | from pynet import * 4 | import asyncio 5 | import time 6 | 7 | a = Node() 8 | b = Node() 9 | 10 | connect(a, b) 11 | 12 | start() 13 | 14 | b.wait_until_succeeds("ping -c 5 node1") 15 | 16 | addr = a.succeed('cat /sys/class/net/primary0/address') 17 | result = b.succeed(f'batctl tp {addr}') 18 | 19 | print(result) 20 | 21 | finish() 22 | 23 | -------------------------------------------------------------------------------- /tests/test_gluon-reconfigure.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | from pynet import * 4 | 5 | a = Node() 6 | 7 | start() 8 | 9 | a.dbg(a.succeed("gluon-reconfigure")) 10 | 11 | finish() 12 | --------------------------------------------------------------------------------