mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-13 13:56:55 -04:00
fix(multiplayer): update cato.
This commit is contained in:
parent
c60df2c26b
commit
ace8be3df4
@ -51,7 +51,7 @@ import static org.jackhuang.hmcl.util.Logging.LOG;
|
|||||||
*/
|
*/
|
||||||
public final class MultiplayerManager {
|
public final class MultiplayerManager {
|
||||||
private static final String CATO_DOWNLOAD_URL = "https://files.huangyuhui.net/maven/";
|
private static final String CATO_DOWNLOAD_URL = "https://files.huangyuhui.net/maven/";
|
||||||
private static final String CATO_VERSION = "2021-09-21";
|
private static final String CATO_VERSION = "2021-09-25";
|
||||||
private static final Artifact CATO_ARTIFACT = new Artifact("cato", "cato", CATO_VERSION,
|
private static final Artifact CATO_ARTIFACT = new Artifact("cato", "cato", CATO_VERSION,
|
||||||
OperatingSystem.CURRENT_OS.getCheckedName() + "-" + Architecture.CURRENT.name().toLowerCase(Locale.ROOT),
|
OperatingSystem.CURRENT_OS.getCheckedName() + "-" + Architecture.CURRENT.name().toLowerCase(Locale.ROOT),
|
||||||
OperatingSystem.CURRENT_OS == OperatingSystem.WINDOWS ? "exe" : null);
|
OperatingSystem.CURRENT_OS == OperatingSystem.WINDOWS ? "exe" : null);
|
||||||
@ -85,7 +85,7 @@ public final class MultiplayerManager {
|
|||||||
if (!Files.isRegularFile(exe)) {
|
if (!Files.isRegularFile(exe)) {
|
||||||
throw new IllegalStateException("Cato file not found");
|
throw new IllegalStateException("Cato file not found");
|
||||||
}
|
}
|
||||||
String[] commands = new String[]{exe.toString(), "--token", "new", "--peer", peer, "--from", String.format("127.0.0.1:%d", localPort), "--to", String.format("127.0.0.1:%d", remotePort)};
|
String[] commands = new String[]{exe.toString(), "--token", "new", "--peer", peer, "--local", String.format("127.0.0.1:%d", localPort), "--remote", String.format("127.0.0.1:%d", remotePort)};
|
||||||
Process process = new ProcessBuilder()
|
Process process = new ProcessBuilder()
|
||||||
.command(commands)
|
.command(commands)
|
||||||
.start();
|
.start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user