stream_hysteria.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. {{define "form/streamHysteria"}}
  2. <a-form
  3. :colon="false"
  4. :label-col="{ md: {span:8} }"
  5. :wrapper-col="{ md: {span:14} }"
  6. >
  7. <a-form-item>
  8. <template slot="label">
  9. <a-tooltip>
  10. <template slot="title">
  11. <span>{{ i18n "reset" }}</span>
  12. </template>
  13. Auth Password
  14. <a-icon
  15. @click="inbound.stream.hysteria.auth = RandomUtil.randomSeq(10)"
  16. type="sync"
  17. ></a-icon>
  18. </a-tooltip>
  19. </template>
  20. <a-input v-model.trim="inbound.stream.hysteria.auth"></a-input>
  21. </a-form-item>
  22. <a-form-item label="UDP Idle Timeout">
  23. <a-input-number
  24. v-model.number="inbound.stream.hysteria.udpIdleTimeout"
  25. :min="0"
  26. ></a-input-number>
  27. </a-form-item>
  28. <a-form-item label="Masquerade">
  29. <a-switch v-model="inbound.stream.hysteria.masqueradeSwitch"></a-switch>
  30. </a-form-item>
  31. <template v-if="inbound.stream.hysteria.masqueradeSwitch">
  32. <a-divider :style="{ margin: '5px 0 0' }">Masquerade</a-divider>
  33. <a-form-item label="Type">
  34. <a-select
  35. v-model="inbound.stream.hysteria.masquerade.type"
  36. :dropdown-class-name="themeSwitcher.currentTheme"
  37. >
  38. <a-select-option value="file">File</a-select-option>
  39. <a-select-option value="proxy">Proxy</a-select-option>
  40. <a-select-option value="string">String</a-select-option>
  41. </a-select>
  42. </a-form-item>
  43. <a-form-item
  44. label="Dir"
  45. v-if="inbound.stream.hysteria.masquerade.type === 'file'"
  46. >
  47. <a-input v-model.trim="inbound.stream.hysteria.masquerade.dir"></a-input>
  48. </a-form-item>
  49. <template v-if="inbound.stream.hysteria.masquerade.type === 'proxy'">
  50. <a-form-item label="URL">
  51. <a-input
  52. v-model.trim="inbound.stream.hysteria.masquerade.url"
  53. ></a-input>
  54. </a-form-item>
  55. <a-form-item label="Rewrite Host">
  56. <a-switch
  57. v-model="inbound.stream.hysteria.masquerade.rewriteHost"
  58. ></a-switch>
  59. </a-form-item>
  60. <a-form-item label="Insecure">
  61. <a-switch
  62. v-model="inbound.stream.hysteria.masquerade.insecure"
  63. ></a-switch>
  64. </a-form-item>
  65. </template>
  66. <template v-if="inbound.stream.hysteria.masquerade.type === 'string'">
  67. <a-form-item label="Content">
  68. <a-input
  69. v-model.trim="inbound.stream.hysteria.masquerade.content"
  70. ></a-input>
  71. </a-form-item>
  72. <a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestHeader" }}'>
  73. <a-button
  74. size="small"
  75. @click="inbound.stream.hysteria.masquerade.addHeader('', '')"
  76. >+</a-button
  77. >
  78. </a-form-item>
  79. <a-form-item :wrapper-col="{span:24}">
  80. <a-input-group
  81. compact
  82. v-for="(header, index) in inbound.stream.hysteria.masquerade.headers"
  83. >
  84. <a-input
  85. style="width: 50%"
  86. v-model.trim="header.name"
  87. placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'
  88. >
  89. <template slot="addonBefore" style="margin: 0"
  90. >[[ index+1 ]]</template
  91. >
  92. </a-input>
  93. <a-input
  94. style="width: 50%"
  95. v-model.trim="header.value"
  96. placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'
  97. >
  98. <a-button
  99. slot="addonAfter"
  100. size="small"
  101. @click="inbound.stream.hysteria.masquerade.removeHeader(index)"
  102. >-</a-button
  103. >
  104. </a-input>
  105. </a-input-group>
  106. </a-form-item>
  107. <a-form-item label="Status Code">
  108. <a-input-number
  109. v-model.number="inbound.stream.hysteria.masquerade.statusCode"
  110. ></a-input-number>
  111. </a-form-item>
  112. </template>
  113. </template>
  114. </a-form>
  115. {{end}}