1
0

vpn.swagger.json 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "title": "vpn.proto",
  5. "version": "version not set"
  6. },
  7. "schemes": [
  8. "http",
  9. "https"
  10. ],
  11. "consumes": [
  12. "application/json"
  13. ],
  14. "produces": [
  15. "application/json"
  16. ],
  17. "paths": {
  18. "/v1/vpn/init": {
  19. "post": {
  20. "operationId": "Init",
  21. "responses": {
  22. "200": {
  23. "description": "",
  24. "schema": {
  25. "$ref": "#/definitions/pbVPNInitResponse"
  26. }
  27. }
  28. },
  29. "parameters": [
  30. {
  31. "name": "body",
  32. "in": "body",
  33. "required": true,
  34. "schema": {
  35. "$ref": "#/definitions/pbVPNInitRequest"
  36. }
  37. }
  38. ],
  39. "tags": [
  40. "VPNService"
  41. ]
  42. }
  43. },
  44. "/v1/vpn/status": {
  45. "post": {
  46. "operationId": "Status",
  47. "responses": {
  48. "200": {
  49. "description": "",
  50. "schema": {
  51. "$ref": "#/definitions/pbVPNStatusResponse"
  52. }
  53. }
  54. },
  55. "parameters": [
  56. {
  57. "name": "body",
  58. "in": "body",
  59. "required": true,
  60. "schema": {
  61. "$ref": "#/definitions/pbVPNStatusRequest"
  62. }
  63. }
  64. ],
  65. "tags": [
  66. "VPNService"
  67. ]
  68. }
  69. }
  70. },
  71. "definitions": {
  72. "pbVPNInitRequest": {
  73. "type": "object",
  74. "properties": {
  75. "Hostname": {
  76. "type": "string"
  77. },
  78. "Port": {
  79. "type": "string"
  80. },
  81. "Protopref": {
  82. "$ref": "#/definitions/pbVPNProto"
  83. },
  84. "IPBlock": {
  85. "type": "string"
  86. },
  87. "DNS": {
  88. "type": "string"
  89. }
  90. }
  91. },
  92. "pbVPNInitResponse": {
  93. "type": "object"
  94. },
  95. "pbVPNProto": {
  96. "type": "string",
  97. "enum": [
  98. "NOPREF",
  99. "UDP",
  100. "TCP"
  101. ],
  102. "default": "NOPREF"
  103. },
  104. "pbVPNStatusRequest": {
  105. "type": "object"
  106. },
  107. "pbVPNStatusResponse": {
  108. "type": "object",
  109. "properties": {
  110. "Name": {
  111. "type": "string"
  112. },
  113. "SerialNumber": {
  114. "type": "string"
  115. },
  116. "Hostname": {
  117. "type": "string"
  118. },
  119. "Port": {
  120. "type": "string"
  121. },
  122. "Cert": {
  123. "type": "string"
  124. },
  125. "CACert": {
  126. "type": "string"
  127. },
  128. "Net": {
  129. "type": "string"
  130. },
  131. "Mask": {
  132. "type": "string"
  133. },
  134. "CreatedAt": {
  135. "type": "string"
  136. },
  137. "Proto": {
  138. "type": "string"
  139. },
  140. "DNS": {
  141. "type": "string"
  142. }
  143. }
  144. }
  145. }
  146. }