Verified Commit 405df067 authored by Filip Hron's avatar Filip Hron
Browse files

feature: select interface to masquerading or forwarding

parent f885204e
Pipeline #76576 failed with stage
in 1 minute and 36 seconds
......@@ -44,6 +44,16 @@ class MockOpenvpnHandler(Handler, BaseMockHandler):
"port": 1194,
"route_all": False,
"use_dns": False,
"masquerading": {
"guest": True,
"guest_wifi": True,
"wireless": True
},
"forwarding": {
"guest": True,
"guest_wifi": True,
"guest_wifi": True,
}
}
@logger_wrapper(logger)
......
{
"definitions": {
"openvpn_cert_id": {"type": "string", "pattern": "^([0-9a-fA-F][0-9a-fA-F])+$"},
"openvpn_cert_name": {"type": "string", "pattern": "^[a-zA-Z0-9_.-]{1,64}$"}
"openvpn_cert_name": {"type": "string", "pattern": "^[a-zA-Z0-9_.-]{1,64}$"},
"interfaces": {
"type": "object",
"properties": {
"guest": {"type": "boolean"},
"guest_wifi": {"type": "boolean"},
"wireless": {"type": "boolean"}
}
}
},
"oneOf": [
{
......@@ -276,7 +284,9 @@
"port": {"type": "integer", "minimum": 0, "maximum": 65535},
"server_hostname": {"type": "string"},
"route_all": {"type": "boolean"},
"use_dns": {"type": "boolean"}
"use_dns": {"type": "boolean"},
"masquerading": {"$ref": "#/definitions/interfaces"},
"forwarding": {"$ref": "#/definitions/interfaces"}
},
"additionalProperties": false,
"required": [
......
......@@ -512,6 +512,8 @@ def test_get_settings(uci_configs_init, infrastructure, start_buses):
"use_dns",
"server_hostname",
"ipv6",
"masquerading",
"forwarding"
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment