An open API service indexing awesome lists of open source software.

https://github.com/mementomori11723/dark-web

A repo that can be used to deploy a server on dark web.
https://github.com/mementomori11723/dark-web

dark-web-sites docker docker-compose go golang onion onion-routing tor

Last synced: about 2 months ago
JSON representation

A repo that can be used to deploy a server on dark web.

Awesome Lists containing this project

README

          

# ๐ŸŒ‘ Dark Web Website (Vanity Onion Service)

A minimalist and secure `.onion` website served over the Tor network. Built with Go, containerized using Docker, and powered by a vanity Tor hidden service.

---

## ๐Ÿ“ Project Structure

```
.
โ”œโ”€โ”€ ansible/ # Ansible playbook for server setup
โ”‚ย ย  โ””โ”€โ”€ playbook.yml
โ”œโ”€โ”€ app.go # Main app entrypoint
โ”œโ”€โ”€ config/ # Docker and Tor configuration
โ”‚ย ย  โ”œโ”€โ”€ compose.yml # Docker Compose file
โ”‚ย ย  โ”œโ”€โ”€ config.go # App config
โ”‚ย ย  โ”œโ”€โ”€ Dockerfile # Dockerfile for the Go app
โ”‚ย ย  โ””โ”€โ”€ tor/
โ”‚ย ย  โ”œโ”€โ”€ Dockerfile # Dockerfile for Tor hidden service
โ”‚ย ย  โ”œโ”€โ”€ torrc # Tor config
โ”‚ย ย  โ””โ”€โ”€ vanity/ # Vanity onion keys
โ”‚ย ย  โ”œโ”€โ”€ hostname
โ”‚ย ย  โ”œโ”€โ”€ hs_ed25519_public_key
โ”‚ย ย  โ””โ”€โ”€ hs_ed25519_secret_key
โ”œโ”€โ”€ go.mod # Go module file
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ Makefile # CLI commands
โ”œโ”€โ”€ README.md # This file
โ””โ”€โ”€ server/
โ”œโ”€โ”€ assets/ # Static assets
โ”‚ย ย  โ””โ”€โ”€ tor.png
โ”œโ”€โ”€ pages/ # HTML templates
โ”‚ย ย  โ”œโ”€โ”€ about.html
โ”‚ย ย  โ”œโ”€โ”€ error.html
โ”‚ย ย  โ”œโ”€โ”€ index.html
โ”‚ย ย  โ””โ”€โ”€ layout.html
โ””โ”€โ”€ server.go # HTTP handlers and routes
```

---

## โš™๏ธ Getting Started

### ๐Ÿณ Run with Docker

Run the app and Tor hidden service in detached mode:

```bash
make run
```

Stop everything and clean up:

```bash
make stop
```

This will:

* Build and start the Go app
* Start a Tor container exposing the site as a hidden service
* Output the `.onion` address from `config/tor/vanity/hostname`

To see the address:

```bash
cat config/tor/vanity/hostname
```

---

### ๐Ÿ’ป Local Development

Run the Go app on port `8080` directly without Tor:

```bash
make dev
```

It will serve the site at: [http://localhost:8080](http://localhost:8080)

---

## ๐Ÿง… Vanity Onion Service

To use your own `.onion` address:

1. Generate a vanity address using [`mkp224o`](https://github.com/cathugger/mkp224o).
2. Place the keys inside: `config/tor/vanity/`
3. Tor will serve your site at that address.

Make sure your `torrc` has:

```conf
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:8080
```

---

## ๐Ÿงช Test with Tor Locally

If Tor is running on your system:

```bash
curl --socks5-hostname 127.0.0.1:9050 http://yourvanityaddress.onion
```

---

## ๐Ÿ›ก๏ธ Onion Location Header (Optional)

If you want clearnet visitors to see your `.onion` option in Brave or Tor Browser, add this header in your Go server:

```http
Onion-Location: http://yourvanityaddress.onion
```

---

## ๐Ÿงฐ Makefile Commands

| Command | Description |
| ----------- | ----------------------------------- |
| `make run` | Start the Tor + Go app stack |
| `make stop` | Stop and remove all containers |
| `make dev` | Run the Go app locally on port 8080 |

---

## ๐Ÿ“ฆ Deployment with Ansible

Use the provided `ansible/playbook.yml` to deploy to a VPS (Docker and SSH required). Example:

```bash
ansible-playbook ansible/playbook.yml -i your_vps_ip,
```

---

## ๐Ÿ” Security Notes

* Do **not** commit `hs_ed25519_secret_key` to public repos.
* Use firewall rules or reverse proxies as needed.
* Keep your base image and Go binary minimal and hardened.

---

## ๐Ÿ“„ License

MIT ยฉ 2025 Yasasvi Gumma
Use it freely, modify it responsibly.