FAForever / java-ice-adapter

A P2P connection proxy for Supreme Commander: Forged Alliance using ICE
MIT License
5 stars 12 forks source link

Failing to setup coturn server when urls contains host IP address #41

Closed Eternal-ll closed 1 year ago

Eternal-ll commented 1 year ago

Example: [[{credentialType=token, urls=[turn:http://100.100.100.100:3478?transport=tcp, turn:http://100.100.100.100:3478?transport=udp, turn:http://100.100.100.100:3478], credential=DlbZPtug98J3vNURIqmKrVzweFU=, username=1672848658:100000}]

image

Somewhere in this code, probably dont match pattern?

https://github.com/FAForever/java-ice-adapter/blob/092c549cd32efb82d3d9a70d874c92dd0dfbd8b6/ice-adapter/src/main/java/com/faforever/iceadapter/ice/GameSession.java#L128-L144

Eternal-ll commented 1 year ago

I guess this is more a problem of infrastructure misconfiguration? Or this url should be cleaned.

Eternal-ll commented 1 year ago

I actually forgot about API, it returns clean data that can be used. Lobby functionality depreciated anyway.

{
    "data": [
        {
            "type": "coturnServer",
            "id": "1",
            "attributes": {
                "active": true,
                "host": "100.100.100.100",
                "key": "key",
                "port": 3478,
                "region": "EU"
            }
        }
    ]
}