-
If you encounter any issues while playing the demo video files in this
README
, please consider switching to a chromium-based browser to play them without any errors. -
The prototype code for the following repositories can be found in my
zerotier-prototype
branch of my fork repository. -
For eg
git clone [email protected]:Aryamanz29/<OPENWISP_REPO_NAME_HERE>.git git checkout zerotier-prototype
-
-
Added support for generating Zerotier configuration for OpenWrt devices.
Steps:
-
We can extend the Zerotier converter for OpenWrt backend in openwrt/converters/zerotier.py
-
The extended Zerotier converter configuration syntax logic is written as per openwrt zerotier package.
-
Added basic unit tests for the OpenWrt backend renderer and parsers.
-
Note: Currently the zerotier/schema.py only supports limited properties required for running this prototype, we can change this later on.
-
-
Added a Zerotier backend that generates network configuration accepted by REST API endpoints of the ZeroTier Controller.
Steps:
-
We can a schema for the Zerotier backend that is based on Zerotier controller OpenAPI specification.
-
Now, according to the given schema, the
netjsonconfig.backends.zerotier
converter, parser, template, and renderer logic is written. -
Added logic for automatic generation of clients similar to OpenVPN and Wireguard in the Zerotier VPN backend that is later used by OpenWISP Controller config templates.
-
Added basic unit tests for the Zerotier backend renderer and parsers.
-
-
# test_zerotier.py
from netjsonconfig.backends.openwrt.openwrt import OpenWrt
from netjsonconfig.backends.zerotier.zerotier import Zerotier
test_netjson = {
"zerotier": [
{
"name": "network-network-1",
"enableBroadcast": False,
"id": "79vgjhks7ae448c5",
},
{
"name": "zerotier-network-2",
"enableBroadcast": True,
"id": "yt6c2e21c0fhhtyu",
},
]
}
test_uci = """package zerotier
config zerotier 'network_network_1'
option enabled '0'
list join '79vgjhks7ae448c5'
config zerotier 'zerotier_network_2'
option enabled '1'
list join 'yt6c2e21c0fhhtyu'
"""
o1 = Zerotier