1
0

basics.html 14 KB

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