Fixed endless loop bug and terminal spam
Support for IPV6

It was not extensivily tested, but is working on my browser.
Bugfix

I am not sure how this did even work before.
Merge pull request #3 from Andrepuel/ipv6

Ipv6 - improvements to support IPV6