ReHamster / AlcatrazServer

Driver San Francisco experimental Online backend
http://alcatraz.drivermadness.net
13 stars 2 forks source link

Hosting server on LAN/VPN #9

Closed SlejmUr closed 2 years ago

SlejmUr commented 2 years ago

We built and changed the port to 80-81 (http,https) Login/Register works. Connecting to Multi and then connection error. 3074 open, but we on LAN so we shouldn't need to open port. So this will no longer work bc we cannot reproduce ubi udp rsp, and the servers are shot down?

Thanks!

0P3N50URC3-F0R3V3R commented 2 years ago

Addition for the subject above:

We tried with:

The result was the same in all machine. We was able to register, but not going online ingame... what are we missing?

SoapyMan commented 2 years ago

You mean the tower icon in game doesn't appear? I've been looking at hosting readme and found out that I have forgot to tell about the data folder. OnlineConfig.ini is a required file and it may cause game to drop connection if it cannot be acquired through RMC.

0P3N50URC3-F0R3V3R commented 2 years ago

The icon itself is there, but when we click on the online multiplayer it says that the uplay servers are not avaliable...

So basicly what you say is that we need to copy the DATA folder to the server with the contents?

Could you do an updated tutorial? how the client works, how the ports are working, exactly what and how to be edited in the server to make it work? Also a tutorial for windows would be nice too.... i am using ubuntu too but in windows would be more smoother to manage for us...(basicly how we can kame the server to do not bint do localhost:5000 under windows?!)

SoapyMan commented 2 years ago

In appsettings.json there is a Services.ServerFilesPath and it should point to data/serverFiles folder in repo. About localhost:5000 it is a WebAPI port (when making a Linux server you can specify to run it on :80 etc) and game uses different ports which are specified appsettings.json

0P3N50URC3-F0R3V3R commented 2 years ago

The data thing solved me for linux and - it is working with windows too on vpn. I am able to login and go ingame, and roam the city. (And also it is working on ARM raspberry too FYI( Raspberry B3+) the arm was compiled by SlejmUr) A bit slow at login but works

The localhost 5000 was solved by Slejmur, added the values to the main appsettings.json file.

We are currently testing it, ill be check back if this has correct multiplay ingame. Wee have currently a little connection error. BRB!

SlejmUr commented 2 years ago

Ok, so. Hosted on my PC, no port forwarded. I cannot join to any Host. Others can join to me. And they can play. Hosted on Friend PC, Cannot join, But still others can join. A question, why is needed to port forward 3074 when hosted on Localhost kind of PC. Did it connect to Ubisoft or what? Cannot replicate that Req/Rsp on Server side? OR doing smth on hotsts file to conenct to my server ,etc?

0P3N50URC3-F0R3V3R commented 2 years ago

Yes i was able to connect to him but he is unable to join to his self hosted server on lan.... on the same ip... i am able to connect to him, login go ingame roam the city.... but he is not despite that he is on his own LAN and own machine...

SoapyMan commented 2 years ago

Port forwarding is only needed if you behind NAT and that is usually not a thing when you’re in LAN (except few unique situations). I have been successfully tested this in LAN but as far as I can remember the server bind address in config must not be localhost but the actual IP address in LAN.

SoapyMan commented 2 years ago

Did it connect to Ubisoft or what? Cannot replicate that Req/Rsp on Server side? OR doing smth on hotsts file to conenct to my server ,etc?

Alcatraz Loader (in custom ubiorbit_r2_loader.dll) makes game to not rely on Ubi servers. Game sends the first HTTP request directly to Alcatraz server and retrieves RendezVous endpoints from it (which are the same Alcatraz server but with 21005 and 21006 ports) Then game uses those endpoints and communicates directly with Alcatraz server.

SlejmUr commented 2 years ago

I used the latest version of Custom orbit, but still trying to connect Ubisoft. Maybe it try to use the other ubi dll to connect? I see it using Alcatraz server but it just drop my connection. Version is good, I even tried to get friends client files (the exe + dll) and still fails, will try to get all files from friends, but dont know why it just refuse connection to my own server