config.json 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. {
  2. "form": [
  3. {
  4. "key": "tmp_trans_ip",
  5. "title": "透传客户端IP",
  6. "type": "switch",
  7. "required": false,
  8. "description": "添加:proxy_set_header X-Real_IP $remote_addr,X-Forwarded-For $proxy_add_x_forwarded_for",
  9. "minimizeDesc": true
  10. },
  11. {
  12. "key": "tmp_trans_host",
  13. "title": "改写访问域名",
  14. "type": "switch",
  15. "required": false,
  16. "description": "添加:proxy_set_header Host $host"
  17. },
  18. {
  19. "key": "tmp_support_ws",
  20. "title": "支持Websocket",
  21. "type": "switch",
  22. "required": false,
  23. "description": "添加websocket代理需要的请求头"
  24. },
  25. {
  26. "key": "proxy_connect_timeout",
  27. "title": "连接超时时间",
  28. "type": "string",
  29. "required": false,
  30. "ruleType": "reg",
  31. "pattern": "^(\\d+(s|m|h))?$",
  32. "description": "eg. 60s 5m 1h"
  33. },
  34. {
  35. "key": "proxy_read_timeout",
  36. "title": "读超时时间",
  37. "type": "string",
  38. "ruleType": "reg",
  39. "pattern": "[\\d+](s|m|h)$",
  40. "required": false,
  41. "description": "proxy_read_timeout"
  42. },
  43. {
  44. "key": "proxy_http_version",
  45. "title": "代理http版本",
  46. "type": "select",
  47. "option": ["1.0","1.1"],
  48. "required": false
  49. },
  50. {
  51. "key": "proxy_set_header",
  52. "title": "代理请求头",
  53. "type": "array",
  54. "items": [
  55. {
  56. "key": "name",
  57. "type": "string",
  58. "placeholder": "请求头名称",
  59. "title": "请求头名称",
  60. "mode": "tags",
  61. "option": ["Host","X-Real-IP","X-Forwarded-For","Upgrade","Connection"],
  62. "description": "Host,X-Real-IP,X-Forwarded-For,Upgrade,Connection",
  63. "width": 180
  64. },
  65. {
  66. "key": "value",
  67. "type": "string",
  68. "mode": "tags",
  69. "placeholder": "请求头值",
  70. "title": "请求头值",
  71. "option": ["$host","$remote_addr","$proxy_add_x_forwarded_for","$http_upgrade","upgrade"],
  72. "description": "如:$host,$remote_addr,$proxy_add_x_forwarded_for,$http_upgrade,upgrade",
  73. "width": 180
  74. }
  75. ],
  76. "required": false
  77. },
  78. {
  79. "key": "proxy_next_upstream",
  80. "title": "proxy_next_upstream",
  81. "type": "select",
  82. "option": ["error","timeout","invalid_header","http_500","http_502","http_503","http_504","http_403","http_404","http_429","non_idempotent","off"],
  83. "mode": "multiple",
  84. "placeholder": "default: proxy_next_upstream error timeout",
  85. "required": false,
  86. "width": 425
  87. },
  88. {
  89. "key": "proxy_next_upstream_timeout",
  90. "title": "next_upstream_timeout",
  91. "type": "string",
  92. "required": false,
  93. "placeholder": "eg. 60s 5m"
  94. },
  95. {
  96. "key": "proxy_next_upstream_tries",
  97. "title": "proxy_next_upstream_tries",
  98. "type": "int",
  99. "required": false,
  100. "placeholder": "proxy_next_upstream_tries,default is 0"
  101. },
  102. {
  103. "key": "proxy_custom_config",
  104. "title": "自定义配置",
  105. "type": "textarea",
  106. "hideHeader": true,
  107. "description": "参考文档: https://nginx.org/en/docs/http/ngx_http_proxy_module.html",
  108. "required": false,
  109. "placeholder": "将会拼接到http的配置文件后,请注意格式",
  110. "width": 425
  111. },
  112. {
  113. "key": "tmp_proxy_more",
  114. "title": "更多设置",
  115. "collapsible": true,
  116. "type": "divider",
  117. "items": [
  118. {
  119. "key": "proxy_send_timeout",
  120. "title": "proxy_send_timeout",
  121. "type": "string",
  122. "ruleType": "reg",
  123. "pattern": "[\\d+](s|m|h)$",
  124. "required": false
  125. },
  126. {
  127. "key": "proxy_redirect",
  128. "title": "重定向(proxy_redirect)",
  129. "type": "string",
  130. "required": false,
  131. "description": "请输入 default 或者off 或者 redirect replacement,eg. http://upstream:port/two/ /one/"
  132. },
  133. {
  134. "key": "proxy_pass_request_body",
  135. "title": "发送请求数据",
  136. "description": "proxy_pass_request_body: 特定场景,不需要将数据转发到服务端,默认发送;关闭会同时添加 proxy_set_header Content-Length \"\" ",
  137. "type": "switch",
  138. "value": true,
  139. "required": false
  140. },
  141. {
  142. "key": "ssl_certificate",
  143. "title": "SSL证书",
  144. "type": "certs",
  145. "required": false
  146. },
  147. {
  148. "key": "proxy_ssl_ciphers",
  149. "title": "proxy_ssl_ciphers",
  150. "type": "string",
  151. "required": false
  152. },
  153. {
  154. "key": "proxy_ssl_protocols",
  155. "title": "proxy_ssl_protocols",
  156. "type": "select",
  157. "option": ["SSLv2","SSLv3","SSLv1","SSLv1.1","SSLv1.2","SSLv1.3"],
  158. "mode": "multiple",
  159. "required": false
  160. },
  161. {
  162. "key": "proxy_ssl_verify",
  163. "title": "SSL证书校验",
  164. "type": "switch",
  165. "required": false,
  166. "description": "proxy_ssl_verify on|off"
  167. },
  168. {
  169. "key": "proxy_store",
  170. "title": "proxy_store",
  171. "type": "string",
  172. "required": false,
  173. "description": "Enables saving of files to a disk. The on parameter saves files with paths corresponding to the directives alias or root. The off parameter disables saving of files. In addition, the file name can be set explicitly using the string with variables:\n\nproxy_store /data/www$original_uri;"
  174. },
  175. {
  176. "key": "proxy_store_access",
  177. "title": "proxy_store_access",
  178. "type": "string",
  179. "required": false,
  180. "description": "Sets access permissions for newly created files and directories, e.g.:\n\nproxy_store_access user:rw group:rw all:r;\nIf any group or all access permissions are specified then user permissions may be omitted:\n\nproxy_store_access group:rw all:r;"
  181. },
  182. {
  183. "key": "proxy_temp_file_write_size",
  184. "title": "proxy_temp_file_write_size",
  185. "type": "string",
  186. "required": false,
  187. "description": "Default:\t\nproxy_temp_file_write_size 8k|16k;"
  188. },
  189. {
  190. "key": "proxy_temp_path",
  191. "title": "proxy_temp_path",
  192. "type": "string",
  193. "required": false,
  194. "description": "Syntax: proxy_temp_path path [level1 [level2 [level3]]];eg. proxy_temp_path /spool/nginx/proxy_temp 1 2;"
  195. }
  196. ]
  197. }
  198. ]
  199. }