summaryrefslogtreecommitdiff
path: root/scripts/templates/v4/eip-service.json.jinja
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/templates/v4/eip-service.json.jinja')
-rw-r--r--scripts/templates/v4/eip-service.json.jinja34
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/templates/v4/eip-service.json.jinja b/scripts/templates/v4/eip-service.json.jinja
new file mode 100644
index 0000000..9dd5498
--- /dev/null
+++ b/scripts/templates/v4/eip-service.json.jinja
@@ -0,0 +1,34 @@
+{
+ "serial": 4,
+ "version": 4,
+ "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"] }}",
+ "ip_address6": "{{ gateways[gw]["ip_address6"] }}",
+ "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) }}
+}