vpn.swagger.json 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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. "/v1/vpn/update": {
  71. "post": {
  72. "operationId": "Update",
  73. "responses": {
  74. "200": {
  75. "description": "",
  76. "schema": {
  77. "$ref": "#/definitions/pbVPNUpdateResponse"
  78. }
  79. }
  80. },
  81. "parameters": [
  82. {
  83. "name": "body",
  84. "in": "body",
  85. "required": true,
  86. "schema": {
  87. "$ref": "#/definitions/pbVPNUpdateRequest"
  88. }
  89. }
  90. ],
  91. "tags": [
  92. "VPNService"
  93. ]
  94. }
  95. }
  96. },
  97. "definitions": {
  98. "pbVPNInitRequest": {
  99. "type": "object",
  100. "properties": {
  101. "Hostname": {
  102. "type": "string"
  103. },
  104. "Port": {
  105. "type": "string"
  106. },
  107. "Protopref": {
  108. "$ref": "#/definitions/pbVPNProto"
  109. },
  110. "IPBlock": {
  111. "type": "string"
  112. },
  113. "DNS": {
  114. "type": "string"
  115. }
  116. }
  117. },
  118. "pbVPNInitResponse": {
  119. "type": "object"
  120. },
  121. "pbVPNProto": {
  122. "type": "string",
  123. "enum": [
  124. "NOPREF",
  125. "UDP",
  126. "TCP"
  127. ],
  128. "default": "NOPREF"
  129. },
  130. "pbVPNStatusRequest": {
  131. "type": "object"
  132. },
  133. "pbVPNStatusResponse": {
  134. "type": "object",
  135. "properties": {
  136. "Name": {
  137. "type": "string"
  138. },
  139. "SerialNumber": {
  140. "type": "string"
  141. },
  142. "Hostname": {
  143. "type": "string"
  144. },
  145. "Port": {
  146. "type": "string"
  147. },
  148. "Cert": {
  149. "type": "string"
  150. },
  151. "CACert": {
  152. "type": "string"
  153. },
  154. "Net": {
  155. "type": "string"
  156. },
  157. "Mask": {
  158. "type": "string"
  159. },
  160. "CreatedAt": {
  161. "type": "string"
  162. },
  163. "Proto": {
  164. "type": "string"
  165. },
  166. "DNS": {
  167. "type": "string"
  168. }
  169. }
  170. },
  171. "pbVPNUpdateRequest": {
  172. "type": "object",
  173. "properties": {
  174. "IPBlock": {
  175. "type": "string"
  176. },
  177. "DNS": {
  178. "type": "string"
  179. }
  180. }
  181. },
  182. "pbVPNUpdateResponse": {
  183. "type": "object"
  184. }
  185. }
  186. }