warner / wireguard-vanity-address

generate Wireguard keypairs with a given prefix string
MIT License
431 stars 32 forks source link

Let it run indefinitely #20

Open strites opened 4 years ago

strites commented 4 years ago

Is there a way to let it run indefinitely? For the moment, it stops running after an arbitrary time - even without finding any key

andrewgdunn commented 3 years ago

I'll glom on here, I was going to use a good deal of electricity for vanity on a longer address (eight characters) and it appears to stop after a handful of seconds.

warner commented 2 years ago

yeah, that's definitely a good idea, I think I was being overly cautious when I first wrote that loop, but turning it into a simple infinite loop is a fine idea

jellium commented 1 year ago

How would one tweak the loop at the end of the main() function in order to have an infinite loop?

martinvonwittich commented 5 months ago

How would one tweak the loop at the end of the main() function in order to have an infinite loop?

Replacing the (0..100_000_000) with rayon::iter::repeat(0) has worked for me.