motivewc / wowpatch

Multiplatform WoW client patcher for private servers (11.0.2+)
MIT License
8 stars 9 forks source link

on Windows not working #2

Closed V-Cyberpunk closed 2 months ago

V-Cyberpunk commented 2 months ago

Hi,

very good, that you code an alternative for the launcher! messed with this topic around, too.

tested on windows x64, but not working. converted the tc cert to pfx and imported. tested with dragonflight, but rsa modulus and ed25519 pubkey are the same in df and war within. there must be something additional to patch for windows x64.

btw, the old legion connection_patcher is good inspiration, too. https://github.com/TrinityCore/TrinityCore/tree/7f2b7dc9c2165d2608742473a931f55b1c1a753a/src/tools/connection_patcher

hwis commented 2 months ago

need more information about what you did to launch the client: did you change /etc/hosts (or C:\Windows\System32\drivers\etc\hosts ) or set up a dns server to write the hostname instead of the ip address in Config.wtf, also need examples of bnetserver.conf, worldserver.conf, realmlist tables in auth database and how you installed the certificate.

MGPelaar commented 2 months ago

@hwis I also couldn't connect to the server.

V-Cyberpunk commented 2 months ago

the easiest way would be, that someone, who got it to work, write down and documentate the steps in detail.

MGPelaar commented 2 months ago

@V-Cyberpunk Okay, I finally made it working. Here's my workflow (the wow server is on a Linux server):

  1. Come up with a cool domain name.
  2. Create a self signed certificate (for free), but make sure that the subjectAlternativeName is given (which is your cool domain name). You can google how to create it with your server environment.
  3. Install that certificate to your server machine (I also created an apache instance for it, I'm not sure if this is needed tho).
  4. Make required changes to your bnetserver.conf: LoginREST.ExternalAddress=[your_cool_domain], CertificatesFile = "[location_to_your_public_crt]" and PrivateKeyFile = "location_to_your_private_key". 4.1 DO NOT USE THE DEFAULT BNETSERVER CERTIFICATE, because Windows won't trust it no matter what (No subjectAlternativeName given)!
  5. Set the realmlist in your database to address: [your_cool_domain].
  6. On every client device you want to connect with, you will need to trust the public crt. On Windows, double click the crt, Install Certificate -> Local Machine -> Place certificate in the following store: Trusted Root Certification Authorities. 6.1 For Mac users: open your Keychain Access, click to System, then under File -> Import items... add the certificate. Then double click the imported certificate and Trust -> When using this certificate -> Always trust.
  7. Edit hosts file in C:\Windows\System32\drivers\etc\hosts and add your server's IP and your cool domain there. 7.1 For me, Windows always overwrites the hosts file, so I had to make it read only. If all of a sudden the method doesn't work, this might be the cause of it... 7.2 For Mac users: the hosts file is located in /etc/hosts.

Note for Mac ARM users: You will need to modify and rebuild TrinityCore, so it will be compatible with your device. You can find the author's pull request with the required modifications here.

V-Cyberpunk commented 2 months ago

THIS was it! great!

hwis commented 2 months ago

yeah it works! tested on dragonflight and tww ))))))))))))))))))))))))))))))))))))))))))))))

motivewc commented 2 months ago

Hey folks, let me know if this guide would've solved your confusion: https://github.com/motivewc/wowpatch/pull/5/files#diff-1edc61efa1102d153eb683e512d30a1e31fd0a4e2f9ac62f5044c0ff43685058

I didn't mention the TrinityCore patch, as I expect to work with Shauren to merge that soon.