ArchipelagoMW / Archipelago

Archipelago Multi-Game Randomizer and Server
https://archipelago.gg
Other
507 stars 661 forks source link

Implement SSL/wss across all clients #1647

Closed black-sliver closed 1 year ago

black-sliver commented 1 year ago

What task needs to be completed?

The server can currently run either in SSL (wss) or plain (ws) mode. Clients will most likely have to support both for cases where a locally-hosted MultiServer can't have a valid certificate but archipelago.gg requires SSL.

Implementation

The client/client libs should try both SSL (wss://...) and plain (ws://...) when being supplied just server:port.

In addition to that, where possible, it would be good to allow the user to explicitly select ws or wss by having them enter a full URL (i.e. /connect ws://... vs. /connect wss://...).

Testing

While there is no RC/beta active, http://archipelago:gg:24242 will spin up games in SSL-enabled mode.

There is also an SSL-enabled test room hosted on wss://archipelago.gg:12121

The RC/beta site http://archipelago:gg:24242 will spin up games in SSL-enabled mode. Oct 2, 2023, the main site should switch to SSL as well.

Future client information

Now that all existing clients and libs support SSL, all future clients should be able to do SSL before being merged/released. Some may not be able to do that out of the box. Below are ways to work around issues.

Helper libs

WSS proxies

Progress of client libs

If you know if a lib already works mark as done or leave a comment.

Progress of game clients

Insert games here that are known to not work or need to update the client lib to work. If you know one works already, mark as done or leave a comment.

Unsupported clients

Berserker66 commented 1 year ago

Subnautica works with recent versions if the user submits the full wss url. No automatic detection, hoping that will happen on the library layer.

Jarno458 commented 1 year ago

its on my TODO list to add automatic wss if the user does not supply a protocol to the .net lib. currently thats not at all implemented and it just uses ws:// if no protocol is supplied

however specificly providing an wss:// uri does work with the .net lib

ThePhar commented 1 year ago

archipelago.js has been updated to support wss://

image image

EDIT: Just saw this is intending for the selection to be automatic. It's still a manual process, but I can attempt to make it auto in the next version of archipelago.js

N00byKing commented 1 year ago

APCpp now supports automatic SSL. I haven't updated the games yet, currently not home.

EDIT: I've updated APCpp for V6. I'll wait before updating sm64ex in order to get potential bug reports for APCpp as V6 provides a more consistent installation

ThePhar commented 1 year ago

archipelago.js 0.6.0 will support automatic SSL. Clique has been updated to use it. Will be pushing it to npm later this weekend.

heinermann commented 1 year ago

Timespinner also only works if you enter wss:// yourself in the server field.

Noita (new game) will try connecting with wss:// and fall back to ws:// if it fails.

agilbert1412 commented 1 year ago

Stardew Valley: Seems to work only if the user inputs wss:// manually. Not ideal, but usable DLCQuest: Does not work at all, regardless of how the user tries it. Will need to touch base with Jarno on Multiclient.Net

EDIT: Jarno release a new beta of Multiclient.Net that allows DLCQuest to behave like other .net games. The user can input wss:// manually.

KonoTyran commented 1 year ago

Archipelago.multiclient.java does support wss, if the game/user gives a protocol, it will use only that protocol, if none is given, then it will try wss, and then ws in that order.

kindasneaki commented 1 year ago

Hollow Knight just needs to update the .net multiclient lib and it will be able to support it. I dont know who would be able to do that. I dont know if it would be worth it for HK to just wait until jarno updates the lib to support automatic SSL.

kindasneaki commented 1 year ago

I Should also add the RoR2 needs manual wss://

Jarno458 commented 1 year ago

https://github.com/ArchipelagoMW/Archipelago.MultiClient.Net v5.0.0 will now try to connect over wss when no protocol is specified, if that fails it tries to connect over ws instead. so i guess clients need to be updated, but i dont have a clear vision on what games use it nowdays

Jarno458 commented 1 year ago

Timespniner was updated BK_Sudoku was updated

The Messenger was attempted but fail to implement this

N00byKing commented 1 year ago

As no issues with SSL in V6 were reported, I've now also updated sm64 to utilize the new APCpp version

Jarno458 commented 1 year ago

Simular to The Messenger, Hylics also does not work on wss

Berserker66 commented 1 year ago

Subnautica has a stable version out that switches ws/wss in mod and a testing version in the discord channel that relies on the library instead. I tested both versions in regards to this functionality.

ScipioWright commented 1 year ago

Stardew and DLCQuest were updated and no longer needs the user to input wss:// Overcooked 2 requires the user to input wss:// The Witness was updated to work There's some sort of modified multiclient that makes Hollow Knight work, I'm iffy on the details. It should be in the Hollow Knight discord chat somewhere. SA2B works with a pre-release version. SM64 works with a newer version just like with V6, like N00by said.

PoryGone commented 1 year ago

SA2B can be checked off as of the next release.

BadMagic100 commented 1 year ago

As implied by the linked issue above - HK can be checked off as of next release

kindasneaki commented 1 year ago

Muse Dash works with wss

FelicitusNeko commented 1 year ago

hxArchipelago (and thus Bumper Stickers) confirmed working with WSS. Will downgrade automatically but not upgrade. Shouldn't be too much trouble getting it working in both directions.

Edit: Should also attempt to upgrade now. Also running into a weird issue where debug builds don't connect to WSS, but final builds are fine. This issue should be invisible to end users.

Marechal-L commented 1 year ago

The current build of DS3 works with wss:// ( Already checked on this list anyway )

Seldom-SE commented 1 year ago

It works for Terraria

black-sliver commented 1 year ago

@alwaysintreble @TRPG0 the fake websocket-sharp now has a "final" build (linked above). Let me know when you tested it and released a mod update, so we can check it off the list.

@KonoTyran any update on the minecraft mod release?

alwaysintreble commented 1 year ago

The Messenger now supports SSL https://github.com/alwaysintreble/TheMessengerRandomizerModAP/releases/tag/v0.11.8

TRPG0 commented 1 year ago

Hylics 2 has been updated https://github.com/TRPG0/ArchipelagoHylics2/releases/tag/1.0.6

BrandenEK commented 1 year ago

Blasphemous has been updated

KonoTyran commented 1 year ago

WSS Compatible Minecraft client has been promoted from beta to release.