IPv6 support

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
Bax
Site Admin
Posts: 4405
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

IPv6 support

Postby Bax » 13 Jun 2016, 12:32

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.
Attachments
ipv6_test_3.png
(45.21 KiB) Not downloaded yet
ipv6_test_2.png
(47.87 KiB) Not downloaded yet
ipv6_test_1.png
(47.87 KiB) Not downloaded yet
Paolo Bax
The SmartFoxServer Team
User avatar
foxboy
Posts: 110
Joined: 12 May 2011, 02:47
Location: Optimal Solution Pte. Ltd.

Re: IPv6 support

Postby foxboy » 07 Jul 2016, 21:39

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>
"Dream it, I'll code it..."
Lead Developer
Optimal Solution Pte. Ltd.
User avatar
Lapo
Site Admin
Posts: 20392
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: IPv6 support

Postby Lapo » 08 Jul 2016, 07:23

No, don't use domain names. You're binding a network card, you need a physical IP address, IPv4 or IPv6

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
foxboy
Posts: 110
Joined: 12 May 2011, 02:47
Location: Optimal Solution Pte. Ltd.

Re: IPv6 support

Postby foxboy » 08 Jul 2016, 07:43

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>
"Dream it, I'll code it..."
Lead Developer
Optimal Solution Pte. Ltd.
User avatar
Lapo
Site Admin
Posts: 20392
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: IPv6 support

Postby Lapo » 08 Jul 2016, 09:34

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
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
foxboy
Posts: 110
Joined: 12 May 2011, 02:47
Location: Optimal Solution Pte. Ltd.

Re: IPv6 support

Postby foxboy » 08 Jul 2016, 10:13

That is just great!

Many thanks Lapo! :D
"Dream it, I'll code it..."
Lead Developer
Optimal Solution Pte. Ltd.
CanOncel
Posts: 12
Joined: 20 Jul 2016, 11:18

Re: IPv6 support

Postby CanOncel » 25 Jul 2016, 07:22

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.
User avatar
Lapo
Site Admin
Posts: 20392
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: IPv6 support

Postby Lapo » 25 Jul 2016, 08:13

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
Lapo

--

gotoAndPlay()

...addicted to flash games
CanOncel
Posts: 12
Joined: 20 Jul 2016, 11:18

Re: IPv6 support

Postby CanOncel » 25 Jul 2016, 08:24

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.
User avatar
Bax
Site Admin
Posts: 4405
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: IPv6 support

Postby Bax » 25 Jul 2016, 08:53

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.
Paolo Bax
The SmartFoxServer Team
CanOncel
Posts: 12
Joined: 20 Jul 2016, 11:18

Re: IPv6 support

Postby CanOncel » 25 Jul 2016, 09:02

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.
User avatar
Bax
Site Admin
Posts: 4405
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: IPv6 support

Postby Bax » 25 Jul 2016, 10:10

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.
Paolo Bax
The SmartFoxServer Team
CanOncel
Posts: 12
Joined: 20 Jul 2016, 11:18

Re: IPv6 support

Postby CanOncel » 25 Jul 2016, 10:45

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.
jack90
Posts: 4
Joined: 25 Jul 2016, 14:01

Re: IPv6 support

Postby jack90 » 25 Jul 2016, 14:09

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.
User avatar
Bax
Site Admin
Posts: 4405
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: IPv6 support

Postby Bax » 25 Jul 2016, 14:35

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?
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 17 guests