vpn.proto 853 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. syntax = "proto3";
  2. package pb;
  3. import "google/api/annotations.proto";
  4. enum VPNProto {
  5. NOPREF = 0;
  6. UDP = 1;
  7. TCP = 2;
  8. }
  9. message VPNStatusRequest {}
  10. message VPNInitRequest {
  11. string Hostname = 1;
  12. string Port = 2;
  13. VPNProto Protopref = 3;
  14. string IPBlock = 4;
  15. }
  16. service VPNService {
  17. rpc Status (VPNStatusRequest) returns (VPNStatusResponse) {
  18. option (google.api.http) = {
  19. post: "/v1/vpn/status"
  20. body: "*"
  21. };}
  22. rpc Init (VPNInitRequest) returns (VPNInitResponse) {
  23. option (google.api.http) = {
  24. post: "/v1/vpn/init"
  25. body: "*"
  26. };}
  27. }
  28. message VPNStatusResponse {
  29. string Name = 1;
  30. string SerialNumber = 2;
  31. string Hostname = 3;
  32. string Port = 4;
  33. string Cert = 5;
  34. string CACert = 6;
  35. string Net = 7;
  36. string Mask = 8;
  37. string CreatedAt = 9;
  38. string Proto = 10;
  39. }
  40. message VPNInitResponse {}