mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 01:43:44 +08:00
fix: a little
This commit is contained in:
parent
f435762b88
commit
dbd2f697f9
@ -56,11 +56,23 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
}
|
||||
|
||||
if (
|
||||
OS === "linux" &&
|
||||
new Set([redirPort, tproxyPort, mixedPort, socksPort, port]).size !== 5
|
||||
) {
|
||||
Notice.error("Port conflict!", 4000);
|
||||
return;
|
||||
}
|
||||
if (
|
||||
OS === "macos" &&
|
||||
new Set([redirPort, mixedPort, socksPort, port]).size !== 4
|
||||
) {
|
||||
Notice.error("Port conflict!", 4000);
|
||||
return;
|
||||
}
|
||||
if (OS === "windows" && new Set([mixedPort, socksPort, port]).size !== 3) {
|
||||
Notice.error("Port conflict!", 4000);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (OS !== "windows") {
|
||||
await patchInfo({ "redir-port": redirPort });
|
||||
|
Loading…
x
Reference in New Issue
Block a user