1
0

outbounds.html 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {{define "settings/xray/outbounds"}}
  2. <a-space direction="vertical" size="middle">
  3. <a-row>
  4. <a-col :xs="12" :sm="12" :lg="12">
  5. <a-space direction="horizontal" size="small">
  6. <a-button type="primary" icon="plus" @click="addOutbound()">
  7. {{ i18n "pages.xray.outbound.addOutbound" }}
  8. </a-button>
  9. <a-button type="primary" icon="cloud" @click="showWarp()">WARP</a-button>
  10. </a-space>
  11. </a-col>
  12. <a-col :xs="12" :sm="12" :lg="12" :style="{ textAlign: 'right' }">
  13. <a-button-group>
  14. <a-button icon="sync" @click="refreshOutboundTraffic()" :loading="refreshing"></a-button>
  15. <a-popconfirm placement="topRight" @confirm="resetOutboundTraffic(-1)"
  16. title='{{ i18n "pages.inbounds.resetTrafficContent"}}' :overlay-class-name="themeSwitcher.currentTheme"
  17. ok-text='{{ i18n "reset"}}' cancel-text='{{ i18n "cancel"}}'>
  18. <a-icon slot="icon" type="question-circle-o"
  19. :style="{ color: themeSwitcher.isDarkTheme ? '#008771' : '#008771' }"></a-icon>
  20. <a-button icon="retweet"></a-button>
  21. </a-popconfirm>
  22. </a-button-group>
  23. </a-col>
  24. </a-row>
  25. <a-table :columns="outboundColumns" bordered :row-key="r => r.key" :data-source="outboundData"
  26. :scroll="isMobile ? {} : { x: 800 }" :pagination="false" :indent-size="0">
  27. <template slot="action" slot-scope="text, outbound, index">
  28. <span>[[ index+1 ]]</span>
  29. <a-dropdown :trigger="['click']">
  30. <a-icon @click="e => e.preventDefault()" type="more"
  31. :style="{ fontSize: '16px', textDecoration: 'bold' }"></a-icon>
  32. <a-menu slot="overlay" :theme="themeSwitcher.currentTheme">
  33. <a-menu-item v-if="index>0" @click="setFirstOutbound(index)">
  34. <a-icon type="vertical-align-top"></a-icon>
  35. <span>{{ i18n "pages.xray.rules.first"}}</span>
  36. </a-menu-item>
  37. <a-menu-item @click="editOutbound(index)">
  38. <a-icon type="edit"></a-icon>
  39. <span>{{ i18n "edit" }}</span>
  40. </a-menu-item>
  41. <a-menu-item @click="resetOutboundTraffic(index)">
  42. <span>
  43. <a-icon type="retweet"></a-icon>
  44. <span>{{ i18n "pages.inbounds.resetTraffic"}}</span>
  45. </span>
  46. </a-menu-item>
  47. <a-menu-item @click="deleteOutbound(index)">
  48. <span :style="{ color: '#FF4D4F' }">
  49. <a-icon type="delete"></a-icon>
  50. <span>{{ i18n "delete"}}</span>
  51. </span>
  52. </a-menu-item>
  53. </a-menu>
  54. </a-dropdown>
  55. </template>
  56. <template slot="address" slot-scope="text, outbound, index">
  57. <p :style="{ margin: '0 5px' }" v-for="addr in findOutboundAddress(outbound)">[[ addr ]]</p>
  58. </template>
  59. <template slot="protocol" slot-scope="text, outbound, index">
  60. <a-tag :style="{ margin: '0' }" color="purple">[[ outbound.protocol ]]</a-tag>
  61. <template
  62. v-if="[Protocols.VMess, Protocols.VLESS, Protocols.Trojan, Protocols.Shadowsocks].includes(outbound.protocol)">
  63. <a-tag :style="{ margin: '0' }" color="blue">[[ outbound.streamSettings.network ]]</a-tag>
  64. <a-tag :style="{ margin: '0' }" v-if="outbound.streamSettings.security=='tls'" color="green">tls</a-tag>
  65. <a-tag :style="{ margin: '0' }" v-if="outbound.streamSettings.security=='reality'"
  66. color="green">reality</a-tag>
  67. </template>
  68. </template>
  69. <template slot="traffic" slot-scope="text, outbound, index">
  70. <a-tag color="green">[[ findOutboundTraffic(outbound) ]]</a-tag>
  71. </template>
  72. </a-table>
  73. </a-space>
  74. {{end}}