{ "swagger": "2.0", "info": { "title": "vpn.proto", "version": "version not set" }, "schemes": [ "http", "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/api/v1/vpn/init": { "post": { "operationId": "Init", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/pbVPNInitResponse" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/pbVPNInitRequest" } } ], "tags": [ "VPNService" ] } }, "/api/v1/vpn/restart": { "post": { "operationId": "Restart", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/pbVPNRestartResponse" } } }, "tags": [ "VPNService" ] } }, "/api/v1/vpn/status": { "get": { "operationId": "Status", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/pbVPNStatusResponse" } } }, "tags": [ "VPNService" ] } }, "/api/v1/vpn/update": { "post": { "operationId": "Update", "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/pbVPNUpdateResponse" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/pbVPNUpdateRequest" } } ], "tags": [ "VPNService" ] } } }, "definitions": { "pbVPNInitRequest": { "type": "object", "properties": { "hostname": { "type": "string" }, "port": { "type": "string" }, "proto_pref": { "$ref": "#/definitions/pbVPNProto" }, "ip_block": { "type": "string" }, "dns": { "type": "string" } } }, "pbVPNInitResponse": { "type": "object" }, "pbVPNProto": { "type": "string", "enum": [ "NOPREF", "UDP", "TCP" ], "default": "NOPREF" }, "pbVPNRestartResponse": { "type": "object" }, "pbVPNStatusResponse": { "type": "object", "properties": { "name": { "type": "string" }, "serial_number": { "type": "string" }, "hostname": { "type": "string" }, "port": { "type": "string" }, "cert": { "type": "string" }, "ca_cert": { "type": "string" }, "net": { "type": "string" }, "mask": { "type": "string" }, "created_at": { "type": "string" }, "proto": { "type": "string" }, "dns": { "type": "string" }, "expires_at": { "type": "string" }, "ca_expires_at": { "type": "string" } } }, "pbVPNUpdateRequest": { "type": "object", "properties": { "ip_block": { "type": "string" }, "dns": { "type": "string" } } }, "pbVPNUpdateResponse": { "type": "object" } } }