summaryrefslogtreecommitdiff
path: root/provider_base
diff options
context:
space:
mode:
Diffstat (limited to 'provider_base')
-rw-r--r--provider_base/files/service-definitions/v1/eip-service.json.erb4
-rw-r--r--provider_base/lib/macros/keys.rb8
-rw-r--r--provider_base/services/openvpn.json3
-rw-r--r--provider_base/services/tor.json12
4 files changed, 18 insertions, 9 deletions
diff --git a/provider_base/files/service-definitions/v1/eip-service.json.erb b/provider_base/files/service-definitions/v1/eip-service.json.erb
index 3b8976fd..0ecd002a 100644
--- a/provider_base/files/service-definitions/v1/eip-service.json.erb
+++ b/provider_base/files/service-definitions/v1/eip-service.json.erb
@@ -42,6 +42,10 @@
end
configuration = node.openvpn.configuration
end
+ configuration = configuration.dup
+ if configuration['fragment'] && configuration['fragment'] == 1500
+ configuration.delete('fragment')
+ end
hsh["gateways"] = gateways.compact
hsh["locations"] = locations
hsh["openvpn_configuration"] = configuration
diff --git a/provider_base/lib/macros/keys.rb b/provider_base/lib/macros/keys.rb
index 0d46acb5..ea4c3df2 100644
--- a/provider_base/lib/macros/keys.rb
+++ b/provider_base/lib/macros/keys.rb
@@ -15,8 +15,10 @@ module LeapCli
path = file_path(path_name)
if path.nil?
generate_tor_key(key_type)
+ file_path(path_name)
+ else
+ path
end
- return path
end
#
@@ -27,8 +29,10 @@ module LeapCli
path = file_path(path_name)
if path.nil?
generate_tor_key(key_type)
+ file_path(path_name)
+ else
+ path
end
- return path
end
#
diff --git a/provider_base/services/openvpn.json b/provider_base/services/openvpn.json
index 1906244c..11cb0dc2 100644
--- a/provider_base/services/openvpn.json
+++ b/provider_base/services/openvpn.json
@@ -24,7 +24,8 @@
"auth": "SHA1",
"cipher": "AES-128-CBC",
"keepalive": "10 30",
- "tun-ipv6": true
+ "tun-ipv6": true,
+ "fragment": 1500
}
},
"obfsproxy": {
diff --git a/provider_base/services/tor.json b/provider_base/services/tor.json
index 87fb9682..55d3d2ee 100644
--- a/provider_base/services/tor.json
+++ b/provider_base/services/tor.json
@@ -4,12 +4,12 @@
"contacts": "= [provider.contacts['tor'] || provider.contacts.default].flatten",
"nickname": "= (self.name + secret(:tor_family)).sub('_','')[0..18]",
"family": "= nodes[:services => 'tor'][:environment => '!local'].field('tor.nickname').join(',')",
- "hidden_service": null,
- "key": {
- "type": "RSA",
- "public": "= tor_public_key_path(:node_tor_pub_key, tor.key.type) if tor.hidden_service",
- "private": "= tor_private_key_path(:node_tor_priv_key, tor.key.type) if tor.hidden_service",
- "address": "= onion_address(:node_tor_pub_key) if tor.hidden_service"
+ "hidden_service": {
+ "active": null,
+ "key_type": "RSA",
+ "public_key": "= tor_public_key_path(:node_tor_pub_key, tor.hidden_service.key_type) if tor.hidden_service.active",
+ "private_key": "= tor_private_key_path(:node_tor_priv_key, tor.hidden_service.key_type) if tor.hidden_service.active",
+ "address": "= onion_address(:node_tor_pub_key) if tor.hidden_service.active"
}
}
}