Closed connorcarpenter closed 2 years ago
I've added IPv6 support to the regex here: https://github.com/FF-AntiK/naia-1/blob/ipv6_support/socket/client/src/wasm_utils.rs#L8
The regex is a mess and the IPv6 part is just copied from random stackoverflow. But it's working for me ;-) Maybe you can simplify the regex.
Unfortunately this still not works with Firefox. Firefox complains about address type mis-match which makes me believe that at some other point of the naia stack the address is interpreted as IPv4.
Thank you for this FF-AntiK :pray: will merge soon
As noted by @FF-AntiK in https://github.com/naia-rs/naia-socket/issues/57:
url_to_socket_addr
returns the first address it can find, which could be IPv6: https://github.com/naia-rs/naia-socket/blob/main/shared/src/url_parse.rs#L43but the regex in
candidate_to_addr
does not support IPv6 ([::]
notation): https://github.com/naia-rs/naia-socket/blob/main/client/src/wasm_utils.rs#L9