fix(admin-frontend): 修复节点权限组保存与协议默认值
统一将节点编辑和批量修改的 group_ids、route_ids 序列化为字符串 ID,避免保存权限组后订阅侧无法命中节点 后端新增 whereGroupId 兼容历史字符串与数字 JSON 值, 并补齐 TUIC 版本、ALPN 选项及 AnyTLS 默认 Padding 配置 docs: 新增 HelloAGENTS 通用与工作流避坑指南
This commit is contained in:
@@ -6,7 +6,7 @@ import type { AdminServerGroupItem } from '@/types/api'
|
||||
interface NodeBatchEditPayload {
|
||||
host?: string
|
||||
rate?: number
|
||||
group_ids?: number[]
|
||||
group_ids?: string[]
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -64,7 +64,7 @@ function handleSubmit() {
|
||||
emit('submit', {
|
||||
host: form.updateHost ? form.host.trim() : undefined,
|
||||
rate: form.updateRate ? Number(form.rate) : undefined,
|
||||
group_ids: form.updateGroups ? [...form.groupIds] : undefined,
|
||||
group_ids: form.updateGroups ? [...new Set(form.groupIds.map((item) => String(item)))] : undefined,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
import { computed } from 'vue'
|
||||
import {
|
||||
getNodeProtocolHint,
|
||||
NODE_ALPN_OPTIONS,
|
||||
NODE_CONGESTION_CONTROL_OPTIONS,
|
||||
NODE_MUX_PROTOCOL_OPTIONS,
|
||||
NODE_SHADOWSOCKS_CIPHER_OPTIONS,
|
||||
NODE_SHADOWSOCKS_OBFS_OPTIONS,
|
||||
NODE_TCP_HEADER_OPTIONS,
|
||||
NODE_TLS_FINGERPRINT_OPTIONS,
|
||||
NODE_TUIC_VERSION_OPTIONS,
|
||||
NODE_UDP_RELAY_MODE_OPTIONS,
|
||||
NODE_VLESS_FLOW_OPTIONS,
|
||||
shouldShowRealitySettings,
|
||||
@@ -58,13 +60,6 @@ const currentProtocolHint = computed(() => getNodeProtocolHint(props.form.type))
|
||||
</ElSelect>
|
||||
</ElFormItem>
|
||||
|
||||
<ElFormItem
|
||||
v-if="['hysteria', 'tuic', 'anytls'].includes(props.form.type)"
|
||||
label="服务器名称(SNI)"
|
||||
>
|
||||
<ElInput v-model="props.form.tlsServerName" placeholder="example.com" />
|
||||
</ElFormItem>
|
||||
|
||||
<ElFormItem v-if="showTlsSection" label="服务器名称(SNI)">
|
||||
<ElInput v-model="props.form.tlsServerName" placeholder="example.com" />
|
||||
</ElFormItem>
|
||||
@@ -366,7 +361,14 @@ const currentProtocolHint = computed(() => getNodeProtocolHint(props.form.type))
|
||||
|
||||
<template v-else-if="props.form.type === 'tuic'">
|
||||
<ElFormItem label="协议版本">
|
||||
<ElInputNumber v-model="props.form.tuicVersion" :min="1" :controls="false" class="full-width" />
|
||||
<ElSelect v-model="props.form.tuicVersion" placeholder="请选择版本">
|
||||
<ElOption
|
||||
v-for="option in NODE_TUIC_VERSION_OPTIONS"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
/>
|
||||
</ElSelect>
|
||||
</ElFormItem>
|
||||
<ElFormItem label="拥塞控制">
|
||||
<ElSelect v-model="props.form.tuicCongestionControl" placeholder="请选择拥塞控制">
|
||||
@@ -396,7 +398,14 @@ const currentProtocolHint = computed(() => getNodeProtocolHint(props.form.type))
|
||||
allow-create
|
||||
default-first-option
|
||||
placeholder="输入后回车添加 ALPN"
|
||||
/>
|
||||
>
|
||||
<ElOption
|
||||
v-for="option in NODE_ALPN_OPTIONS"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
/>
|
||||
</ElSelect>
|
||||
</ElFormItem>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user