Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phone can't connect to laptop on IPV6 router #4

Open
buckslice opened this issue Dec 13, 2016 · 20 comments
Open

Phone can't connect to laptop on IPV6 router #4

buckslice opened this issue Dec 13, 2016 · 20 comments

Comments

@buckslice
Copy link

Laptop can connect to localhost fine through browsers but no phones can find game. Same setup worked on IPV4 but when I switched to IPV6 it no longer works. Let me know of things I could try to provide additional info!

Thanks

@greggman
Copy link
Owner

greggman commented Dec 14, 2016

Could you go to

http://happyfuntimes.net?verbose=true&go=false

on both your computer and your phone and copy and paste the info shown below? (or drag and drop screenshots)

@buckslice
Copy link
Author

computer:
checking: http://happyfuntimes.net/api/getgames2
hft response: {"gameIps":[],"publicIps":["2601:204:c702:5f87:3d3d:d184:f486:1e8a"]}

phone:
checking: http://happyfuntimes.net/api/getgames2
hft response: {"gameIps":[],"publicIps":["2601:204:c702:5f87:c540:9c94:3c2c:7d45"]}

@greggman
Copy link
Owner

If you run the game on the computer then on the phone does it connect to the game if you go to

http://[2601:204:c702:5f87:3d3d:d184:f486:1e8a]:18679

@buckslice
Copy link
Author

Yes that works! Do I need to enable a port on the router or something?

@greggman
Copy link
Owner

greggman commented Dec 14, 2016

Sorry, I don't yet know what the problem is. It's going to take several steps to figure out the issue. I hope you can help me figure it out

Could you please do the following?

In Unity please pick "Window->HappyFunTimes->Settings"

Then in the "Debug" area type HTFSite

screen shot 2016-12-14 at 12 52 57 pm

Then run the game and copy the console output here

As an example here's mine

screen shot 2016-12-14 at 1 09 59 pm

@buckslice
Copy link
Author

buckslice commented Dec 14, 2016

screenshot 2016-12-13 20 27 21

Here you go

@greggman
Copy link
Owner

So fyi from what I see the browser is telling happyfuntimes.net that you have a machine at 2601:204:c702:5f87:c540:9c94:3c2c:7d45 but happyfuntimes in unity is not passing that same address. Unity is only passing "98.252.66.77". I'll have to see if I can figure out why.

@buckslice
Copy link
Author

Hmmm, so Unity is using the ipv4 address instead of the ipv6 one?

@greggman
Copy link
Owner

Are you on Mac or Windows?

@greggman
Copy link
Owner

Another thing to test, does this work

Mac

 ping6 2604:a880:0:1010::7cd:6001

Windows

 ping 2604:a880:0:1010::7cd:6001

?

@buckslice
Copy link
Author

screenshot 2016-12-15 02 10 47

I'm on windows, here are the results of the ping. Seems like it failed... haha

@greggman
Copy link
Owner

Just double checking, from that same computer if you go to

http://happyfuntimes.net?verbose=true&go=false

you get this?

hft response: {"gameIps":[],"publicIps":["2601:204:c702:5f87:3d3d:d184:f486:1e8a"]}

@buckslice
Copy link
Author

buckslice commented Dec 15, 2016

Oh... well I just checked again and now it says this for my computer

checking: http://happyfuntimes.net/api/getgames2
hft response: {"gameIps":[],"publicIps":["98.252.69.77"]}

@greggman
Copy link
Owner

It seems like your Windows machine is not using IPv6 but all your phones are. Can you check for example the network settings for you PC?

Pick your ethernet or wifi adaptor, whichever you're using to connect to the internet

win-network-settings

then make sure IPv6 is enabled

win-network-properties

Otherwise there's also this script which is supposed to enable IPv6 (just incase it was disabled)

https://support.microsoft.com/en-us/kb/929852

@buckslice
Copy link
Author

buckslice commented Dec 15, 2016

Hmm well I checked the network properties and IPV6 is enabled, I also ran the microsoft script but it didn't change anything. I rechecked the happyfuntimes.net test and it returned the same, but about 2 minutes later I tried again and now it shows this:

checking: http://happyfuntimes.net/api/getgames2
hft response: {"gameIps":["10.0.0.97:18679","[fe80::3d3d:d184:f486:1e8a]:18679"],"publicIps":["98.252.69.77"]}
ping hft: 10.0.0.97:18679
ping hft: [fe80::3d3d:d184:f486:1e8a]:18679

Phones still can't find my computer though through happyfuntimes.net. I feel like it might be my router maybe. I have some weird comcast router that has both a 2.4 ghz and a 5 ghz wireless networks that can be connected to. I am always connected to the 5ghz one but it seems complicated. Heres my full ipconfig if that helps at all.

screenshot 2016-12-15 03 09 16

prob not great to have all this information out here publicly but whatever lol

@greggman
Copy link
Owner

greggman commented Dec 20, 2016

So I hacked some stuff into happyfuntimes.net that might make your situtation work? Please try running the game then going to happyfuntimes.net on your phone.

If what I changed doesn't work please repeat these steps just so I can see if it's doing anything new.

@buckslice
Copy link
Author

Yes that made it work now! Is happyfuntimes.net basically just a website you run that lets you change how the phones/browsers connect without having to redownload the library? thats pretty cool!

Thanks for the help. I look forward to working on a new game with your library now!

@greggman
Copy link
Owner

happyfuntimes.net is just a website that tries to redriect users to your local computer. So, instead of having to manually type http://[2601:204:c702:5f87:3d3d:d184:f486:1e8a]:18679 they can go to happyfuntimes.net and it will just effectively type http://[2601:204:c702:5f87:3d3d:d184:f486:1e8a]:18679 for them 😄

Unfortunately it's not always trivial to figure out where to the send them 😅

@greggman
Copy link
Owner

BTW the code for happyfuntimes.net is here https://github.com/greggman/happyfuntimes.net if you ever want to run your own server (like if you have a hit game and you want people to go to myawesomegame.com instead of happyfuntimes.net)

@buckslice
Copy link
Author

Okay, cool! Thanks again for all the help. Hopefully you didn't have to ruin your code too hard to get it working for me XD

Happy holidays!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants