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 Protopref = 3; string IPBlock = 4; string DNS = 5; } message VPNUpdateRequest { string IPBlock = 1; string DNS = 2; } service VPNService { rpc Status (VPNStatusRequest) returns (VPNStatusResponse) { option (google.api.http) = { post: "/v1/vpn/status" body: "*" };} rpc Init (VPNInitRequest) returns (VPNInitResponse) { option (google.api.http) = { post: "/v1/vpn/init" body: "*" };} rpc Update (VPNUpdateRequest) returns (VPNUpdateResponse) { option (google.api.http) = { post: "/v1/vpn/update" body: "*" };} } message VPNStatusResponse { string Name = 1; string SerialNumber = 2; string Hostname = 3; string Port = 4; string Cert = 5; string CACert = 6; string Net = 7; string Mask = 8; string CreatedAt = 9; string Proto = 10; string DNS = 11; } message VPNInitResponse {} message VPNUpdateResponse {}