mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-27 02:40:51 +01:00
Invert FLASH to SHOCKWAVE checks to fix NITRO compatibility
This commit is contained in:
parent
2bb833e7ba
commit
62ef67b308
@ -26,7 +26,7 @@ public class PacketTypeChecker {
|
||||
throw new PacketTypeException(String.format("ShockPacketIncoming expected for %s", clientType));
|
||||
}
|
||||
} else if (packet.getFormat() != HPacketFormat.EVA_WIRE) {
|
||||
throw new PacketTypeException(String.format("Invalid packet, expected HPacket for %s", clientType));
|
||||
throw new PacketTypeException(String.format("Invalid packet, expected %s for client type %s, got %s", HPacketFormat.EVA_WIRE, clientType, packet.getFormat()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public class ProxyProviderFactory {
|
||||
}
|
||||
|
||||
public ProxyProvider provide(HClient client) {
|
||||
return provide(client, client == HClient.FLASH ? autoDetectHosts : autoDetectHostsOrigins);
|
||||
return provide(client, client == HClient.SHOCKWAVE ? autoDetectHostsOrigins : autoDetectHosts);
|
||||
}
|
||||
|
||||
public ProxyProvider provide(HClient client, String domain, int port) {
|
||||
@ -152,9 +152,9 @@ public class ProxyProviderFactory {
|
||||
}
|
||||
|
||||
private ProxyProvider provide(HClient client, List<String> potentialHosts) {
|
||||
return client == HClient.FLASH
|
||||
? new FlashProxy(proxySetter, stateSetter, hConnection, potentialHosts, socksConfig.useSocks() && !socksConfig.onlyUseIfNeeded())
|
||||
: new ShockwaveProxy(proxySetter, stateSetter, hConnection, potentialHosts);
|
||||
return client == HClient.SHOCKWAVE
|
||||
? new ShockwaveProxy(proxySetter, stateSetter, hConnection, potentialHosts)
|
||||
: new FlashProxy(proxySetter, stateSetter, hConnection, potentialHosts, socksConfig.useSocks() && !socksConfig.onlyUseIfNeeded());
|
||||
}
|
||||
|
||||
public static void setSocksConfig(SocksConfiguration configuration) {
|
||||
|
@ -117,7 +117,7 @@ public class InjectionController extends SubForm {
|
||||
lbl_corruption.getStyleClass().add("not-corrupted-label");
|
||||
|
||||
// For Shockwave parse with either WEDGIE_INCOMING or WEDGIE_OUTGOING, both will validate the same expression.
|
||||
HPacketFormat format = getHConnection().getClientType() == HClient.FLASH ? HPacketFormat.EVA_WIRE : HPacketFormat.WEDGIE_INCOMING;
|
||||
HPacketFormat format = getHConnection().getClientType() == HClient.SHOCKWAVE ? HPacketFormat.WEDGIE_INCOMING : HPacketFormat.EVA_WIRE;
|
||||
HPacket[] packets = parsePackets(format, inputPacket.getText());
|
||||
|
||||
if (packets.length == 0) {
|
||||
@ -203,7 +203,7 @@ public class InjectionController extends SubForm {
|
||||
}
|
||||
|
||||
public void sendToServer_clicked(ActionEvent actionEvent) {
|
||||
HPacketFormat format = getHConnection().getClientType() == HClient.FLASH ? HPacketFormat.EVA_WIRE : HPacketFormat.WEDGIE_OUTGOING;
|
||||
HPacketFormat format = getHConnection().getClientType() == HClient.SHOCKWAVE ? HPacketFormat.WEDGIE_OUTGOING : HPacketFormat.EVA_WIRE;
|
||||
HPacket[] packets = parsePackets(format, inputPacket.getText());
|
||||
for (HPacket packet : packets) {
|
||||
getHConnection().sendToServer(packet);
|
||||
@ -214,7 +214,7 @@ public class InjectionController extends SubForm {
|
||||
}
|
||||
|
||||
public void sendToClient_clicked(ActionEvent actionEvent) {
|
||||
HPacketFormat format = getHConnection().getClientType() == HClient.FLASH ? HPacketFormat.EVA_WIRE : HPacketFormat.WEDGIE_INCOMING;
|
||||
HPacketFormat format = getHConnection().getClientType() == HClient.SHOCKWAVE ? HPacketFormat.WEDGIE_INCOMING : HPacketFormat.EVA_WIRE;
|
||||
HPacket[] packets = parsePackets(format, inputPacket.getText());
|
||||
for (HPacket packet : packets) {
|
||||
getHConnection().sendToClient(packet);
|
||||
|
2
pom.xml
2
pom.xml
@ -11,7 +11,7 @@
|
||||
|
||||
<properties>
|
||||
<!-- Version of the application. -->
|
||||
<revision>1.5.4-beta-7</revision>
|
||||
<revision>1.5.4-beta-8</revision>
|
||||
<changelist>-SNAPSHOT</changelist>
|
||||
<!-- Version for https://github.com/sirjonasxx/G-ExtensionStore to keep compatibility with beta versions. -->
|
||||
<storeVersion>1.5.3</storeVersion>
|
||||
|
Loading…
Reference in New Issue
Block a user