haxe icon indicating copy to clipboard operation
haxe copied to clipboard

sys.net.Host not supports IPv6

Open Deltachaos opened this issue 12 years ago • 63 comments

The Host class API is not able to handle IPv6 adresses. I currently dont have any idea how a better API should look like. May it would be a good idea to deprecate the Host class and replace it with an better interface. Any suggestions?

Deltachaos avatar Jun 09 '14 14:06 Deltachaos

There's no concrete suggestion here which leads me to believe there isn't much of a need for a change. I'm not opposed to having IPv6 support, but someone would have to actually look into it.

Simn avatar Sep 17 '14 11:09 Simn

Close due to general disinterest.

Simn avatar Oct 09 '14 10:10 Simn

IPv6 is now becoming a requirement for iOS apps http://www.internetsociety.org/deploy360/blog/2015/06/apple-will-require-ipv6-support-for-all-ios-9-apps/

ProPuke avatar Jun 10 '15 14:06 ProPuke

http://www.internetsociety.org/deploy360/blog/2015/06/apple-will-require-ipv6-support-for-all-ios-9-apps/ Now would be a good time to re-open it ;)

ghost avatar Jun 10 '15 14:06 ghost

How about make Host opaque, or hide ip field at least, and/or make it haxe.io.Bytes. stdlib API uses Host itself, and only cpp and neko sys.net.Socket uses ip field. In native code neko and cpp are similar, both can accept haxe.io.Bytes at Haxe side (as Socket.readBytes) and use it to pass/store whole sockaddr.sa_data.

mcheshkov avatar Jun 10 '15 14:06 mcheshkov

is this issue solved? I think IPv6 is important topic.

eminfedar avatar Sep 13 '15 09:09 eminfedar

is this issue solved?

I believe this issue would be closed if it was fixed.

I think IPv6 is important topic.

I hope everyone thought that way, but most of people are ignoring it entirely, "lets just add CGN after CGN after CGN .. .after CGN." I am very happy that Apple made the policy of requiring IPv6 support from all App Store apps and also improving their Happy Eyeballs.

By the way, isn't iOS9 which requires apps to have IPv6 support released the day after tomorrow, 15th?

Mikaela avatar Sep 13 '15 11:09 Mikaela

As of June 1, 2016 Apple has started enforcing IPv6 support in iOS app submissions. Does anyone know the current status of IPv6 address support in Haxe?

realcraig avatar Jul 26 '16 03:07 realcraig

Is someone interested in contributing it ? This would require some changes but should be feasible without much changes in the API. The only breaking change will be to change our ip representation from Int32 to Bytes so it can hold either 4 bytes or 16 bytes of IPV6. Also, i'm not familiar with the IPv6 C API but from the following article it seems pretty similar to IPv4

http://long.ccaba.upc.edu/long/045Guidelines/eva/ipv6.html http://tldp.org/HOWTO/Linux+IPv6-HOWTO/chapter-section-using-api.html

ncannasse avatar Jul 30 '16 10:07 ncannasse

Now it's unable to pass the review step on the AppStore due to the IPv6 issue. Is there any update here? Any estimations about delivery dates?

ngrebenshikov avatar Aug 19 '16 02:08 ngrebenshikov

Ping @hughsando

ncannasse avatar Aug 23 '16 16:08 ncannasse

Can I change the type of the 'ip' variable without breaking anything? Maybe I could add a private ipv6 variable and use that internally and not break anything, but still resolve correctly.

hughsando avatar Aug 24 '16 04:08 hughsando

Is there any update here please?

thamthang avatar Sep 17 '16 04:09 thamthang

@hughsando yes I think we need some kind of dual usage of the class so it uses either ipv4 or v6, we could have an extra public ipv6 : Bytes field in Host for that

ncannasse avatar Sep 19 '16 07:09 ncannasse

@ncannasse I had connect server with ipv6 in iOS,by modify the three files, with your suggestion. modify the three files is: \haxe\std\cpp_std\sys\net\Host.hx \haxe\std\cpp_std\sys\net\Socket.hx \haxe\lib\hxcpp\3,3,49,2\project\libs\std\Socket.cpp

hpgood avatar Oct 25 '16 09:10 hpgood

the follow files is modified by my team: Socket.cpp.txt Host.hx.txt Socket.hx.txt

hpgood avatar Oct 25 '16 09:10 hpgood

@hpgood Thanks for looking into that. Would you submit a PR instead? It is hard to review currently.

andyli avatar Oct 25 '16 15:10 andyli

@hpgood I've tried your 3 new files but got the errors below while trying to build ios legacy ./src/haxe/Http.cpp:267:5: error: use of undeclared identifier 'sys' sys::net::Socket tmp8 = sys::net::Socket_obj::__new(); HX_STACK_VAR(tmp8,"tmp8"); ^ ./src/haxe/Http.cpp:267:29: error: use of undeclared identifier 'sys' sys::net::Socket tmp8 = sys::net::Socket_obj::__new(); HX_STACK_VAR(tmp8,"tmp8"); ^ ./src/haxe/Http.cpp:904:5: error: use of undeclared identifier 'sys' sys::net::Host tmp37 = sys::net::Host_obj::__new(tmp36); HX_STACK_VAR(tmp37,"tmp37"); ^ ./src/haxe/Http.cpp:904:28: error: use of undeclared identifier 'sys' sys::net::Host tmp37 = sys::net::Host_obj::__new(tmp36); HX_STACK_VAR(tmp37,"tmp37"); ^ ./src/haxe/Http.cpp:914:5: error: use of undeclared identifier 'sys' sys::net::Host tmp35 = sys::net::Host_obj::__new(host); HX_STACK_VAR(tmp35,"tmp35"); ^ ./src/haxe/Http.cpp:914:28: error: use of undeclared identifier 'sys' sys::net::Host tmp35 = sys::net::Host_obj::__new(host); HX_STACK_VAR(tmp35,"tmp35");

thamthang avatar Nov 22 '16 09:11 thamthang

@thamthang after modify the 3 new files, goto the hxcpp directory cd project neko build.n ios

rebuild the hxcpp project

hpgood avatar Nov 22 '16 11:11 hpgood

I've tried these 2 commands but still got the error neko build.n ios lime rebuild hxcpp

thamthang avatar Nov 23 '16 08:11 thamthang