This is the API that should be provided by VPN services in order to include them in the "one-click" supported list of VPN providers in the Fruho application.
Two HTTP endpoints are required:
/vpapi/<provider_name>/config
This call should return plain/text OpenVPN config file with inline certificates and keys
Example of testing with curl:
curl -u <username>:<password> https://<provider_domain>/vpapi/<provider_name>/config
A custom port (different than 443) may be used.
/vpapi/<provider_name>/plans
Example of testing with curl:
curl -u <username>:<password> https://<provider_domain>/vpapi/<provider_name>/plans
This call should return application/json with the following example structure:
{ "plainid_1": { "name":"Plan Name 1", "timelimit":{"start":1448017551,"period":"month","nop":1}, "trafficlimit":{"used":0,"quota":4000000000}, "slist":[ { "id":"0", "ccode":"SE", "country":"Sweden", "city":"Stockholm", "ip":"11.22.33.44", "ovses":[{"proto":"udp","port":"5353"}, {"proto":"tcp","port":"443"}] }, { "id":"1", "ccode":"US", "country":"United States", "city":"New York", "ip":"22.33.44.55", "ovses":[{"proto":"udp","port":"5353"}, {"proto":"tcp","port":"443"}] } } }
where:
Both calls are made by the Fruho application after the user clicks "Import configuration". The HTTPS requests provide client username and password in the form of Basic Authentication so the configuration files and server list may be provided accordingly to user permissions.