From bbe82d29b8f97bda48ea27e76d0a60d1caa99b85 Mon Sep 17 00:00:00 2001 From: kwadronaut Date: Tue, 23 Feb 2021 15:44:34 +0100 Subject: [feat] add eip v4 - Closes: #16 --- scripts/templates/v3/eip-service.json.jinja | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 scripts/templates/v3/eip-service.json.jinja (limited to 'scripts/templates/v3/eip-service.json.jinja') diff --git a/scripts/templates/v3/eip-service.json.jinja b/scripts/templates/v3/eip-service.json.jinja new file mode 100644 index 0000000..5d55168 --- /dev/null +++ b/scripts/templates/v3/eip-service.json.jinja @@ -0,0 +1,33 @@ +{ + "serial": 3, + "version": 3, + "locations": { {% for loc in locations %} + "{{loc}}": { + "name": "{{ locations[loc]['name'] }}", + "country_code": "{{ locations[loc]['country_code'] }}", + "hemisphere": "{{ locations[loc]['hemisphere'] }}", + "timezone": "{{ locations[loc]['timezone'] }}" + }{{ "," if not loop.last }}{% endfor %} + }, + "gateways": [ {% for gw in gateways %} + { + "host": "{{ gateways[gw]["host"] }}", + "ip_address": "{{ gateways[gw]["ip_address"] }}", + "location": "{{ gateways[gw]["location"] }}", + "capabilities": { + "adblock": false, + "filter_dns": false, + "limited": false, + "transport": [ {% for tr, proto, port, options in gateways[gw]["transports"] %} + {"type": "{{ tr }}", + "protocols": ["{{ proto }}"],{% if options %} + "options": {{ options | tojson }},{% endif %} + "ports": ["{{ port }}"] + }{{ "," if not loop.last }}{% endfor %} + ] + } + }{{ "," if not loop.last }}{% endfor %} + ], + "auth": "{{ auth }}", + "openvpn_configuration": {{ openvpn|tojson(indent=8) }} +} -- cgit v1.2.3