Skip to content

Conversation

@alphaO4
Copy link

@alphaO4 alphaO4 commented Jan 3, 2026

This fork adds support for scanning the full IPv4 address space, inspired by u/TheG0AT0fAllTime's comment in this reddit thread..

It does so by using the Feistel cipher for randomized IPv4 addresses (Could be improvemend by filtering for only public IP spaces and excluding government and businesses ranges), and scanning them for an open TCP Port 3000 (configurable).
If a valid IP:PORT is found, it sends an initial HEARTBEAT message. All subsequent heartbeats are validated by verifying the PoW (Proof-of-Work) and ed25519 signature. This is mainly to prevent the connection to a random appliance running on port 3000.

  • Disclaimer: The Code is Human, the comments in the code however where written by AI.

Comment on lines +210 to +211
**Q: Should I enable IPv4 scanning?**
A: Probably not. DHT discovery works fine and doesn't require any special configuration. IPv4 scanning is there if you want extremely slow initial peer discovery or if you hate your IP's reputation, but it is not necessary for the network to function. Most deployments should just leave it disabled and let DHT do its thing.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LMFAO

Copy link
Author

@alphaO4 alphaO4 Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it is pure and utterly stupid.
While it can work, with only 200 nodes you might as-well play the lottery.

That being said, I had some successful connections running. (Running the code on 3 containers with 170 Addresses/Sec)

@lklynet
Copy link
Owner

lklynet commented Jan 8, 2026

I can't in good conscience approve this -- I'm so sorry.

@lklynet lklynet closed this Jan 8, 2026
@alphaO4
Copy link
Author

alphaO4 commented Jan 8, 2026

Hey @lklynet,
Thank you for the feedback!
May I ask why? I thought with the Scanning option being an explicit OPT-IN it would be fine.

I am of course respecting your decision; I am just interested in your reasoning.

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

Successfully merging this pull request may close these issues.

3 participants