1
0

vpn.proto 890 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. string DNS = 5;
  16. }
  17. service VPNService {
  18. rpc Status (VPNStatusRequest) returns (VPNStatusResponse) {
  19. option (google.api.http) = {
  20. post: "/v1/vpn/status"
  21. body: "*"
  22. };}
  23. rpc Init (VPNInitRequest) returns (VPNInitResponse) {
  24. option (google.api.http) = {
  25. post: "/v1/vpn/init"
  26. body: "*"
  27. };}
  28. }
  29. message VPNStatusResponse {
  30. string Name = 1;
  31. string SerialNumber = 2;
  32. string Hostname = 3;
  33. string Port = 4;
  34. string Cert = 5;
  35. string CACert = 6;
  36. string Net = 7;
  37. string Mask = 8;
  38. string CreatedAt = 9;
  39. string Proto = 10;
  40. string DNS = 11;
  41. }
  42. message VPNInitResponse {}