diff options
author | Kali Kaneko <kali@leap.se (leap communications)> | 2019-07-30 20:19:51 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se (leap communications)> | 2019-07-30 20:19:51 +0200 |
commit | b15b36c04bf7ecb94530feb64fb1cfbee428d688 (patch) | |
tree | 40d2419d21ecbf4d3ce301f7b63a6eec04ddf070 /scripts/templates/eip-service.json.jinja | |
parent | ec98da8015aae7715b412b1a97101d989d5ea682 (diff) |
expected list of gateways, make port string
Diffstat (limited to 'scripts/templates/eip-service.json.jinja')
-rw-r--r-- | scripts/templates/eip-service.json.jinja | 32 |
1 files changed, 32 insertions, 0 deletions
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) }} +} |