2025-03-24 09:57:37 +00:00
|
|
|
{{define "modals/inboundInfoModal"}}
|
2025-04-10 14:34:25 +00:00
|
|
|
<a-modal id="inbound-info-modal" v-model="infoModal.visible" title='{{ i18n "pages.inbounds.details"}}' :closable="true"
|
|
|
|
:mask-closable="true" :footer="null" width="600px" :class="themeSwitcher.currentTheme">
|
|
|
|
<a-space direction='vertical' size="middle">
|
|
|
|
<a-custom-descriptions title='{{ i18n "pages.inbounds.info"}}' layout="vertical" size="small" :column="2">
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.inbounds.address" }}' :span="2">
|
|
|
|
<span>[[ dbInbound.address ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "protocol" }}' :span="1">
|
|
|
|
<a-tag color="purple">
|
|
|
|
<span>[[ dbInbound.protocol ]]</span>
|
|
|
|
</a-tag>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.inbounds.port" }}' :span="1">
|
|
|
|
<span>[[ dbInbound.port ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<template v-if="dbInbound.isVMess || dbInbound.isVLess || dbInbound.isTrojan || dbInbound.isSS" layout="vertical"
|
|
|
|
size="small" :column="2">
|
|
|
|
<a-descriptions-item label='{{ i18n "transmission" }}' :span="2">
|
|
|
|
<span>[[ inbound.network ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<template v-if="inbound.isTcp || inbound.isWs || inbound.isHttpupgrade || inbound.isXHTTP">
|
|
|
|
<a-descriptions-item label='{{ i18n "host" }}' :span="1">
|
|
|
|
<span>[[ inbound.host || '{{ i18n "none" }}' ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "path" }}' :span="1">
|
|
|
|
<span>[[ inbound.path || '{{ i18n "none" }}' ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</template>
|
|
|
|
<template v-if="inbound.isXHTTP">
|
|
|
|
<a-descriptions-item label="Mode" :span="2">
|
|
|
|
<span>[[ inbound.stream.xhttp.mode ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</template>
|
|
|
|
<template v-if="inbound.isKcp">
|
|
|
|
<a-descriptions-item label='kcp {{ i18n "encryption" }}' :span="1">
|
|
|
|
<span>[[ inbound.kcpType ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='kcp {{ i18n "password" }}' :span="1">
|
|
|
|
<span>[[ inbound.kcpSeed ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</template>
|
|
|
|
<template v-if="inbound.isGrpc">
|
|
|
|
<a-descriptions-item label="grpc serviceName" :span="1">
|
|
|
|
<span>[[ inbound.serviceName ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label="grpc multiMode" :span="1">
|
|
|
|
<a-switch :checked="inbound.stream.grpc.multiMode" disabled></a-switch>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</template>
|
|
|
|
<a-descriptions-item v-if="dbInbound.hasLink()" label='{{ i18n "security" }}' :span="2">
|
|
|
|
<a-tag :color="inbound.stream.security == 'none' ? 'red' : 'green'">
|
|
|
|
<span>[[ inbound.stream.security ]]</span>
|
|
|
|
</a-tag>
|
|
|
|
<br />
|
|
|
|
<template v-if="inbound.stream.security != 'none'">
|
|
|
|
<span>{{ i18n "domainName" }}: </span>
|
|
|
|
<a-tag v-if="inbound.serverName" :color="inbound.serverName ? 'green' : 'orange'">
|
|
|
|
<span>[[ inbound.serverName ? inbound.serverName : '' ]]</span>
|
|
|
|
</a-tag>
|
|
|
|
<a-tag v-else color="orange">
|
|
|
|
<span>{{ i18n "none" }}</span>
|
|
|
|
</a-tag>
|
2024-04-20 18:45:36 +00:00
|
|
|
</template>
|
2025-04-10 14:34:25 +00:00
|
|
|
</a-descriptions-item>
|
2024-04-20 18:45:36 +00:00
|
|
|
</template>
|
2025-04-10 14:34:25 +00:00
|
|
|
<template v-if="dbInbound.isSS">
|
|
|
|
<a-descriptions-item label='{{ i18n "encryption" }}' :span="1">
|
|
|
|
<span>[[ inbound.settings.method ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.inbounds.network" }}' :span="1">
|
|
|
|
<span>[[ inbound.settings.network ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-if="inbound.isSS2022" label='{{ i18n "password" }}' :span="2">
|
|
|
|
<span>[[ inbound.settings.password ]]</span>
|
|
|
|
</a-descriptions-item>
|
2024-04-20 18:45:36 +00:00
|
|
|
</template>
|
2025-04-10 14:34:25 +00:00
|
|
|
</a-custom-descriptions>
|
2024-04-20 18:45:36 +00:00
|
|
|
<template v-if="infoModal.clientSettings">
|
2025-04-10 14:34:25 +00:00
|
|
|
<a-custom-descriptions title='{{ i18n "pages.inbounds.client" }}' layout="vertical" size="small" :column="2">
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.inbounds.email" }}' :span="2">
|
|
|
|
<span>[[ infoModal.clientSettings.email || '{{ i18n "none" }}' ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-if="infoModal.clientSettings.id" label='ID' :span="2">
|
|
|
|
<a-tag>[[ infoModal.clientSettings.id ]]</a-tag>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-if="dbInbound.isVMess" label='{{ i18n "security" }}' :span="2">
|
|
|
|
<a-tag>[[ infoModal.clientSettings.security ]]</a-tag>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-if="infoModal.inbound.canEnableTlsFlow()" label='Flow' :span="2">
|
|
|
|
<template v-if="infoModal.clientSettings.flow">
|
2024-04-20 18:45:36 +00:00
|
|
|
<a-tag>[[ infoModal.clientSettings.flow ]]</a-tag>
|
2025-04-10 14:34:25 +00:00
|
|
|
</template>
|
|
|
|
<template v-else>
|
2024-04-20 18:45:36 +00:00
|
|
|
<a-tag color="orange">{{ i18n "none" }}</a-tag>
|
2025-04-10 14:34:25 +00:00
|
|
|
</template>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-if="infoModal.clientSettings.password" label='{{ i18n "password" }}' :span="2">
|
|
|
|
<span>[[ infoModal.clientSettings.password ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "status" }}' :span="infoModal.clientStats ? 1 : 2">
|
|
|
|
<a-tag v-if="isEnable" color="green">{{ i18n "enabled" }}</a-tag>
|
|
|
|
<a-tag v-else>{{ i18n "disabled" }}</a-tag>
|
|
|
|
<a-tag v-if="!isActive" color="red">{{ i18n "depleted" }}</a-tag>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-if="infoModal.clientStats" label='{{ i18n "usage" }}' :span="1">
|
|
|
|
<a-space direction="horizontal">
|
|
|
|
<a-tag color="green">
|
|
|
|
<span>[[ SizeFormatter.sizeFormat(infoModal.clientStats.up + infoModal.clientStats.down) ]]</span>
|
2024-04-20 18:45:36 +00:00
|
|
|
</a-tag>
|
2025-04-10 14:34:25 +00:00
|
|
|
<a-tag>
|
|
|
|
<span>↑ [[ SizeFormatter.sizeFormat(infoModal.clientStats.up) ]] / [[
|
|
|
|
SizeFormatter.sizeFormat(infoModal.clientStats.down) ]] ↓</span>
|
2024-04-20 18:45:36 +00:00
|
|
|
</a-tag>
|
2025-04-10 14:34:25 +00:00
|
|
|
</a-space>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-if="infoModal.clientSettings.comment" label='{{ i18n "comment" }}' :span="2">
|
|
|
|
<span>[[ infoModal.clientSettings.comment ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-if="app.ipLimitEnable" label='{{ i18n "pages.inbounds.IPLimit" }}' :span="2">
|
|
|
|
<span>[[ infoModal.clientSettings.limitIp ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-if="app.ipLimitEnable" label='{{ i18n "pages.inbounds.IPLimitlog" }}' :span="2">
|
|
|
|
<a-tag>[[ infoModal.clientIps ]]</a-tag>
|
|
|
|
<a-icon type="sync" :spin="refreshing" @click="refreshIPs" :style="{ margin: '0 5px' }"></a-icon>
|
|
|
|
<a-tooltip :title="[[ dbInbound.address ]]">
|
|
|
|
<template slot="title">
|
|
|
|
<span>{{ i18n "pages.inbounds.IPLimitlogclear" }}</span>
|
|
|
|
</template>
|
|
|
|
<a-icon type="delete" @click="clearClientIps"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-if="app.tgBotEnable && infoModal.clientSettings.tgId" :span="2">
|
|
|
|
<template #label>
|
|
|
|
<a-space direction="horizontal">
|
|
|
|
<span>Telegram ChatID</span>
|
|
|
|
<a-tooltip title='{{ i18n "copy" }}'>
|
|
|
|
<a-icon type="snippets" @click="copy(infoModal.clientSettings.tgId)"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</a-space>
|
|
|
|
</template>
|
|
|
|
<span>[[ infoModal.clientSettings.tgId ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
|
|
|
<a-custom-descriptions title="Usage" layout="vertical" size="small" :column="3">
|
|
|
|
<a-descriptions-item label='{{ i18n "remained" }}' :span="1">
|
|
|
|
<a-tag v-if="infoModal.clientStats && infoModal.clientSettings.totalGB > 0"
|
|
|
|
:color="statsColor(infoModal.clientStats)"> [[ getRemStats() ]] </a-tag>
|
|
|
|
<a-tag v-else color="purple">-</a-tag>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.inbounds.totalFlow" }}' :span="1">
|
|
|
|
<a-tag v-if="infoModal.clientSettings.totalGB > 0" :color="statsColor(infoModal.clientStats)"> [[
|
|
|
|
SizeFormatter.sizeFormat(infoModal.clientSettings.totalGB) ]] </a-tag>
|
|
|
|
<a-tag v-else color="purple" class="infinite-tag">
|
|
|
|
<svg height="10px" width="14px" viewBox="0 0 640 512" fill="currentColor">
|
|
|
|
<path
|
|
|
|
d="M484.4 96C407 96 349.2 164.1 320 208.5C290.8 164.1 233 96 155.6 96C69.75 96 0 167.8 0 256s69.75 160 155.6 160C233.1 416 290.8 347.9 320 303.5C349.2 347.9 407 416 484.4 416C570.3 416 640 344.2 640 256S570.3 96 484.4 96zM155.6 368C96.25 368 48 317.8 48 256s48.25-112 107.6-112c67.75 0 120.5 82.25 137.1 112C276 285.8 223.4 368 155.6 368zM484.4 368c-67.75 0-120.5-82.25-137.1-112C364 226.2 416.6 144 484.4 144C543.8 144 592 194.2 592 256S543.8 368 484.4 368z"
|
|
|
|
fill="currentColor"></path>
|
|
|
|
</svg>
|
|
|
|
</a-tag>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.inbounds.expireDate" }}' :span="1">
|
|
|
|
<template v-if="infoModal.clientSettings.expiryTime > 0">
|
|
|
|
<a-tag
|
|
|
|
:color="ColorUtils.usageColor(new Date().getTime(), app.expireDiff, infoModal.clientSettings.expiryTime)">
|
|
|
|
<template v-if="app.datepicker === 'gregorian'">
|
|
|
|
[[ DateUtil.formatMillis(infoModal.clientSettings.expiryTime) ]]
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
[[ DateUtil.convertToJalalian(moment(infoModal.clientSettings.expiryTime)) ]]
|
|
|
|
</template>
|
2024-04-20 18:45:36 +00:00
|
|
|
</a-tag>
|
2025-04-10 14:34:25 +00:00
|
|
|
</template>
|
|
|
|
<a-tag v-else-if="infoModal.clientSettings.expiryTime < 0" color="green">[[
|
|
|
|
infoModal.clientSettings.expiryTime / -86400000 ]] {{ i18n "pages.client.days" }}
|
|
|
|
</a-tag>
|
|
|
|
<a-tag v-else color="purple" class="infinite-tag">
|
|
|
|
<svg height="10px" width="14px" viewBox="0 0 640 512" fill="currentColor">
|
|
|
|
<path
|
|
|
|
d="M484.4 96C407 96 349.2 164.1 320 208.5C290.8 164.1 233 96 155.6 96C69.75 96 0 167.8 0 256s69.75 160 155.6 160C233.1 416 290.8 347.9 320 303.5C349.2 347.9 407 416 484.4 416C570.3 416 640 344.2 640 256S570.3 96 484.4 96zM155.6 368C96.25 368 48 317.8 48 256s48.25-112 107.6-112c67.75 0 120.5 82.25 137.1 112C276 285.8 223.4 368 155.6 368zM484.4 368c-67.75 0-120.5-82.25-137.1-112C364 226.2 416.6 144 484.4 144C543.8 144 592 194.2 592 256S543.8 368 484.4 368z"
|
|
|
|
fill="currentColor"></path>
|
|
|
|
</svg>
|
|
|
|
</a-tag>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
2024-04-20 18:45:36 +00:00
|
|
|
<template v-if="app.subSettings.enable && infoModal.clientSettings.subId">
|
2025-04-10 14:34:25 +00:00
|
|
|
<a-custom-descriptions title="Subscription URL" layout="vertical" size="small" :column="1">
|
|
|
|
<a-descriptions-item v-for="(link,index) in infoModal.links">
|
|
|
|
<template #label>
|
|
|
|
<a-space direction="horizontal">
|
|
|
|
<span>Subscription Link</span>
|
|
|
|
<a-tooltip title='{{ i18n "copy" }}'>
|
|
|
|
<a-icon type="snippets" @click="copy(infoModal.subLink)"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</a-space>
|
|
|
|
</template>
|
|
|
|
<a :href="[[ infoModal.subLink ]]" target="_blank">[[ infoModal.subLink ]]</a>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item v-for="(link,index) in infoModal.links">
|
|
|
|
<template #label>
|
|
|
|
<a-space direction="horizontal">
|
|
|
|
<span>Json Link</span>
|
|
|
|
<a-tooltip title='{{ i18n "copy" }}'>
|
|
|
|
<a-icon type="snippets" @click="copy(infoModal.subJsonLink)"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</a-space>
|
|
|
|
</template>
|
|
|
|
<a :href="[[ infoModal.subJsonLink ]]" target="_blank">[[ infoModal.subJsonLink ]]</a>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
2024-04-20 18:45:36 +00:00
|
|
|
</template>
|
|
|
|
<template v-if="dbInbound.hasLink()">
|
2025-04-10 14:34:25 +00:00
|
|
|
<a-custom-descriptions title="URL" layout="vertical" size="small" :column="1">
|
|
|
|
<a-descriptions-item v-for="(link,index) in infoModal.links">
|
|
|
|
<template #label>
|
|
|
|
<a-space direction="horizontal">
|
|
|
|
<span>[[ link.remark ]]</span>
|
|
|
|
<a-tooltip title='{{ i18n "copy" }}'>
|
|
|
|
<a-icon type="snippets" @click="copy(link.link)"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</a-space>
|
|
|
|
</template>
|
|
|
|
<code>[[ link.link ]]</code>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
2024-04-20 18:45:36 +00:00
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
<template v-if="dbInbound.isSS && !inbound.isSSMultiUser">
|
2025-04-10 14:34:25 +00:00
|
|
|
<a-custom-descriptions title="URL" layout="vertical" size="small" :column="1">
|
|
|
|
<a-descriptions-item v-for="(link,index) in infoModal.links">
|
|
|
|
<template #label>
|
|
|
|
<a-space direction="horizontal">
|
|
|
|
<span>[[ link.remark ]]</span>
|
|
|
|
<a-tooltip title='{{ i18n "copy" }}'>
|
|
|
|
<a-icon type="snippets" @click="copy(link.link)"></a-icon>
|
|
|
|
</a-tooltip>
|
|
|
|
</a-space>
|
|
|
|
</template>
|
|
|
|
<code>[[ link.link ]]</code>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
2024-04-20 18:45:36 +00:00
|
|
|
</template>
|
2025-04-10 14:34:25 +00:00
|
|
|
<template v-if="inbound.protocol == Protocols.DOKODEMO">
|
|
|
|
<a-custom-descriptions layout="vertical" size="small" :column="2">
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.inbounds.targetAddress" }}' :span="1">
|
2024-04-20 18:45:36 +00:00
|
|
|
<a-tag color="green">[[ inbound.settings.address ]]</a-tag>
|
2025-04-10 14:34:25 +00:00
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.inbounds.destinationPort" }}' :span="1">
|
2024-04-20 18:45:36 +00:00
|
|
|
<a-tag color="green">[[ inbound.settings.port ]]</a-tag>
|
2025-04-10 14:34:25 +00:00
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.inbounds.network" }}' :span="1">
|
2024-04-20 18:45:36 +00:00
|
|
|
<a-tag color="green">[[ inbound.settings.network ]]</a-tag>
|
2025-04-10 14:34:25 +00:00
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='FollowRedirect' :span="1">
|
|
|
|
<a-switch :checked="inbound.settings.followRedirect" disabled></a-switch>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
|
|
|
</template>
|
|
|
|
<template v-if="dbInbound.isSocks">
|
|
|
|
<a-custom-descriptions layout="vertical" size="small" :column="3">
|
|
|
|
<a-descriptions-item label='{{ i18n "password" }} Auth' :span="1">
|
2024-04-20 18:45:36 +00:00
|
|
|
<a-tag color="green">[[ inbound.settings.auth ]]</a-tag>
|
2025-04-10 14:34:25 +00:00
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.inbounds.enable" }} UDP' :span="1">
|
|
|
|
<a-switch :checked="inbound.settings.udp" disabled></a-switch>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='IP' :span="1">
|
|
|
|
<span>[[ inbound.settings.ip ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
|
|
|
<a-custom-descriptions title="Users" v-if="inbound.settings.auth == 'password'" layout="vertical" size="small"
|
|
|
|
:column="3">
|
|
|
|
<a-descriptions-item label="#" :span="1">
|
|
|
|
<template v-for="account,index in inbound.settings.accounts">
|
|
|
|
<span>[[ index + 1 ]]</span>
|
|
|
|
<br />
|
|
|
|
</template>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "username" }}' :span="1">
|
|
|
|
<template v-for="account,index in inbound.settings.accounts">
|
|
|
|
<span>[[ account.user ]]</span>
|
|
|
|
<br />
|
|
|
|
</template>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "password" }}' :span="1">
|
|
|
|
<template v-for="account,index in inbound.settings.accounts">
|
|
|
|
<span>[[ account.pass || '-' ]]</span>
|
|
|
|
<br />
|
|
|
|
</template>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
|
|
|
</template>
|
|
|
|
<template v-if="dbInbound.isHTTP">
|
|
|
|
<a-custom-descriptions title="Users" layout="vertical" size="small" :column="3">
|
|
|
|
<a-descriptions-item label="#" :span="1">
|
|
|
|
<template v-for="account,index in inbound.settings.accounts">
|
|
|
|
<span>[[ index + 1 ]]</span>
|
|
|
|
<br />
|
|
|
|
</template>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "username" }}' :span="1">
|
|
|
|
<template v-for="account,index in inbound.settings.accounts">
|
|
|
|
<span>[[ account.user ]]</span>
|
|
|
|
<br />
|
|
|
|
</template>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "password" }}' :span="1">
|
|
|
|
<template v-for="account,index in inbound.settings.accounts">
|
|
|
|
<span>[[ account.pass ]]</span>
|
|
|
|
<br />
|
|
|
|
</template>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
|
|
|
</template>
|
|
|
|
<template v-if="dbInbound.isWireguard">
|
|
|
|
<a-custom-descriptions layout="vertical" size="small" :column="2">
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.xray.wireguard.secretKey" }}' :span="2">
|
|
|
|
<span>[[ inbound.settings.secretKey ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.xray.wireguard.publicKey" }}' :span="2">
|
|
|
|
<span>[[ inbound.settings.pubKey ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='MTU' :span="1">
|
|
|
|
<span>[[ inbound.settings.mtu ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='No Kernel Tun' :span="1">
|
|
|
|
<a-switch :checked="inbound.settings.noKernelTun" disabled></a-switch>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
2024-04-20 18:45:36 +00:00
|
|
|
<template v-for="(peer, index) in inbound.settings.peers">
|
2025-04-10 14:34:25 +00:00
|
|
|
<a-custom-descriptions :title="`Peer ${index + 1}`" layout="vertical" size="small" :column="1">
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.xray.wireguard.secretKey" }}'>
|
|
|
|
<span>[[ peer.privateKey ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.xray.wireguard.publicKey" }}'>
|
|
|
|
<span>[[ peer.publicKey ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.xray.wireguard.psk" }}' v-if="peer.psk">
|
|
|
|
<span>[[ peer.psk ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='{{ i18n "pages.xray.wireguard.allowedIPs" }}'>
|
|
|
|
<span>[[ peer.allowedIPs.join(",") ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item label='Keep Alive'>
|
|
|
|
<span>[[ peer.keepAlive ]]</span>
|
|
|
|
</a-descriptions-item>
|
|
|
|
<a-descriptions-item>
|
|
|
|
<template #label>
|
|
|
|
<a-space direction="horizontal">
|
|
|
|
<span>Config</span>
|
2024-04-20 18:45:36 +00:00
|
|
|
<a-tooltip title='{{ i18n "copy" }}'>
|
2025-04-10 14:34:25 +00:00
|
|
|
<a-icon type="snippets" @click="copy(infoModal.links[index])"></a-icon>
|
2024-04-20 18:45:36 +00:00
|
|
|
</a-tooltip>
|
2025-04-10 14:34:25 +00:00
|
|
|
</a-space>
|
|
|
|
</template>
|
|
|
|
<div v-html="infoModal.links[index].replaceAll(`\n`,`<br />`)" :style="{ fontFamily: 'monospace' }"></div>
|
|
|
|
</a-descriptions-item>
|
|
|
|
</a-custom-descriptions>
|
|
|
|
</template>
|
|
|
|
</template>
|
2023-03-17 16:07:49 +00:00
|
|
|
</template>
|
2025-04-10 14:34:25 +00:00
|
|
|
</a-space>
|
2023-02-09 19:18:06 +00:00
|
|
|
</a-modal>
|
2025-04-10 14:34:25 +00:00
|
|
|
|
2023-02-09 19:18:06 +00:00
|
|
|
<script>
|
2024-12-20 17:34:30 +00:00
|
|
|
function refreshIPs(email) {
|
|
|
|
return HttpUtil.post(`/panel/inbound/clientIps/${email}`).then((msg) => {
|
|
|
|
if (msg.success) {
|
|
|
|
try {
|
|
|
|
return JSON.parse(msg.obj).join(', ');
|
|
|
|
} catch (e) {
|
|
|
|
return msg.obj;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-04-20 18:45:36 +00:00
|
|
|
const infoModal = {
|
|
|
|
visible: false,
|
|
|
|
inbound: new Inbound(),
|
|
|
|
dbInbound: new DBInbound(),
|
|
|
|
clientSettings: null,
|
|
|
|
clientStats: [],
|
|
|
|
upStats: 0,
|
|
|
|
downStats: 0,
|
|
|
|
links: [],
|
|
|
|
index: null,
|
|
|
|
isExpired: false,
|
|
|
|
subLink: '',
|
|
|
|
subJsonLink: '',
|
2024-12-20 17:34:30 +00:00
|
|
|
clientIps: '',
|
2024-04-20 18:45:36 +00:00
|
|
|
show(dbInbound, index) {
|
|
|
|
this.index = index;
|
|
|
|
this.inbound = dbInbound.toInbound();
|
|
|
|
this.dbInbound = new DBInbound(dbInbound);
|
|
|
|
this.clientSettings = this.inbound.clients ? this.inbound.clients[index] : null;
|
|
|
|
this.isExpired = this.inbound.clients ? this.inbound.isExpiry(index) : this.dbInbound.isExpiry;
|
|
|
|
this.clientStats = this.inbound.clients ? this.dbInbound.clientStats.find(row => row.email === this.clientSettings.email) : [];
|
2024-12-20 17:34:30 +00:00
|
|
|
|
|
|
|
if (app.ipLimitEnable && this.clientSettings.limitIp) {
|
|
|
|
refreshIPs(this.clientStats.email).then((ips) => {
|
|
|
|
this.clientIps = ips;
|
|
|
|
})
|
|
|
|
}
|
2024-04-20 18:45:36 +00:00
|
|
|
if (this.inbound.protocol == Protocols.WIREGUARD) {
|
|
|
|
this.links = this.inbound.genInboundLinks(dbInbound.remark).split('\r\n')
|
|
|
|
} else {
|
|
|
|
this.links = this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, this.clientSettings);
|
|
|
|
}
|
|
|
|
if (this.clientSettings) {
|
|
|
|
if (this.clientSettings.subId) {
|
|
|
|
this.subLink = this.genSubLink(this.clientSettings.subId);
|
|
|
|
this.subJsonLink = this.genSubJsonLink(this.clientSettings.subId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.visible = true;
|
|
|
|
},
|
|
|
|
close() {
|
|
|
|
infoModal.visible = false;
|
|
|
|
},
|
|
|
|
genSubLink(subID) {
|
|
|
|
return app.subSettings.subURI + subID;
|
|
|
|
},
|
|
|
|
genSubJsonLink(subID) {
|
|
|
|
return app.subSettings.subJsonURI + subID;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
const infoModalApp = new Vue({
|
|
|
|
delimiters: ['[[', ']]'],
|
|
|
|
el: '#inbound-info-modal',
|
|
|
|
data: {
|
|
|
|
infoModal,
|
2024-12-20 17:34:30 +00:00
|
|
|
refreshing: false,
|
2024-04-20 18:45:36 +00:00
|
|
|
get dbInbound() {
|
|
|
|
return this.infoModal.dbInbound;
|
|
|
|
},
|
|
|
|
get inbound() {
|
|
|
|
return this.infoModal.inbound;
|
|
|
|
},
|
|
|
|
get isActive() {
|
|
|
|
if (infoModal.clientStats) {
|
|
|
|
return infoModal.clientStats.enable;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
},
|
|
|
|
get isEnable() {
|
|
|
|
if (infoModal.clientSettings) {
|
|
|
|
return infoModal.clientSettings.enable;
|
2023-05-22 14:01:41 +00:00
|
|
|
}
|
2024-04-20 18:45:36 +00:00
|
|
|
return infoModal.dbInbound.isEnable;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
2025-03-07 07:27:33 +00:00
|
|
|
copy(content) {
|
|
|
|
ClipboardManager
|
|
|
|
.copyText(content)
|
|
|
|
.then(() => {
|
|
|
|
app.$message.success('{{ i18n "copied" }}')
|
|
|
|
})
|
2024-04-20 18:45:36 +00:00
|
|
|
},
|
|
|
|
statsColor(stats) {
|
2025-03-07 09:07:23 +00:00
|
|
|
return ColorUtils.usageColor(stats.up + stats.down, app.trafficDiff, stats.total);
|
2024-04-20 18:45:36 +00:00
|
|
|
},
|
|
|
|
getRemStats() {
|
|
|
|
remained = this.infoModal.clientStats.total - this.infoModal.clientStats.up - this.infoModal.clientStats.down;
|
2025-03-07 09:07:23 +00:00
|
|
|
return remained > 0 ? SizeFormatter.sizeFormat(remained) : '-';
|
2024-04-20 18:45:36 +00:00
|
|
|
},
|
2024-12-20 17:34:30 +00:00
|
|
|
refreshIPs() {
|
|
|
|
this.refreshing = true;
|
|
|
|
refreshIPs(this.infoModal.clientStats.email)
|
|
|
|
.then((ips) => {
|
|
|
|
this.infoModal.clientIps = ips;
|
|
|
|
})
|
|
|
|
.finally(() => {
|
|
|
|
this.refreshing = false;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
clearClientIps() {
|
|
|
|
HttpUtil.post(`/panel/inbound/clearClientIps/${this.infoModal.clientStats.email}`)
|
|
|
|
.then((msg) => {
|
|
|
|
if (!msg.success) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.infoModal.clientIps = 'No IP Record';
|
|
|
|
})
|
2025-04-10 14:34:25 +00:00
|
|
|
.catch(() => { });
|
2024-12-20 17:34:30 +00:00
|
|
|
},
|
2024-04-20 18:45:36 +00:00
|
|
|
},
|
|
|
|
});
|
2023-02-09 19:18:06 +00:00
|
|
|
</script>
|
2025-04-10 14:34:25 +00:00
|
|
|
{{end}}
|