diff options
Diffstat (limited to 'provider_base/provider.json')
-rw-r--r-- | provider_base/provider.json | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/provider_base/provider.json b/provider_base/provider.json new file mode 100644 index 00000000..81b2ea98 --- /dev/null +++ b/provider_base/provider.json @@ -0,0 +1,64 @@ +{ + "domain": "REQUIRED", + "domain_internal": "= domain.sub(/\\.[^\\.]*$/, '.i')", + "name": { + "en": "REQUIRED" + }, + "description": { + "en": "REQUIRED" + }, + "contacts": { + "default": ["REQUIRED"], + "english": "= contacts.default.map {|email| email.split('@').join(' at the domain ')}.join(', ')" + }, + "languages": ["en"], + "default_language": "en", + "enrollment_policy": "open", + "services": "= enabled_services", + "service": { + // 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?", + "allow_paid": "= provider.service.levels.select {|l| !l['rate'].nil?}.any?", + "allow_anonymous": "= provider.service.levels.select {|l| l['name'] == 'anonymous'}.any? && services.include?('openvpn')", + "allow_registration": "= provider.enrollment_policy != 'closed' && provider.service.levels.select {|l| l['name'] != 'anonymous'}.any?", + "allow_limited_bandwidth": "= provider.service.levels.select {|l| l['bandwidth'] == 'limited'}.any?", + "allow_unlimited_bandwidth": "= provider.service.levels.select {|l| l['bandwidth'].nil?}.any?" + }, + "ca": { + "name": "= provider.ca.organization + ' Root CA'", + "organization": "= provider.name[provider.default_language]", + "organizational_unit": "= 'https://' + provider.domain", + "bit_size": 4096, + "digest": "SHA256", + "life_span": "10 years", + "server_certificates": { + "bit_size": 4096, + "digest": "SHA256", + "life_span": "1 years" + }, + "client_certificates": { + "bit_size": 2048, + "digest": "SHA256", + "life_span": "2 months", + "limited_prefix": "LIMITED", + "unlimited_prefix": "UNLIMITED" + } + }, + "client_version": { + "min": "0.7", + "max": null + } +} |