basics.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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.blockConfigs"}}'>
  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">
  148. <template #title>{{ i18n "pages.xray.Torrent"}}</template>
  149. <template #description>{{ i18n "pages.xray.TorrentDesc"}}</template>
  150. <template #control>
  151. <a-switch v-model="torrentSettings"></a-switch>
  152. </template>
  153. </a-setting-list-item>
  154. <a-setting-list-item paddings="small">
  155. <template #title>{{ i18n "pages.xray.Family"}}</template>
  156. <template #description>{{ i18n "pages.xray.FamilyDesc"}}</template>
  157. <template #control>
  158. <a-switch v-model="familyProtectSettings"></a-switch>
  159. </template>
  160. </a-setting-list-item>
  161. </a-collapse-panel>
  162. <a-collapse-panel key="5" header='{{ i18n "pages.xray.basicRouting"}}'>
  163. <a-row :xs="24" :sm="24" :lg="12">
  164. <a-alert type="warning" :style="{ textAlign: 'center' }">
  165. <template slot="message">
  166. <a-icon type="exclamation-circle" theme="filled" :style="{ color: '#FFA031' }"></a-icon>
  167. <span>{{ i18n "pages.xray.blockConnectionsConfigsDesc" }}</span>
  168. </template>
  169. </a-alert>
  170. </a-row>
  171. <a-setting-list-item paddings="small">
  172. <template #title>{{ i18n "pages.xray.blockips" }}</template>
  173. <template #control>
  174. <a-select mode="tags" v-model="blockedIPs" :style="{ width: '100%' }"
  175. :dropdown-class-name="themeSwitcher.currentTheme">
  176. <a-select-option :value="p.value" :label="p.label" v-for="p in settingsData.IPsOptions">
  177. <span>[[ p.label ]]</span>
  178. </a-select-option>
  179. </a-select>
  180. </template>
  181. </a-setting-list-item>
  182. <a-setting-list-item paddings="small">
  183. <template #title>{{ i18n "pages.xray.blockdomains" }}</template>
  184. <template #control>
  185. <a-select mode="tags" v-model="blockedDomains" :style="{ width: '100%' }"
  186. :dropdown-class-name="themeSwitcher.currentTheme">
  187. <a-select-option :value="p.value" :label="p.label" v-for="p in settingsData.BlockDomainsOptions">
  188. <span>[[ p.label ]]</span>
  189. </a-select-option>
  190. </a-select>
  191. </template>
  192. </a-setting-list-item>
  193. <a-row :xs="24" :sm="24" :lg="12">
  194. <a-alert type="warning" :style="{ textAlign: 'center', marginTop: '20px' }">
  195. <template slot="message">
  196. <a-icon type="exclamation-circle" theme="filled" :style="{ color: '#FFA031' }"></a-icon>
  197. <span>{{ i18n "pages.xray.directConnectionsConfigsDesc" }}</span>
  198. </template>
  199. </a-alert>
  200. </a-row>
  201. <a-setting-list-item paddings="small">
  202. <template #title>{{ i18n "pages.xray.directips" }}</template>
  203. <template #control>
  204. <a-select mode="tags" :style="{ width: '100%' }" v-model="directIPs"
  205. :dropdown-class-name="themeSwitcher.currentTheme">
  206. <a-select-option :value="p.value" :label="p.label" v-for="p in settingsData.IPsOptions">
  207. <span>[[ p.label ]]</span>
  208. </a-select-option>
  209. </a-select>
  210. </template>
  211. </a-setting-list-item>
  212. <a-setting-list-item paddings="small">
  213. <template #title>{{ i18n "pages.xray.directdomains" }}</template>
  214. <template #control>
  215. <a-select mode="tags" :style="{ width: '100%' }" v-model="directDomains"
  216. :dropdown-class-name="themeSwitcher.currentTheme">
  217. <a-select-option :value="p.value" :label="p.label" v-for="p in settingsData.DomainsOptions">
  218. <span>[[ p.label ]]</span>
  219. </a-select-option>
  220. </a-select>
  221. </template>
  222. </a-setting-list-item>
  223. <a-row :xs="24" :sm="24" :lg="12">
  224. <a-alert type="warning" :style="{ textAlign: 'center', marginTop: '20px' }">
  225. <template slot="message">
  226. <a-icon type="exclamation-circle" theme="filled" :style="{ color: '#FFA031' }"></a-icon>
  227. <span>{{ i18n "pages.xray.ipv4RoutingDesc" }}</span>
  228. </template>
  229. </a-alert>
  230. </a-row>
  231. <a-setting-list-item paddings="small">
  232. <template #title>{{ i18n "pages.xray.ipv4Routing" }}</template>
  233. <template #control>
  234. <a-select mode="tags" :style="{ width: '100%' }" v-model="ipv4Domains"
  235. :dropdown-class-name="themeSwitcher.currentTheme">
  236. <a-select-option :value="p.value" :label="p.label" v-for="p in settingsData.ServicesOptions">
  237. <span>[[ p.label ]]</span>
  238. </a-select-option>
  239. </a-select>
  240. </template>
  241. </a-setting-list-item>
  242. <a-row :xs="24" :sm="24" :lg="12">
  243. <a-alert type="warning" :style="{ textAlign: 'center', marginTop: '20px' }">
  244. <template slot="message">
  245. <a-icon type="exclamation-circle" theme="filled" :style="{ color: '#FFA031' }"></a-icon>
  246. {{ i18n "pages.xray.warpRoutingDesc" }}
  247. </template>
  248. </a-alert>
  249. </a-row>
  250. <a-setting-list-item paddings="small">
  251. <template #title>{{ i18n "pages.xray.warpRouting" }}</template>
  252. <template #control>
  253. <template v-if="WarpExist">
  254. <a-select mode="tags" :style="{ width: '100%' }" v-model="warpDomains"
  255. :dropdown-class-name="themeSwitcher.currentTheme">
  256. <a-select-option :value="p.value" :label="p.label" v-for="p in settingsData.ServicesOptions">
  257. <span>[[ p.label ]]</span>
  258. </a-select-option>
  259. </a-select>
  260. </template>
  261. <template v-else>
  262. <a-button type="primary" icon="cloud" @click="showWarp()">WARP</a-button>
  263. </template>
  264. </template>
  265. </a-setting-list-item>
  266. </a-collapse-panel>
  267. <a-collapse-panel key="6" header='{{ i18n "pages.settings.resetDefaultConfig"}}'>
  268. <a-space direction="horizontal" :style="{ padding: '0 20px' }">
  269. <a-button type="danger" @click="resetXrayConfigToDefault">
  270. <span>{{ i18n "pages.settings.resetDefaultConfig" }}</span>
  271. </a-button>
  272. </a-space>
  273. </a-collapse-panel>
  274. </a-collapse>
  275. {{end}}