Skip to content

Commit

Permalink
[openvpn] Added "pull" option for clients
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Sep 21, 2016
1 parent b486c4d commit c7e51c6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/backends/openvpn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ Required properties:
+--------------------------+---------+--------------+-------------------------------------------------------------+
| ``tls_client`` | boolean | ``True`` | |
+--------------------------+---------+--------------+-------------------------------------------------------------+
| ``pull`` | boolean | ``True`` | |
+--------------------------+---------+--------------+-------------------------------------------------------------+
| ``auth_user_pass`` | string | | any non whitespace character |
+--------------------------+---------+--------------+-------------------------------------------------------------+

Expand Down
1 change: 1 addition & 0 deletions docs/source/backends/openwisp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ The following example shows a full working *configuration dictionary* for the
"key": "/tmp/owispmanager/openvpn/x509/l2vpn_client_2693.pem",
"ns_cert_type": "server",
"mode": "p2p",
"pull": True,
"enabled": True,
"comp_lzo": "yes",
"down": "/tmp/owispmanager/openvpn/vpn_2693_script_down.sh",
Expand Down
9 changes: 9 additions & 0 deletions netjsonconfig/backends/openvpn/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,15 @@
"format": "checkbox",
"propertyOrder": 9,
},
"pull": {
"title": "pull",
"description": "accept options pushed by the server, provided they are "
"part of the legal set of pushable options",
"type": "boolean",
"default": True,
"format": "checkbox",
"propertyOrder": 10,
},
"ns_cert_type": {
"description": "Require that peer certificate was signed with an explicit "
"nsCertType designation of \"server\"",
Expand Down
2 changes: 2 additions & 0 deletions tests/openvpn/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def test_client_mode(self):
"persist_tun": True,
"port": 1195,
"proto": "tcp-client",
"pull": True,
"remote": [
{
"host": "vpn1.test.com",
Expand Down Expand Up @@ -177,6 +178,7 @@ def test_client_mode(self):
persist-tun
port 1195
proto tcp-client
pull
remote vpn1.test.com 1194
remote vpn2.test.com 1195
resolv-retry
Expand Down

0 comments on commit c7e51c6

Please sign in to comment.