From b15b36c04bf7ecb94530feb64fb1cfbee428d688 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 30 Jul 2019 20:19:51 +0200 Subject: expected list of gateways, make port string --- scripts/templates/eip-service.json.jinja | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/templates/eip-service.json.jinja (limited to 'scripts/templates/eip-service.json.jinja') diff --git a/scripts/templates/eip-service.json.jinja b/scripts/templates/eip-service.json.jinja new file mode 100644 index 0000000..189a422 --- /dev/null +++ b/scripts/templates/eip-service.json.jinja @@ -0,0 +1,32 @@ +{ + "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 %} + ], + "openvpn_configuration": {{ openvpn|tojson(indent=8) }} +} -- cgit v1.2.3