Ah, yes, I misunderstood you, sorry.
It works fine on x86_64, armv7l and even haiku64. it's just aarch64 that's weird
This works for me on x86_64 with a given web address that I know exists. You're
selecting random web addresses. I'm not familiar with how many IP numbers are
actually taken, but maybe you should try it with a web address that you know
exists.
Just recently I found weird results when testing my RandIP on Aarch64 compared
to Armv7l or even x86_64.
Every connection even if false comes out as true on aarch64 compared to any
other Arch
nim '''
proc main(): string {.discardable.} =
randomize()
var
ip0 = rand(1..255) ip1 = rand(2