basics.html 15 KB

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