Possible to make FAF Proxy optional?

Moderator: keyser

Possible to make FAF Proxy optional?

Postby silalpha » 24 Jul 2013, 08:03

My friends and I are playing FAF in Australia, and often organise AU only games.
The ongoing connection issues make it difficult to set up games. We believe it is caused by the distance to the FAF proxy.

We persevere with endless combinations of manual NAT/port forwarding and bumping PnP port connections between games with no guarantees, and regular drop outs. Sometimes it takes 5+ attempts to get a game going, if we don't give up first.

It has even reached a point where two connections behind one router (using two different ports on either uPnP or manual NAT) will connect with wildly different pings to other players (~50ms for one, ~700ms for the other).
Perhaps the connection code defers to the proxy too quickly for players far from the EU?

Is it possible to add an option on server creation (or permanently via Options->Settings->Game Port...) to NEVER connect through the Proxy?
silalpha
 
Posts: 5
Joined: 24 Jul 2013, 07:47
Has liked: 0 time
Been liked: 0 time
FAF User Name: silalpha

Re: Possible to make FAF Proxy optional?

Postby Ze_PilOt » 24 Jul 2013, 08:10

No.

If it wasn't for the proxy, you wouldn't connect at all.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Possible to make FAF Proxy optional?

Postby silalpha » 25 Jul 2013, 05:27

Hi Zep, thanks for the reply.
I guess I'm not entirely sure what the proxy is used for.
My concern arises from the dialogue that comes up saying; "You had trouble connecting to some player(s): xxxx
The server tried to make you connect through a proxy server, running on the FAF server..........The proxy server costs us a lot of bandwidth...etc."


If the proxy is compulsory in the initial player connections (and the replay stream?) that shouldn't be the problem.
Is there a second stage/fall-back connection involving the proxy where this dialogue is involved? Does the connection code give up too soon? We have ruled out firewalls and NAT issues.
Usually we can get a game running after a few tries by all using uPnP and bumping the port before each connection. This is a tedious workaround, and very non-deterministic.

In the faf log if I see this typical sequence, the connection has failed:
2013-07-23 17:22:32,644 INFO faf.fa.relayer Command received from server : {"commands": ["121.45.11.210:9138", "Splatt", 50457], "key": "ConnectToPeer"}
2013-07-23 17:22:32,974 INFO faf.fa.relayer Command received from server : {"commands": ["121.45.11.210:9138", "/PLAYERID 30617 silalpha"], "key": "SendNatPacket"}
2013-07-23 17:22:39,823 INFO faf.fa.relayer Command received from server : {"commands": [50457], "key": "DisconnectFromPeer"}
2013-07-23 17:22:39,823 INFO faf.fa.relayer Command received from server : {"commands": [1, "121.45.11.210", "Splatt", 50457], "key": "ConnectToProxy"}


I'm unsure what is happening in the 7 seconds between "SendNatPacket" and "DisconnectFromPeer", and why it then defers to the "ConnectToProxy" command. This sequence is really what my initial post was about; never to defer to the proxy.

I see no reason to have so many connection problems to peers who are <50ms ping away.
My friends and I are mostly software and computer engineers, we'd be happy to assist with further technical diagnosis, connection logging and even code debugging to help improve the robustness of connections.

Thanks & Regards,
Andy
silalpha
 
Posts: 5
Joined: 24 Jul 2013, 07:47
Has liked: 0 time
Been liked: 0 time
FAF User Name: silalpha

Re: Possible to make FAF Proxy optional?

Postby stalewee » 25 Jul 2013, 06:05

I may have noticed the same thing. I'm also from Australia, and sometimes I will get a massive 750 ping to other Australians, to whom I've had 30 ping about an hour earlier.

It's only ever Aus - Aus or Aus - NZ

It has only started happening some time in the last 3-4 months
User avatar
stalewee
Contributor
 
Posts: 107
Joined: 27 Sep 2012, 07:52
Has liked: 0 time
Been liked: 9 times
FAF User Name: stalewee

Re: Possible to make FAF Proxy optional?

Postby ColonelSheppard » 25 Jul 2013, 11:33

deactivating the proxy wouldnt slove the problem, infact you have to fix your router/whateverr issues or you need an own proxy somewhere in australia
User avatar
ColonelSheppard
Contributor
 
Posts: 2997
Joined: 20 Jul 2012, 12:54
Location: Germany
Has liked: 154 times
Been liked: 165 times
FAF User Name: Sheppy

Re: Possible to make FAF Proxy optional?

Postby silalpha » 27 Jul 2013, 07:13

ColonelSheppard wrote:deactivating the proxy wouldnt slove the problem, infact you have to fix your router/whateverr issues or you need an own proxy somewhere in australia

Hi ColonelSheppard,
Thanks for the info. Can you please explain what stages of a game connection the proxy is used for? (such as why the proxy is still in the loop after the peer connections have been established?)

If you're on the coding team for FAF I'd like to contribute by helping to debug this issue. I've got about 10 years of experience programming C/C++/C#/Java/SQL. I'm am happy to wade through code to see if anything can be done to improve the connection robustness (unusual and randomly high pings, long connection times and lobby drop-outs).

The chance of running a successful server seems to be very random, and affects random clients each time (the order of connections sometimes makes a difference).
For some unknown reason, using uPnP and changing the game port manually on all clients before each new server is started gives us a higher probability to successfully launch a game. Why?

In my group of FAF friends we have wasted numerous hours in failed lobby connections, however; when the stars align we play games at 50~100ms ping to all clients. We have long dismissed any issues with routers or firewalls on our connections.

We'd like to know why it doesn't just work every time, and are prepared to investigate these problems in the hopes of making connections more stable and reliable for whole FAF community, not just us.
silalpha
 
Posts: 5
Joined: 24 Jul 2013, 07:47
Has liked: 0 time
Been liked: 0 time
FAF User Name: silalpha

Re: Possible to make FAF Proxy optional?

Postby Ze_PilOt » 27 Jul 2013, 09:45

You go through a proxy if your FA fails to connect to someone directly.

It has to "stay in the loop" or the connection between these two players drop.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Possible to make FAF Proxy optional?

Postby silalpha » 29 Jul 2013, 10:07

If the Proxy has to stay in the loop for the FAF lobby to work properly that's fine, but shouldn't it be simply updated with UDP packets asynchronously, and oblivious to ping? I don't see why it should ever act as a router in the peer connections.

When the connection error comes up it says: "The server tried to make you connect through a proxy server, running on the FAF server."
So this would mean that a good connection is made, it does not make this special connection through the proxy.
What are the constraints in the code for a good connection?
Under what cicumstances does the connection error dialogue appear?
Is unnecessary data being routed through the proxy that increases the bandwidth requirements, lag for all proxy connections, and ultimately higher cost?

You guys aren't giving me much to work on so far, so I'm guessing this is how it works when it is successful:
1. Server starts a new game from FAF -> talks to the Proxy so the FAF 'Find Games' lobby works
2. Client connects to Server in FAF 'Find Games' -> connects to Proxy for Server information (IP/Port/map/game etc.)
3. Client performs any patches and updates, and downloads the map if required
4. Client uses Server IP/Port to connect to Server directly (not Routed through the proxy)
5. Server updates the Proxy and all clients for setting changes and player connections in the FA game lobby

Does the client need to send any other information to the Proxy at this point, or can the server just talk to the Proxy?

If step 4 goes wrong, some other code runs that starts routing the client->server connection via the proxy, why?

Once again I am offerring my programming experience to help you debug the code. I'm not just asking you to fix it.

Please email me directly if you'd rather discuss it offline.
silalpha
 
Posts: 5
Joined: 24 Jul 2013, 07:47
Has liked: 0 time
Been liked: 0 time
FAF User Name: silalpha

Re: Possible to make FAF Proxy optional?

Postby Ze_PilOt » 29 Jul 2013, 10:14

silalpha wrote:If the Proxy has to stay in the loop for the FAF lobby to work properly that's fine, but shouldn't it be simply updated with UDP packets asynchronously, and oblivious to ping? I don't see why it should ever act as a router in the peer connections.


It doesn't act like a router.
It's tunneling FA protocol in a TCP one, because most (if not all) connections problems are due to firewall/router handling badly UDP packets.

So this would mean that a good connection is made, it does not make this special connection through the proxy.


It means the exact opposite.

The message is displayed when you've used the proxy server at any point.

Notice that if ONE player has problem, at least TWO players must connect trough the proxy.
Meaning that unless that error is recurrent, the problem may not be with you.


You guys aren't giving me much to work on so far, so I'm guessing this is how it works when it is successful:
1. Server starts a new game from FAF -> talks to the Proxy so the FAF 'Find Games' lobby works
2. Client connects to Server in FAF 'Find Games' -> connects to Proxy for Server information (IP/Port/map/game etc.)
3. Client performs any patches and updates, and downloads the map if required
4. Client uses Server IP/Port to connect to Server directly (not Routed through the proxy)
5. Server updates the Proxy and all clients for setting changes and player connections in the FA game lobby


No. The proxy server is never involved unless two players are unable to connect using the "normal" way (direct UDP protocol between them).
I suggest that you read the proxy server thread.

You are over-thinking this I believe.

nce again I am offerring my programming experience to help you debug the code. I'm not just asking you to fix it.


You base your assumption on the fact that the problem is with the proxy and it's bugged. It's not.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Possible to make FAF Proxy optional?

Postby rootbeer23 » 29 Jul 2013, 10:24

Ze_PilOt wrote:It's tunneling FA protocol in a TCP one, because most (if not all) connections problems are due to firewall/router handling badly UDP packets.


then why not make a tcp p2p connection.
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Next

Return to FAF Suggestions

Who is online

Users browsing this forum: Google [Bot] and 1 guest