Skip to content

Commit 3f30c71

Browse files
committed
fix: prevent duplicate Tun inbound entries in runtime profile
1 parent cae7231 commit 3f30c71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/stores/kernelApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const useKernelApiStore = defineStore('kernelApi', () => {
7070
}
7171
})
7272
const tunInbound = _profile.inbounds.find((v) => v.type === Inbound.Tun)
73-
if (tunInbound) {
73+
if (tunInbound && !runtimeProfile.inbounds.find((v) => v.type === Inbound.Tun)) {
7474
runtimeProfile.inbounds.push(tunInbound)
7575
}
7676
runtimeProfile.outbounds = _profile.outbounds

0 commit comments

Comments
 (0)