Forged Alliance Forever Forged Alliance Forever Forums 2017-09-15T17:31:40+02:00 /feed.php?f=45&t=15003 2017-09-15T17:31:40+02:00 2017-09-15T17:31:40+02:00 /viewtopic.php?t=15003&p=154158#p154158 <![CDATA[Re: FAF Game Lobby Repo]]>
But I'm not the expert on this part of the architecture.

Statistics: Posted by Brutus5000 — 15 Sep 2017, 17:31


]]>
2017-09-04T01:10:30+02:00 2017-09-04T01:10:30+02:00 /viewtopic.php?t=15003&p=153811#p153811 <![CDATA[Re: FAF Game Lobby Repo]]> https://github.com/bprodoehl/docker-turnserver in the server repository.

This has me confused because I can't figure out the interface between docker-turnserver and the server repo code.

Statistics: Posted by Ryan_Ryan_Ryan — 04 Sep 2017, 01:10


]]>
2017-09-03T21:19:18+02:00 2017-09-03T21:19:18+02:00 /viewtopic.php?t=15003&p=153800#p153800 <![CDATA[Re: FAF Game Lobby Repo]]>
Code:
    async def EstablishConnection(self, peer_connection: "GameConnection"):
        """
        Attempt to establish a full duplex UDP connection
        between self and peer.

        :param peer_connection: Client to connect to
        :return: (own_addr, remote_addr)
        """
        own = self.connectivity.result  # type: ConnectivityResult
        peer = peer_connection.connectivity.result  # type: ConnectivityResult
        if peer.state == ConnectivityState.PUBLIC \
                and own.state == ConnectivityState.PUBLIC:
[b]            self._logger.debug("Connecting %s to host %s directly", self, peer_connection)[/b]
            return own.addr, peer.addr
        elif peer.state == ConnectivityState.STUN or own.state == ConnectivityState.STUN:
[b]            self._logger.debug("Connecting %s to host %s using STUN", self, peer_connection)[/b]
            (own_addr, peer_addr) = await self.STUN(peer_connection)
            if peer_addr is None or own_addr is None:
[b]                self._logger.debug("STUN between %s %s failed", self, peer_connection)
                self._logger.debug("Resolved addresses: %s, %s", peer_addr, own_addr)[/b]
                if self.player.id < peer_connection.player.id and own.state == ConnectivityState.STUN:
                    return await self.TURN(peer_connection)
                elif peer.state == ConnectivityState.STUN:
                    return tuple(reversed(await peer_connection.TURN(self)))
            else:
                return own_addr, peer_addr
[b]        self._logger.error("Connection blocked")[/b]


I'm not familiar with the networking stuff and it is tough to piece together what lines like this
Code:
server, protocol = await self.loop.create_datagram_endpoint(lambda: NatServerProtocol(address, self._futures), address)
are actually doing without the ability to debug and watch variables. Seeing a chunk of the log file would go a long way towards tracking what data is actually moving through the networking code.

Statistics: Posted by Ryan_Ryan_Ryan — 03 Sep 2017, 21:19


]]>
2017-08-27T12:02:59+02:00 2017-08-27T12:02:59+02:00 /viewtopic.php?t=15003&p=153599#p153599 <![CDATA[Re: FAF Game Lobby Repo]]> Statistics: Posted by ozonex — 27 Aug 2017, 12:02


]]>
2017-08-27T07:27:26+02:00 2017-08-27T07:27:26+02:00 /viewtopic.php?t=15003&p=153594#p153594 <![CDATA[Re: FAF Game Lobby Repo]]>
I've been looking into this problem to try to figure out why it happens.

Take the most recent game. 12 Players.
Code:
Name / IP:Port / UID
MrHighCake          61.108.15.94:6112    193533
WarbosGorgutz        37.58.123.3:52340   196906
onkel_mihail         37.58.123.3:61424   169407
Ryan_Ryan_Ryan - - - (me)
aliengfx             37.58.123.3:50038   190575
jebacsuczki       159.205.153.53:6112     68429
Nerfy             77.172.209.155:54476    93547
Xenix             37.146.147.229:6112    209320
yellowcolorado31   68.11.145.168:6112    145905
FRAGMASTER99         37.58.123.3:58270   176589
Zelen            194.165.121.117:6112    158549
SWEDGE               68.108.8.17:6112    164688


This game I disconnected with aliengfx who is proxied through the faf servers. Using Wireshark, I recorded a trace of joining the lobby and playing the game. After alt-f4ing during the lock I stopped and investigated the trace. The UDP stream between me and aliengfx continued normally until the end of the game (disconnect) when this happened.

Image

After these ICMP responses from the server, I get no more information coming from aliengfx. Scrolling down shows a continuous UDP stream from me to the server, which eventually ends with this.

Image

ICMP Destination Unreachable (Port unreachable).

If aliengfx is connected by proxy to everyone through the FAF servers, then logically, he should either reach the FAF server for all players or for no players. It shouldn't be possible that only packets directed towards me fail to reach the FAF server. If aliengfx can still reach other players ingame through his FAF proxy, then the ICMP message directed back at me could be indicative of some problem on the server. I have not had time to look into the server code, so I don't know what could be the root cause of the problem.

I'll still keep looking into this bug to try to figure out the root cause, but I'm posting this because maybe other people who see can give me some insight into the problem.

Statistics: Posted by Ryan_Ryan_Ryan — 27 Aug 2017, 07:27


]]>
2017-08-21T18:05:02+02:00 2017-08-21T18:05:02+02:00 /viewtopic.php?t=15003&p=153369#p153369 <![CDATA[Re: FAF Game Lobby Repo]]> https://github.com/bprodoehl/docker-turnserver.

The rest (client-side) is implemented in the python client (repository "client"). But I don't know the details.

Statistics: Posted by Brutus5000 — 21 Aug 2017, 18:05


]]>
2017-08-20T23:36:58+02:00 2017-08-20T23:36:58+02:00 /viewtopic.php?t=15003&p=153341#p153341 <![CDATA[Re: FAF Game Lobby Repo]]>
Where is the code for the proxy being actively used by FAF? I see that the a proxy is listed in the client code but none of the client code appears to use it.

Code:
    'proxy/host': 'proxy.{host}',
    'proxy/port': 9124,
    'lobby/relay/port': 15000,
    'lobby/host': 'lobby.{host}',
    'lobby/port': 8001,


Code:
Search "proxy/port" (1 hit in 1 file)
    ...\client-devop\src\config\production.py
    'proxy/port': 9124,


I want to read through to code to see how it works and if some edge cases I think of are covered or would lead to a disconnect.

Statistics: Posted by Ryan_Ryan_Ryan — 20 Aug 2017, 23:36


]]>
2017-08-20T02:00:14+02:00 2017-08-20T02:00:14+02:00 /viewtopic.php?t=15003&p=153306#p153306 <![CDATA[Re: FAF Game Lobby Repo]]> Statistics: Posted by Brutus5000 — 20 Aug 2017, 02:00


]]>
2017-08-18T11:26:22+02:00 2017-08-18T11:26:22+02:00 /viewtopic.php?t=15003&p=153229#p153229 <![CDATA[Re: FAF Game Lobby Repo]]>
https://github.com/FAForever/ice-adapter

I see in the logs that everyone is connecting through a proxy that is running on my machine when the game or lobby starts. Is the ICE Adapter repo being used or is the proxy something else?

Code:
Line 754: info: ConnectToPeer (name=IkarosDC,      uid=204248, address=127.0.0.1:54582, USE PROXY)
Line 760: info: ConnectToPeer (name=Sloth,         uid=38166,  address=127.0.0.1:54583, USE PROXY)
Line 765: info: ConnectToPeer (name=kukuczka,      uid=27975,  address=127.0.0.1:54584, USE PROXY)
Line 770: info: ConnectToPeer (name=KaworuKun,     uid=217349, address=127.0.0.1:54585, USE PROXY)
Line 784: info: ConnectToPeer (name=Sunaiac,       uid=150038, address=127.0.0.1:54586, USE PROXY)
Line 791: info: ConnectToPeer (name=Lout_is_taken, uid=214622, address=127.0.0.1:54587, USE PROXY)
Line 828: info: ConnectToPeer (name=Evil_in_Me,    uid=35369,  address=127.0.0.1:49547, USE PROXY)
Line 862: info: ConnectToPeer (name=lastman88,     uid=35363,  address=127.0.0.1:49548, USE PROXY)

Statistics: Posted by Ryan_Ryan_Ryan — 18 Aug 2017, 11:26


]]>
2017-08-16T09:58:19+02:00 2017-08-16T09:58:19+02:00 /viewtopic.php?t=15003&p=153182#p153182 <![CDATA[Re: FAF Game Lobby Repo]]>
all of our repos are linked in the wiki. The game lobby code that we can touch is in the lua code repo "fa", but that only covers the lobby screen with the chat, map, slots etc. The connection code behind that is original SupCom code as you stated. It uses UDP, so if you have an unreliable internet connection with packet drops, it won't work (TCP would be able to "repair" this - but GPG chose UDP for performance reasons).

Did you checkout the wiki article? http://wiki.faforever.com/index.php?tit ... evelopment
We also have a youtube tutorial that covers the basics: https://www.youtube.com/watch?v=lUUDdL05QAA

Statistics: Posted by Brutus5000 — 16 Aug 2017, 09:58


]]>
2017-08-16T03:24:31+02:00 2017-08-16T03:24:31+02:00 /viewtopic.php?t=15003&p=153173#p153173 <![CDATA[FAF Game Lobby Repo]]>
I'm curious about the two-player disconnect issue I'm frequently getting and I want to take a look at the FAF game lobby code to get started.

To be more specific, my guess is that the disconnecting issue is something that is happening because of bad coding done on the original supcom FA side, and not FAF. Its probably something you have trouble fixing because you don't have access to that code (another guess).

I guess that when the game starts there is connection info for each player passed to the game process from the game lobby and then the game process makes a new connection upon launch and starts the game. If all of these guesses are right, I think a path towards a solution would be to give the game process a fake connection for each player that loops back to the player's own computer. Another process would receive the outbound packets intended for the other players in the game. This process can forward them normally, and can have code to revive lost connections between individual players.

I'm new to FAF, so I'm probably 100% wrong with my assumptions here. If so, could you just feed me whatever specifics you know about the issue?

Statistics: Posted by Ryan_Ryan_Ryan — 16 Aug 2017, 03:24


]]>