| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- syntax = "proto3";
- package pb;
- import "google/api/annotations.proto";
- enum VPNProto {
- NOPREF = 0;
- UDP = 1;
- TCP = 2;
- }
- message VPNStatusRequest {}
- message VPNInitRequest {
- string hostname = 1;
- string port = 2;
- VPNProto proto_pref = 3;
- string ip_block = 4;
- string dns = 5;
- }
- message VPNUpdateRequest {
- string ip_block = 1;
- string dns = 2;
- }
- message VPNRestartRequest {}
- service VPNService {
- rpc Status (VPNStatusRequest) returns (VPNStatusResponse) {
- option (google.api.http) = {
- get: "/api/v1/vpn/status"
- //body: "*"
- };}
- rpc Init (VPNInitRequest) returns (VPNInitResponse) {
- option (google.api.http) = {
- post: "/api/v1/vpn/init"
- body: "*"
- };}
- rpc Update (VPNUpdateRequest) returns (VPNUpdateResponse) {
- option (google.api.http) = {
- post: "/api/v1/vpn/update"
- body: "*"
- };}
- rpc Restart (VPNRestartRequest) returns (VPNRestartResponse) {
- option (google.api.http) = {
- post: "/api/v1/vpn/restart"
- //body: "*"
- };}
- }
- message VPNStatusResponse {
- string name = 1;
- string serial_number = 2;
- string hostname = 3;
- string port = 4;
- string cert = 5;
- string ca_cert = 6;
- string net = 7;
- string mask = 8;
- string created_at = 9;
- string proto = 10;
- string dns = 11;
- string expires_at = 12;
- string ca_expires_at = 13;
- }
- message VPNInitResponse {}
- message VPNUpdateResponse {}
- message VPNRestartResponse {}
|