1
0

basics.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. {{define "settings/xray/basics"}}
  2. <a-collapse default-active-key="1">
  3. <a-collapse-panel key="1" header='{{ i18n "pages.xray.generalConfigs"}}'>
  4. <a-row :xs="24" :sm="24" :lg="12">
  5. <a-alert type="warning" :style="{ textAlign: 'center' }">
  6. <template slot="message">
  7. <a-icon type="exclamation-circle" theme="filled"
  8. :style="{ color: '#FFA031' }"></a-icon>
  9. <span>{{ i18n "pages.xray.generalConfigsDesc" }}</span>
  10. </template>
  11. </a-alert>
  12. </a-row>
  13. <a-setting-list-item paddings="small">
  14. <template #title>{{ i18n "pages.xray.FreedomStrategy" }}</template>
  15. <template #description>{{ i18n "pages.xray.FreedomStrategyDesc"
  16. }}</template>
  17. <template #control>
  18. <a-select v-model="freedomStrategy"
  19. :dropdown-class-name="themeSwitcher.currentTheme"
  20. :style="{ width: '100%' }">
  21. <a-select-option v-for="s in OutboundDomainStrategies"
  22. :value="s">
  23. <span>[[ s ]]</span>
  24. </a-select-option>
  25. </a-select>
  26. </template>
  27. </a-setting-list-item>
  28. <a-setting-list-item paddings="small">
  29. <template #title>{{ i18n "pages.xray.RoutingStrategy" }}</template>
  30. <template #description>{{ i18n "pages.xray.RoutingStrategyDesc"
  31. }}</template>
  32. <template #control>
  33. <a-select v-model="routingStrategy"
  34. :dropdown-class-name="themeSwitcher.currentTheme"
  35. :style="{ width: '100%' }">
  36. <a-select-option v-for="s in routingDomainStrategies"
  37. :value="s">
  38. <span>[[ s ]]</span>
  39. </a-select-option>
  40. </a-select>
  41. </template>
  42. </a-setting-list-item>
  43. <a-setting-list-item paddings="small">
  44. <template #title>{{ i18n "pages.xray.outboundTestUrl" }}</template>
  45. <template #description>{{ i18n "pages.xray.outboundTestUrlDesc"
  46. }}</template>
  47. <template #control>
  48. <a-input v-model="outboundTestUrl"
  49. :placeholder="'https://www.google.com/generate_204'"
  50. :style="{ width: '100%' }"></a-input>
  51. </template>
  52. </a-setting-list-item>
  53. </a-collapse-panel>
  54. <a-collapse-panel key="2" header='{{ i18n "pages.xray.statistics" }}'>
  55. <a-setting-list-item paddings="small">
  56. <template #title>{{ i18n "pages.xray.statsInboundUplink"
  57. }}</template>
  58. <template #description>{{ i18n "pages.xray.statsInboundUplinkDesc"
  59. }}</template>
  60. <template #control>
  61. <a-switch v-model="statsInboundUplink"></a-switch>
  62. </template>
  63. </a-setting-list-item>
  64. <a-setting-list-item paddings="small">
  65. <template #title>{{ i18n "pages.xray.statsInboundDownlink"
  66. }}</template>
  67. <template #description>{{ i18n "pages.xray.statsInboundDownlinkDesc"
  68. }}</template>
  69. <template #control>
  70. <a-switch v-model="statsInboundDownlink"></a-switch>
  71. </template>
  72. </a-setting-list-item>
  73. <a-setting-list-item paddings="small">
  74. <template #title>{{ i18n "pages.xray.statsOutboundUplink"
  75. }}</template>
  76. <template #description>{{ i18n "pages.xray.statsOutboundUplinkDesc"
  77. }}</template>
  78. <template #control>
  79. <a-switch v-model="statsOutboundUplink"></a-switch>
  80. </template>
  81. </a-setting-list-item>
  82. <a-setting-list-item paddings="small">
  83. <template #title>{{ i18n "pages.xray.statsOutboundDownlink"
  84. }}</template>
  85. <template #description>{{ i18n
  86. "pages.xray.statsOutboundDownlinkDesc" }}</template>
  87. <template #control>
  88. <a-switch v-model="statsOutboundDownlink"></a-switch>
  89. </template>
  90. </a-setting-list-item>
  91. </a-collapse-panel>
  92. <a-collapse-panel key="3" header='{{ i18n "pages.xray.logConfigs" }}'>
  93. <a-row :xs="24" :sm="24" :lg="12">
  94. <a-alert type="warning" :style="{ textAlign: 'center' }">
  95. <template slot="message">
  96. <a-icon type="exclamation-circle" theme="filled"
  97. :style="{ color: '#FFA031' }"></a-icon>
  98. <span>{{ i18n "pages.xray.logConfigsDesc" }}</span>
  99. </template>
  100. </a-alert>
  101. </a-row>
  102. <a-setting-list-item paddings="small">
  103. <template #title>{{ i18n "pages.xray.logLevel" }}</template>
  104. <template #description>{{ i18n "pages.xray.logLevelDesc"
  105. }}</template>
  106. <template #control>
  107. <a-select v-model="logLevel"
  108. :dropdown-class-name="themeSwitcher.currentTheme"
  109. :style="{ width: '100%' }">
  110. <a-select-option v-for="s in log.loglevel" :value="s">
  111. <span>[[ s ]]</span>
  112. </a-select-option>
  113. </a-select>
  114. </template>
  115. </a-setting-list-item>
  116. <a-setting-list-item paddings="small">
  117. <template #title>{{ i18n "pages.xray.accessLog" }}</template>
  118. <template #description>{{ i18n "pages.xray.accessLogDesc"
  119. }}</template>
  120. <template #control>
  121. <a-select v-model="accessLog"
  122. :dropdown-class-name="themeSwitcher.currentTheme"
  123. :style="{ width: '100%' }">
  124. <a-select-option value>
  125. <span>Empty</span>
  126. </a-select-option>
  127. <a-select-option v-for="s in log.access" :value="s">
  128. <span>[[ s ]]</span>
  129. </a-select-option>
  130. </a-select>
  131. </template>
  132. </a-setting-list-item>
  133. <a-setting-list-item paddings="small">
  134. <template #title>{{ i18n "pages.xray.errorLog" }}</template>
  135. <template #description>{{ i18n "pages.xray.errorLogDesc"
  136. }}</template>
  137. <template #control>
  138. <a-select v-model="errorLog"
  139. :dropdown-class-name="themeSwitcher.currentTheme"
  140. :style="{ width: '100%' }">
  141. <a-select-option value>
  142. <span>Empty</span>
  143. </a-select-option>
  144. <a-select-option v-for="s in log.error" :value="s">
  145. <span>[[ s ]]</span>
  146. </a-select-option>
  147. </a-select>
  148. </template>
  149. </a-setting-list-item>
  150. <a-setting-list-item paddings="small">
  151. <template #title>{{ i18n "pages.xray.maskAddress" }}</template>
  152. <template #description>{{ i18n "pages.xray.maskAddressDesc"
  153. }}</template>
  154. <template #control>
  155. <a-select v-model="maskAddressLog"
  156. :dropdown-class-name="themeSwitcher.currentTheme"
  157. :style="{ width: '100%' }">
  158. <a-select-option value>
  159. <span>Empty</span>
  160. </a-select-option>
  161. <a-select-option v-for="s in log.maskAddress" :value="s">
  162. <span>[[ s ]]</span>
  163. </a-select-option>
  164. </a-select>
  165. </template>
  166. </a-setting-list-item>
  167. <a-setting-list-item paddings="small">
  168. <template #title>{{ i18n "pages.xray.dnsLog"}}</template>
  169. <template #description>{{ i18n "pages.xray.dnsLogDesc"}}</template>
  170. <template #control>
  171. <a-switch v-model="dnslog"></a-switch>
  172. </template>
  173. </a-setting-list-item>
  174. </a-collapse-panel>
  175. <a-collapse-panel key="4" header='{{ i18n "pages.xray.basicRouting"}}'>
  176. <a-row :xs="24" :sm="24" :lg="12">
  177. <a-alert type="warning" :style="{ textAlign: 'center' }">
  178. <template slot="message">
  179. <a-icon type="exclamation-circle" theme="filled"
  180. :style="{ color: '#FFA031' }"></a-icon>
  181. <span>{{ i18n "pages.xray.blockConfigsDesc" }}</span>
  182. </template>
  183. </a-alert>
  184. </a-row>
  185. <a-setting-list-item paddings="small" :style="{ marginBottom: '20px' }">
  186. <template #title>{{ i18n "pages.xray.Torrent"}}</template>
  187. <template #control>
  188. <a-switch v-model="torrentSettings"></a-switch>
  189. </template>
  190. </a-setting-list-item>
  191. <a-row :xs="24" :sm="24" :lg="12">
  192. <a-alert type="warning" :style="{ textAlign: 'center' }">
  193. <template slot="message">
  194. <a-icon type="exclamation-circle" theme="filled"
  195. :style="{ color: '#FFA031' }"></a-icon>
  196. <span>{{ i18n "pages.xray.blockConnectionsConfigsDesc"
  197. }}</span>
  198. </template>
  199. </a-alert>
  200. </a-row>
  201. <a-setting-list-item paddings="small">
  202. <template #title>{{ i18n "pages.xray.blockips" }}</template>
  203. <template #control>
  204. <a-select mode="tags" v-model="blockedIPs"
  205. :style="{ width: '100%' }"
  206. :dropdown-class-name="themeSwitcher.currentTheme">
  207. <a-select-option :value="p.value" :label="p.label"
  208. v-for="p in settingsData.IPsOptions">
  209. <span>[[ p.label ]]</span>
  210. </a-select-option>
  211. </a-select>
  212. </template>
  213. </a-setting-list-item>
  214. <a-setting-list-item paddings="small">
  215. <template #title>{{ i18n "pages.xray.blockdomains" }}</template>
  216. <template #control>
  217. <a-select mode="tags" v-model="blockedDomains"
  218. :style="{ width: '100%' }"
  219. :dropdown-class-name="themeSwitcher.currentTheme">
  220. <a-select-option :value="p.value" :label="p.label"
  221. v-for="p in settingsData.BlockDomainsOptions">
  222. <span>[[ p.label ]]</span>
  223. </a-select-option>
  224. </a-select>
  225. </template>
  226. </a-setting-list-item>
  227. <a-row :xs="24" :sm="24" :lg="12">
  228. <a-alert type="warning"
  229. :style="{ textAlign: 'center', marginTop: '20px' }">
  230. <template slot="message">
  231. <a-icon type="exclamation-circle" theme="filled"
  232. :style="{ color: '#FFA031' }"></a-icon>
  233. <span>{{ i18n "pages.xray.directConnectionsConfigsDesc"
  234. }}</span>
  235. </template>
  236. </a-alert>
  237. </a-row>
  238. <a-setting-list-item paddings="small">
  239. <template #title>{{ i18n "pages.xray.directips" }}</template>
  240. <template #control>
  241. <a-select mode="tags" :style="{ width: '100%' }"
  242. v-model="directIPs"
  243. :dropdown-class-name="themeSwitcher.currentTheme">
  244. <a-select-option :value="p.value" :label="p.label"
  245. v-for="p in settingsData.IPsOptions">
  246. <span>[[ p.label ]]</span>
  247. </a-select-option>
  248. </a-select>
  249. </template>
  250. </a-setting-list-item>
  251. <a-setting-list-item paddings="small">
  252. <template #title>{{ i18n "pages.xray.directdomains" }}</template>
  253. <template #control>
  254. <a-select mode="tags" :style="{ width: '100%' }"
  255. v-model="directDomains"
  256. :dropdown-class-name="themeSwitcher.currentTheme">
  257. <a-select-option :value="p.value" :label="p.label"
  258. v-for="p in settingsData.DomainsOptions">
  259. <span>[[ p.label ]]</span>
  260. </a-select-option>
  261. </a-select>
  262. </template>
  263. </a-setting-list-item>
  264. <a-row :xs="24" :sm="24" :lg="12">
  265. <a-alert type="warning"
  266. :style="{ textAlign: 'center', marginTop: '20px' }">
  267. <template slot="message">
  268. <a-icon type="exclamation-circle" theme="filled"
  269. :style="{ color: '#FFA031' }"></a-icon>
  270. <span>{{ i18n "pages.xray.ipv4RoutingDesc" }}</span>
  271. </template>
  272. </a-alert>
  273. </a-row>
  274. <a-setting-list-item paddings="small">
  275. <template #title>{{ i18n "pages.xray.ipv4Routing" }}</template>
  276. <template #control>
  277. <a-select mode="tags" :style="{ width: '100%' }"
  278. v-model="ipv4Domains"
  279. :dropdown-class-name="themeSwitcher.currentTheme">
  280. <a-select-option :value="p.value" :label="p.label"
  281. v-for="p in settingsData.ServicesOptions">
  282. <span>[[ p.label ]]</span>
  283. </a-select-option>
  284. </a-select>
  285. </template>
  286. </a-setting-list-item>
  287. <a-row :xs="24" :sm="24" :lg="12">
  288. <a-alert type="warning"
  289. :style="{ textAlign: 'center', marginTop: '20px' }">
  290. <template slot="message">
  291. <a-icon type="exclamation-circle" theme="filled"
  292. :style="{ color: '#FFA031' }"></a-icon>
  293. {{ i18n "pages.xray.warpRoutingDesc" }}
  294. </template>
  295. </a-alert>
  296. </a-row>
  297. <a-setting-list-item paddings="small">
  298. <template #title>{{ i18n "pages.xray.warpRouting" }}</template>
  299. <template #control>
  300. <template v-if="WarpExist">
  301. <a-select mode="tags" :style="{ width: '100%' }"
  302. v-model="warpDomains"
  303. :dropdown-class-name="themeSwitcher.currentTheme">
  304. <a-select-option :value="p.value" :label="p.label"
  305. v-for="p in settingsData.ServicesOptions">
  306. <span>[[ p.label ]]</span>
  307. </a-select-option>
  308. </a-select>
  309. </template>
  310. <template v-else>
  311. <a-button type="primary" icon="cloud"
  312. @click="showWarp()">WARP</a-button>
  313. </template>
  314. </template>
  315. </a-setting-list-item>
  316. </a-collapse-panel>
  317. <a-collapse-panel key="6"
  318. header='{{ i18n "pages.settings.resetDefaultConfig"}}'>
  319. <a-space direction="horizontal" :style="{ padding: '0 20px' }">
  320. <a-button type="danger" @click="resetXrayConfigToDefault">
  321. <span>{{ i18n "pages.settings.resetDefaultConfig" }}</span>
  322. </a-button>
  323. </a-space>
  324. </a-collapse-panel>
  325. </a-collapse>
  326. {{end}}