unixoide / 5th-echelon

https://unixoide.github.io/5th-echelon/
76 stars 2 forks source link

Does it work outside localhost? #29

Closed K4CZP3R closed 2 months ago

K4CZP3R commented 2 months ago

Hi, great work!

We were trying to use the dedicated server to play some matches but it does not work. Only player which hosts the server on his machine can successfully enter online mode.

We tried some things like changing 127.0.0.1 inside ./quazal/src/config.rs and this resulted into some logs showing up after intro videos on clients connecting from outside the local network. But it still did not let them open the Online tab in the game.

Also I think there is a typo in ports which should be opened (udp/21126 and udp/21127) because there are nowhere to be seen in the source code, we used 21170 and 21171 instead (just like in online config returned from service running on :80)

Have you tested it only locally?

PS: Basic things like port forwarding are not the problem, because we even enabled DMZ on the server.

unixoide commented 2 months ago

Oh, thank you. Fixed the typo in the readme.

The IP in the config.rs file are just defaults. Everything can be changed with the configuration file (service.toml).

I tested it primarily with a virtual network setup, which is equivalent to a local network/VPN, but also with a public IP with some friend who was remote.

Can you maybe share your service.toml? Maybe I can spot a misconfiguration.

K4CZP3R commented 2 months ago

This is my service.toml

services = [
    "sc_bl_auth",
    "content",
    "onlineconfig",
    "sc_bl_secure",
]
api_server = "0.0.0.0:50051"

[service.content]
type = "content"
listen = "0.0.0.0:8000"

[service.content.files]
"/mp_balancing.ini" = "./data/mp_balancing.ini"

[service.onlineconfig]
type = "config"
listen = "0.0.0.0:80"

[[service.onlineconfig.content]]
Name = "SandboxUrl"
Values = ["prudp:/address=127.0.0.1;port=21170"]

[[service.onlineconfig.content]]
Name = "SandboxUrlWS"
Values = ["127.0.0.1:21170"]

[service.sc_bl_secure]
type = "secure"
access_key = "yl4NG7qZ"
crypto_key = "CD&ML"
listen = "0.0.0.0:21171"
vport = 1
ticket_key = [
    7,
    212,
    175,
    78,
    223,
    239,
    229,
    68,
    4,
    194,
    10,
    112,
    126,
    27,
    29,
    195,
    103,
    8,
    117,
    227,
    25,
    202,
    72,
    136,
    45,
    31,
    37,
    166,
    13,
    26,
    92,
    67,
]

[service.sc_bl_secure.settings]
storage_host = "127.0.0.1:8000"
storage_path = "/mp_balancing.ini"

[service.sc_bl_auth]
type = "authentication"
access_key = "yl4NG7qZ"
crypto_key = "CD&ML"
listen = "0.0.0.0:21170"
vport = 1
secure_server_addr = "127.0.0.1:21171"
ticket_key = [
    7,
    212,
    175,
    78,
    223,
    239,
    229,
    68,
    4,
    194,
    10,
    112,
    126,
    27,
    29,
    195,
    103,
    8,
    117,
    227,
    25,
    202,
    72,
    136,
    45,
    31,
    37,
    166,
    13,
    26,
    92,
    67,
]

[service.sc_bl_auth.settings]

[debug]
mark_all_as_online = false
force_joins = false
K4CZP3R commented 2 months ago

Changing every 127.0.0.1 and 0.0.0.0 to my public ip fixes it.