Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Turris
Foris Controller
foris-controller-openvpn-module
Commits
405df067
Verified
Commit
405df067
authored
Feb 12, 2021
by
Filip Hron
Browse files
feature: select interface to masquerading or forwarding
parent
f885204e
Pipeline
#76576
failed with stage
in 1 minute and 36 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
foris_controller_modules/openvpn/handlers/mock.py
View file @
405df067
...
...
@@ -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
)
...
...
foris_controller_modules/openvpn/schema/openvpn.json
View file @
405df067
{
"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"
:
[
...
...
tests/test_openvpn.py
View file @
405df067
...
...
@@ -512,6 +512,8 @@ def test_get_settings(uci_configs_init, infrastructure, start_buses):
"use_dns"
,
"server_hostname"
,
"ipv6"
,
"masquerading"
,
"forwarding"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment