serve a static website as a .onion hidden service

hidden service server

A CLI that will host a static website as a .onion hidden service.

Comes with an additional binary that can be used to generate vanity .onion addresses.

Requirements

  • go1.17
  • tor 0.4.x
    • download source here https://www.torproject.org/download/tor/ or wget https://dist.torproject.org/tor-0.4.6.10.tar.gz
    • download additional dependencies: sudo apt install libevent-dev libssl-dev zlib1g zlib1g-dev -y
    • extract files (tar -xzf) and navigate to directory
    • ./configure && make && sudo make install. Check that tor is installed with tor --version.

Usage

Build

make build

This places the binaries onioncli and onionaddress in the project root.

Run

Instead of building the project, you can also run it:

go run ./cmd/... [flags]

Usage

To serve a static website:

./onioncli --serve-dir ~/my-website
$ 2022-04-13T10:44:44.217-0400	INFO	cmd	cmd/main.go:153	Open Tor browser and navigate to http://7ukuzklqxkwesfs3dla5zzj3bsjb6v2rx25bq3fr662qistclpixgxqd.onion

If you have run the CLI before and have a server private key already (by default stored in service.key), you can pass it to the CLI so that the .onion address used will be the same as before.

./onioncli --private-key=service.key --serve-dir ~/my-website

You can also turn on debug logs with --log=debug.

Vanity addresses

To find a vanity address and its private key:

./onionaddress --prefix <some-prefix> --count=3

This will search for and print 3 .onion addresses with the given prefix and their corresponding private keys. The private keys can be used with onioncli --private-key=<keyfile>.

Note: for 4-letter prefixes and less, this process is quite quick. For 5-letter prefixes, it took around ~30 minutes on my machine to find 1 address, for a 6-letter prefix, it took ~90 minutes. This grows exponentially the longer the prefix gets.

Owner
Elizabeth // Software Engineer at @ChainSafe
null
Similar Resources

Serve endpoint metadata for client side load balancing

Servok Servok is a service that provides endpoint metadata for client side load balancing. See CONTRIBUTING.md for instructions on how to contribute a

Dec 9, 2021

Check DNS and optionally Consul and serve the status from a Web page

dns-checker Table of contents Preamble Compiling the program Keepalived and LVS Available options Setting up systemd Preamble This application checks

Nov 7, 2021

Transparent TLS and HTTP proxy serve and operate on all 65535 ports, with domain regex whitelist and rest api control

goshkan Transparent TLS and HTTP proxy serve & operating on all 65535 ports, with domain regex whitelist and rest api control tls and http on same por

Nov 5, 2022

A CoreDNS plugin to serve temporary TXT records for validation purposes (eg. Let's Encrypt DNS-01)

temptxt Name temptxt - serves TXT records for validation purposes (eg. ACME DNS-01 challenge) updated through a HTTP api. Description The temptxt plug

Aug 23, 2022

GoHTTPdirlist - Serve files and directories with Golang based http server

GoHTTPdirlist - Serve files and directories with Golang based http server

List Files and Directories with GoLang based HTTP Server TO MAKE IT WORK: go run

May 18, 2022

Pape-server - A small server written in golang to serve a random wallpaper.

pape-server I like to inject custom CSS themes into a lot of websites and electron apps, however browsers don't let websites access local disk through

Dec 31, 2021

An autoclaimer for the website We Heart It

weheartit-claimer An autoclaimer for the website We Heart It Table of contents Setting up the claimer Understanding the configuration files Setup Firs

May 26, 2021

CDN for the Tech With Tim website using Go

CDN for the Tech With Tim website using Go

Tech With Tim - CDN CDN for the Tech With Tim website using Go ๐Ÿ“ Table of Contents ๐Ÿ Getting Started Environment variables Running ๐Ÿณ Running with D

Apr 29, 2022

Access my website from the terminal with SSH!

Access my website from the terminal with SSH!

daniel.is-a.dev (ssh version) What is this? I built a SSH server written in Golang that lets you basically view my website all from the terminal. You

Nov 11, 2022
Related tags
Simple, secure and modern Go HTTP server to serve static sites, single-page applications or a file with ease

srv srv is a simple, secure and modern HTTP server, written in Go, to serve static sites, single-page applications or a file with ease. You can use it

Sep 7, 2022
Shrek is a vanity .onion address generator written in Go.
Shrek is a vanity .onion address generator written in Go.

Shrek Shrek is a vanity .onion address generator written in Go. Usage (CLI) Shrek compiles to a single binary that can be used on the CLI. To build an

Aug 16, 2022
Vanitytorgen - Vanity Tor keys/onion addresses generator

Vanity Tor keys/onion addresses generator Assumptions You know what you are doing. You know where to copy the output files. You know how to set up a H

May 12, 2022
Onion addresses for anything.

onionpipe Onion addresses for anything. onionpipe forwards ports on the local host to remote Onion addresses as Tor hidden services and vice-versa. Wh

Jan 1, 2023
Static file server that service content required by dan's services

Static file server that service content required by dan's services.

Jan 20, 2022
Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service.

Service that calls uzma24/project1 service, takes input from .txt file and prints JSON output returned from the service. Program can take large input files.

Feb 6, 2022
Serve vanity URLs to Go tools.

goovus serves vanity URLs to Go tools. What's In A Name? go Made for Go. o Open as in open source. vus vanity url server. go + o + vus gives goovus. Q

Sep 28, 2021
fetch and serve papers in p2p network

sci-hub P2P A project aims to fetch paper from the BitTorrent network. This is not a cli client of sci-hub website. English Introduction ไธญๆ–‡็ฎ€ไป‹ Contribu

Dec 13, 2022
TFTP and HTTP server specifically designed to serve iPXE ROMs and scripts.
TFTP and HTTP server specifically designed to serve iPXE ROMs and scripts.

pixie TFTP and HTTP server specifically designed to serve iPXE ROMs and scripts. pixie comes embedded with the following ROMs provided by the iPXE pro

Dec 31, 2022
Serve traffic (HTTP/gRPC) over SSH using Domain Sockets

Serve On SSH Introduction There is often a need to offer services for administrative purposes on servers or even for microservices that are running on

Nov 10, 2022