Prepare launcher 0.1.7 for server migration and manual key transition
This commit is contained in:
@@ -13,7 +13,7 @@ The native launcher supplies `SHACRAFT_ADMISSION_TICKET` and
|
||||
The client accepts a CONFIGURATION payload on `shacraft_admission:challenge`
|
||||
with three Minecraft UTF strings: server ID (16), nickname (16), nonce (43).
|
||||
It verifies server `minigames`, the exact current game nickname and actual
|
||||
socket `135.106.154.86:25568`, then signs once with the ephemeral Ed25519 key.
|
||||
socket `135.106.219.182:25568` (the previous IP remains accepted during migration), then signs once with the ephemeral Ed25519 key.
|
||||
The response on `shacraft_admission:proof` contains ticket (43) and standard
|
||||
Base64 signature (88). The transcript has no final newline:
|
||||
|
||||
|
||||
@@ -62,6 +62,6 @@ public final class AdmissionProof {
|
||||
if (allowLoopback && (host.equals("127.0.0.1") || host.equals("::1") || host.equals("[::1]") || host.equals("0:0:0:0:0:0:0:1"))) {
|
||||
return port > 0 && port <= 65535;
|
||||
}
|
||||
return port == 25568 && (host.equalsIgnoreCase("shacraft.ru") || host.equals("135.106.154.86"));
|
||||
return port == 25568 && (host.equalsIgnoreCase("shacraft.ru") || host.equals("135.106.154.86") || host.equals("135.106.219.182"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,11 @@ class AdmissionProofTest {
|
||||
assertThrows(IllegalArgumentException.class,()->AdmissionProof.transcript(v[0],v[1],v[2],v[3]));
|
||||
}
|
||||
@Test void trustsOnlyMinigamesSocketAndExplicitLocalTests() {
|
||||
assertTrue(AdmissionProof.allowedTarget("shacraft.ru",25568,false));
|
||||
assertTrue(AdmissionProof.allowedTarget("135.106.219.182",25568,false));
|
||||
assertTrue(AdmissionProof.allowedTarget("135.106.154.86",25568,false));
|
||||
assertFalse(AdmissionProof.allowedTarget("135.106.219.183",25568,false));
|
||||
assertFalse(AdmissionProof.allowedTarget("135.106.219.182",25567,false));
|
||||
assertFalse(AdmissionProof.allowedTarget("135.106.154.86",25567,false));
|
||||
assertFalse(AdmissionProof.allowedTarget("127.0.0.1",25568,false));
|
||||
assertTrue(AdmissionProof.allowedTarget("127.0.0.1",25570,true));
|
||||
|
||||
Reference in New Issue
Block a user