summaryrefslogtreecommitdiff
path: root/scripts/templates
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se (leap communications)>2019-07-08 18:27:11 +0200
committerKali Kaneko <kali@leap.se (leap communications)>2019-07-08 18:27:11 +0200
commit8d1f2ceadac382c6ea42ee3e29633cf99de1a58d (patch)
treeb3b32da98ea2c27aa58fa17bf0a596bf5714b477 /scripts/templates
parent638ff1ddac9d45ad442e78bd698a39fa3469eb6d (diff)
generate eip-service.json
Diffstat (limited to 'scripts/templates')
-rw-r--r--scripts/templates/.eip-service.json.swpbin0 -> 12288 bytes
-rw-r--r--scripts/templates/eip-service.json32
2 files changed, 32 insertions, 0 deletions
diff --git a/scripts/templates/.eip-service.json.swp b/scripts/templates/.eip-service.json.swp
new file mode 100644
index 0000000..284242a
--- /dev/null
+++ b/scripts/templates/.eip-service.json.swp
Binary files differ
diff --git a/scripts/templates/eip-service.json b/scripts/templates/eip-service.json
new file mode 100644
index 0000000..8d1b0a1
--- /dev/null
+++ b/scripts/templates/eip-service.json
@@ -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"] }},
+ },{% endfor %}
+ },
+ "gateways": { {% for gw in gateways %}
+ "{{gw}}": {
+ "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 }}"],
+ "ports": [{{ port }}],{% if options %}
+ "options": {{ options | tojson }},{% endif %}
+ },{% endfor %}
+ ],
+ },
+ },{% endfor %}
+ },
+ "openvpn_configuration": {{ openvpn|tojson(indent=8) }}
+}