@JeroenVannevel Maybe I did it horribly, but the whole thing is under a try fail already.
I realized that ipv4 only works if their public ip is ipv4, and same thing for ipv6. My idea was to try ipv4 and if that fails try ipv6, perhaps I just formatted it wrong, but it still only works for whichever I try first in that case.