summaryrefslogtreecommitdiff
path: root/provider_base
diff options
context:
space:
mode:
Diffstat (limited to 'provider_base')
-rw-r--r--provider_base/files/service-definitions/provider.json.erb2
-rw-r--r--provider_base/provider.json18
-rw-r--r--provider_base/services/openvpn.json3
-rw-r--r--provider_base/services/tor.json4
-rw-r--r--provider_base/services/webapp.json11
5 files changed, 25 insertions, 13 deletions
diff --git a/provider_base/files/service-definitions/provider.json.erb b/provider_base/files/service-definitions/provider.json.erb
index 3e055e9a..be8ae484 100644
--- a/provider_base/files/service-definitions/provider.json.erb
+++ b/provider_base/files/service-definitions/provider.json.erb
@@ -14,7 +14,7 @@
hsh['api_version'] = "1"
hsh['api_uri'] = ["https://", api.domain, ':', api.port].join
- hsh['ca_cert_uri'] = 'https://' + domain.full_suffix + '/ca.crt'
+ hsh['ca_cert_uri'] = 'https://' + webapp.domain + '/ca.crt'
hsh['ca_cert_fingerprint'] = fingerprint(:ca_cert)
hsh.dump_json
diff --git a/provider_base/provider.json b/provider_base/provider.json
index fa69318b..743964ee 100644
--- a/provider_base/provider.json
+++ b/provider_base/provider.json
@@ -15,12 +15,18 @@
"default_language": "en",
"enrollment_policy": "open",
"service": {
- "levels": [
- // bandwidth limit is in Bytes, storage limit is in MB.
- {"id": 1, "name": "free", "storage":50},
- {"id": 2, "name": "basic", "storage":1000, "rate": ["US$10", "€10"]},
- {"id": 3, "name": "pro", "storage":10000, "rate": ["US$20", "€20"]}
- ],
+ // bandwidth limit is in Bytes, storage limit is in MB.
+ // for example:
+ // "levels": {
+ // "1": {"name": "free", "description":"Limited service, but without cost to you.", "storage":50},
+ // "2": {"name": "basic", "description":"The standard package.", "storage":1000, "rate": {"USD":5}},
+ // "3": {"name": "pro", "description":"Extra storage for power users." , "storage":10000, "rate": {"USD":10}}
+ // }
+ "levels": {
+ "1": {
+ "name": "free", "description": "Please donate."
+ }
+ },
"default_service_level": 1,
"bandwidth_limit": 102400,
"allow_free": "= provider.service.levels.select {|l| l['rate'].nil?}.any?",
diff --git a/provider_base/services/openvpn.json b/provider_base/services/openvpn.json
index 04e19aa2..090afcd6 100644
--- a/provider_base/services/openvpn.json
+++ b/provider_base/services/openvpn.json
@@ -23,7 +23,8 @@
"tls-cipher": "DHE-RSA-AES128-SHA",
"auth": "SHA1",
"cipher": "AES-128-CBC",
- "keepalive": "10 30"
+ "keepalive": "10 30",
+ "tun-ipv6": true
}
}
}
diff --git a/provider_base/services/tor.json b/provider_base/services/tor.json
index ae4da46d..fc365a19 100644
--- a/provider_base/services/tor.json
+++ b/provider_base/services/tor.json
@@ -1,6 +1,8 @@
{
"tor": {
"bandwidth_rate": 6550,
- "contacts": "= [provider.contacts['tor'] || provider.contacts.default].flatten"
+ "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(',')"
}
}
diff --git a/provider_base/services/webapp.json b/provider_base/services/webapp.json
index 29c0cbf9..bbb52094 100644
--- a/provider_base/services/webapp.json
+++ b/provider_base/services/webapp.json
@@ -1,6 +1,7 @@
{
"webapp": {
"admins": [],
+ "domain": "= domain.full_suffix",
"modules": ["user", "billing", "help"],
"couchdb_webapp_user": {
"username": "= global.services[:couchdb].couch.users[:webapp].username",
@@ -12,6 +13,8 @@
"allow_limited_certs": "= provider.service.allow_limited_bandwidth",
"allow_unlimited_certs": "= provider.service.allow_unlimited_bandwidth",
"allow_anonymous_certs": "= provider.service.allow_anonymous",
+ "default_service_level": "= provider.service.default_service_level",
+ "service_levels": "= provider.service.levels",
"secret_token": "= secret :webapp_secret_token",
"api_version": 1,
"secure": false,
@@ -39,7 +42,7 @@
},
"service_type": "public_service",
"api": {
- "domain": "= 'api.' + domain.full_suffix",
+ "domain": "= 'api.' + webapp.domain",
"port": 4430
},
"nickserver": {
@@ -52,15 +55,15 @@
"port": 6425
},
"dns": {
- "aliases": "= [domain.full_suffix, domain.full, api.domain, nickserver.domain]"
+ "aliases": "= [domain.full, webapp.domain, api.domain, nickserver.domain]"
},
"x509": {
"use": true,
"ca_cert": "= file :ca_cert, :missing => 'provider CA. Run `leap cert ca`'",
"client_ca_cert": "= file :client_ca_cert, :missing => 'Certificate Authority. Run `leap cert ca`'",
"client_ca_key": "= file :client_ca_key, :missing => 'Certificate Authority. Run `leap cert ca`'",
- "commercial_cert": "= file [:commercial_cert, domain.full_suffix]",
- "commercial_key": "= file [:commercial_key, domain.full_suffix]",
+ "commercial_cert": "= file [:commercial_cert, webapp.domain]",
+ "commercial_key": "= file [:commercial_key, webapp.domain]",
"commercial_ca_cert": "= try_file :commercial_ca_cert"
}
}