pouya6672/masterdnsvpn

By pouya6672

โ€ขUpdated 3 months ago

MasterDnsVPN on container

Image
Networking
0

139

pouya6672/masterdnsvpn repository overview

โ MasterDnsVPN Docker Image

Containerized version of MasterDnsVPN Server Original project by masterking32 (respectfully acknowledged)


โ โš ๏ธ Overview

This Docker image runs the MasterDnsVPN server in a containerized environment and supports multi-architecture builds.

It automatically:

  • Downloads the correct binary for your architecture
  • Boots a default configuration if none exists
  • Injects your domain on first startup
  • Stores persistent data in /data

โ ๐Ÿ–ฅ Supported Architectures

  • linux/amd64
  • linux/arm/v5
  • linux/arm/v7
  • linux/arm64/v8
  • linux/mips64le

โ ๐Ÿš€ Quick Start

โ 1. Run container
docker run -d \
  --name masterdnsvpn \
  --restart unless-stopped \
  -e DOMAIN=v.example.com \
  -v $(pwd)/data:/data \
  -p 53:53/tcp \
  -p 53:53/udp \
  pouya6672/masterdnsvpn:latest

โ ๐Ÿงช Example with docker-compose

services:
  masterdnsvpn:
    image: pouya6672/masterdnsvpn:latest
    restart: unless-stopped
    environment:
      - DOMAIN=v.example.com
    volumes:
      - ./data:/data
    ports:
      - "53:53/tcp"
      - "53:53/udp"

โ โš™๏ธ Required Environment Variables

VariableDescription
DOMAINYour DNS domain (required on first run)

โš ๏ธ If DOMAIN is not set on first boot, the container will stop with an error.


โ ๐Ÿ“ Persistent Data

Stored in /data:

  • server_config.toml
  • encrypt_key.txt

You can mount it as volume:

-v ./data:/data

โ ๐Ÿง  First Run Behavior

If /data/server_config.toml does not exist:

  1. Downloads default config from upstream:

    https://github.com/masterking32/MasterDnsVPN/blob/main/server_config.toml.simple
    
  2. Renames it to server_config.toml

  3. Injects:

    DOMAIN = ["your-domain"]
    
  4. Generates encryption key automatically


โ ๐Ÿ”ง MikroTik / RouterOS Usage

For MikroTik containers:

Example:

/container mounts
add dst=/data list=MasterDnsVPN src=/containers/mounts/MasterDnsVPN

/container envs
add key=DOMAIN list=MasterDnsVPN value=v.example.com

/container add check-certificate=no dns=1.1.1.1 envlists=MasterDnsVPN hostname=MasterDnsVPN interface=MasterDnsVPN layer-dir="" mountlists=MasterDnsVPN name=MasterDnsVPN remote-image=pouya6672/masterdns:latest root-dir=/containers/data/MasterDnsVPN start-on-bo
ot=yes

โ ๐Ÿ“Œ Notes

  • DNS port 53 is required (UDP/TCP)
  • Do NOT run another DNS service on the same host
  • Designed for production use but still lightweight
  • No systemd or host modifications required

โ โค๏ธ Credits

This project is based on:

๐Ÿ‘‰ MasterDnsVPN by masterking32 https://github.com/masterking32/MasterDnsVPNโ 

All credit for the original VPN/DNS engine goes to the original author. This containerization layer only simplifies deployment and multi-platform distribution.


Tag summary

Content type

Image

Digest

sha256:d3c5d0c7dโ€ฆ

Size

36.3 MB

Last updated

3 months ago

docker pull pouya6672/masterdnsvpn