OnionForge generates custom .onion addresses for Tor hidden services using brute force. Specify a prefix or regex pattern to find matching .onion addresses. Includes a simulation mode to estimate the time needed to find a match.
To run the program, use the following command:
cargo run --release <prefix> [--simulate] [--no-stop]<prefix>: The prefix you want the .onion address to start with. If it starts with r/, it is treated as a regex pattern.--simulate: Run the program in simulation mode for 10 seconds to estimate generation time.--no-stop: Continue generating and saving keys even after finding a match.--no-header: Do not include the header required by Tor service (ed25519v1-secret: type0).--gpu: Enable GPU acceleration for key generation (experimental). Note: Current GPU implementation may not provide significant performance improvements over CPU processing.
cargo run --release myprefix
cargo run --release r/^mypattern.*
cargo run --release myprefix --simulate
No simulation mode for regex patterns
cargo run --release myprefix --no-stop
torutcrate for Tor Onion service key generation.regexcrate for regex pattern matching.num_cpuscrate for detecting the number of CPUs.
Setting up a Hidden Service with Generated Keys
- Generate a key with the header using the program (if you used
--no-header, manually add the headered25519v1-secret: type0to the key file) - Set up a web server (Nginx, Apache, etc.)
- Edit
/etc/tor/torrcand configure HiddenService directory and port - Restart Tor service to create the folder and initial files (some systems use
tor@defaultservice name) - Copy the generated key to the HiddenService folder with the name
hs_ed25519_secret_key - Restart the Tor service
- Verify with
cat /path/to/hidden/service/hostnameto check the onion URL
