chore: limit port config

#699
This commit is contained in:
MystiPanda 2024-03-20 21:23:10 +08:00
parent 8910dfaecf
commit ef4711987f

View File

@ -42,6 +42,10 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
setOpen(false);
return;
}
if (mixedPort === socksPort || mixedPort === port || socksPort === port) {
Notice.error("Port conflict!", 4000);
return;
}
try {
await patchInfo({ "mixed-port": mixedPort });
await patchInfo({ "socks-port": socksPort });