Page 1 of 6

IPv6 support

Posted: 13 Jun 2016, 12:32
by Bax
Recently a few customers reported their app being rejected by Apple for possible issues with IPv6 support and got back to us, asking if SmartFoxServer 2X and its APIs are compatible. The answer is certainly yes for all our API! (of course make sure you are using the latest version available on our website).

Given that our ISP still doesn't provide IPv6 connectivity, we setup a test environment as described in this Apple guide and made three tests, all successful. We decided to post this message to help you in testing your apps and, hopefully, get the same results. If not, we can further discuss your issues.

TEST 1

Image

In this setup, both the client application and SmartFoxServer were running on the same MacBook.
SmartFoxServer was bound to the IPv6 address assigned by the iMac providing the connectivity (or it could have been bound to "::", meaning any available IPv6).
As client application we used the AdminTool, entering the IPv6 address in the connection panel.
The test was successful and we could connect to SmartFoxServer as expected.
This also works when entering ::1 in the connection panel, of course.

TEST 2

Image

In this setup, the client application was running on the client MacBook and SmartFoxServer on the iMac providing IPv6 connectivity.
SmartFoxServer was bound to the IPv6 of the iMac.
As client application we used:
a) the AdminTool again
b) our Unity’s Advanced Connector example (with encryption turned off for sake of simplicity) executed in the Unity Editor*
c) again the Advanced Connector example, this time executed in Xcode, in a couple of iPad / iOS 9.3 simulators
In all cases of course we entered the IPv6 address of the iMac in the address field, and the test was always successful.
In particular this shows that SmartFoxServer works as expected in an IPv6-only network.

TEST 3

Image

In this setup our test client (again the Advanced Connector example executed in the Unity Editor*) connected to an online SmartFoxServer instance through the iMac acting as an IPv6-to-IPv4 bridge. In this case we could connect and login to SmartFoxServer successfully using the domain name of the online server.

(*) Unity 5.3.5 or later is required; previous versions seem to have a bug preventing the connection using the domain name.

Re: IPv6 support

Posted: 07 Jul 2016, 21:39
by foxboy
Hi Bax,

Thank you for this post.

But how to setup IPv6 on the config, we just modify SFS server.xml file and add the domain name and IPv6 addresses?

<socketAddresses>
<socket address="example.com" port="9933" type="TCP"/>
<socket address="example.com" port="9933" type="UDP"/>
<socket address="1234:5678:ff00::123a:456b" port="9933" type="TCP"/>
<socket address="1234:5678:ff00::123a:456b" port="9933" type="UDP"/>
</socketAddresses>

Re: IPv6 support

Posted: 08 Jul 2016, 07:23
by Lapo
No, don't use domain names. You're binding a network card, you need a physical IP address, IPv4 or IPv6

cheers

Re: IPv6 support

Posted: 08 Jul 2016, 07:43
by foxboy
Thanks Lapo.

I can't seem to add IPv6 address using the Admin Panel so I just did it using the command line. The only thing I can set from the Admin Panel is the "::" double colon, is that the wild card for IPv6 addresses?

<socketAddresses>
<socket address="0.0.0.0" port="9933" type="TCP"/>
<socket address="127.0.0.1" port="9933" type="UDP"/>
<socket address="::" port="9933" type="TCP"/>
<socket address="::" port="9933" type="UDP"/>
<socket address="1234:5678:ff00::123a:456b" port="9933" type="TCP"/>
<socket address="1234:5678:ff00::123a:456b" port="9933" type="UDP"/>
</socketAddresses>

Re: IPv6 support

Posted: 08 Jul 2016, 09:34
by Lapo
Yes, use this:

Code: Select all

<socketAddresses>
<socket address="::" port="9933" type="TCP"/>
</socketAddresses>

You don't need anything else :)

:: is the short form for 0:0:0:0:0:0:0:0, which is the equivalent of 0.0.0.0 under IPv4

cheers

Re: IPv6 support

Posted: 08 Jul 2016, 10:13
by foxboy
That is just great!

Many thanks Lapo! :D

Re: IPv6 support

Posted: 25 Jul 2016, 07:22
by CanOncel
Hello everybody,

As you said, Apple rejects applications which does not use IPv6. My applications is one of those :).

My question is that I use Amazon servers on Singapore and they do not support IPv6 yet, then I don't know what I should do now. I hope you have some suggestions for who uses sfs2x like me.

Thanks.

Re: IPv6 support

Posted: 25 Jul 2016, 08:13
by Lapo
Hi,
if your hosting provider doesn't support IPv6 there's not much you can do besides moving to a different provider thath does.

cheers

Re: IPv6 support

Posted: 25 Jul 2016, 08:24
by CanOncel
Thanks for answer.

I am just curious, if I should move another service, everybody should move, so it makes amazon servers completely useless and no one who makes Apple apps will use amazon servers until they support IPv6. Do you agree with it?

Thanks.

Re: IPv6 support

Posted: 25 Jul 2016, 08:53
by Bax
Actually Test 3 above is your scenario, and we could connect successfully. So I don't think it will be an issue for the time being.

Re: IPv6 support

Posted: 25 Jul 2016, 09:02
by CanOncel
Bax wrote:Actually Test 3 above is your scenario, and we could connect successfully. So I don't think it will be an issue for the time being.


Yes, I checked the all 3 examples above and it is completely my scenario, but I just want to know and am looking for there is a way to make my server compatible with IPv6 instead of changing service provider.

Thanks.

Re: IPv6 support

Posted: 25 Jul 2016, 10:10
by Bax
Given that you don't need to change your server (as described in test #3 above), there's nothing you can do to make your server compatible. All the infrastructure must be IPv6 compatible, so it is something that has to be done by the service provider.
In any case I still think you should not worry about it. Just make sure you pass the test above.

Re: IPv6 support

Posted: 25 Jul 2016, 10:45
by CanOncel
Bax wrote:Given that you don't need to change your server (as described in test #3 above), there's nothing you can do to make your server compatible. All the infrastructure must be IPv6 compatible, so it is something that has to be done by the service provider.
In any case I still think you should not worry about it. Just make sure you pass the test above.


I get it Bax, thanks for answers.

Re: IPv6 support

Posted: 25 Jul 2016, 14:09
by jack90
Hi,
In case test #3 above.

Client call to server's IPv4, I have 2 cases:

- I use Objective-C API 1.6.2, client login to server OK.
- But I use C++ API 1.6.4, client cannot login to server.

One was similar, please let me comments!

Thanks.

Re: IPv6 support

Posted: 25 Jul 2016, 14:35
by Bax
jack90 wrote:Hi,
In case test #3 above.

Client call to server's IPv4, I have 2 cases:

- I use Objective-C API 1.6.2, client login to server OK.
- But I use C++ API 1.6.4, client cannot login to server.

One was similar, please let me comments!

Thanks.

It is not clear if you can't connect at all using API C++, or if you can connect but you can't login right after.
Can you explain? Also, what error do you get on the client side? And what about the server? Any error in the logs?