[GH-ISSUE #249] Running on Windows #100

Closed
opened 2026-02-26 04:34:03 +03:00 by kerem · 1 comment
Owner

Originally created by @DaveSwainOnBuy on GitHub (Oct 18, 2022).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/249

The docs ask for Windows users to confirm if this works for them. I am a Windows user and can confirm it does. We settled on running it within WSL2, but the commands given in the docs worked fine from PowerShell (and probably from CMD but this was not tested).

The below lets us create whatever locally served sites as we like without modifying our (locked down) hosts files. We now have domains resolved by this dns proxy server, and served by nginx. The config of these domains is right there in our codebase so if we add another service with its own domain all a dev needs to do is git pull and maybe restart some containers and they're away.

docker-compose.yml:

version: '3.8'
services:
  dns:
    container_name: local_dns
    image: defreitas/dns-proxy-server
    ports:
      - '127.0.0.1:5380:5380'
      - '127.0.0.1:53:53/udp'
    volumes:
      - '/var/run/docker.sock:/var/run/docker.sock'
      - './docker/dns:/app/conf'

  nginx:
    container_name: webserver
    ...

./docker/dns/config.json:

{
	"version": 2,
	"remoteDnsServers": [
		"8.8.8.8:53"
	],
	"envs": [
		{
			"name": "",
			"hostnames": [
				{
					"hostname": ".locally-served.testdomain",
					"ip": "127.0.0.1"
				},
				{
					"hostname": ".locally-served.statictestdomain",
					"ip": "127.0.0.1"
				}
			]
		}
	],
	"activeEnv": "",
	"webServerPort": 0,
	"dnsServerPort": 0,
	"defaultDns": null,
	"logLevel": "",
	"logFile": "",
	"registerContainerNames": null,
	"hostMachineHostname": "",
	"domain": "",
	"dpsNetwork": false,
	"dpsNetworkAutoConnect": false
}

Thanks for the awesome work, and I hope this project will be maintained for a long time as I couldn't find anything else quite like it.

Originally created by @DaveSwainOnBuy on GitHub (Oct 18, 2022). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/249 The [docs](https://mageddo.github.io/dns-proxy-server/latest/en/1-getting-started/running-it/) ask for Windows users to confirm if this works for them. I am a Windows user and can confirm it does. We settled on running it within WSL2, but the commands given in the docs worked fine from PowerShell (and probably from CMD but this was not tested). The below lets us create whatever locally served sites as we like without modifying our (locked down) hosts files. We now have domains resolved by this dns proxy server, and served by nginx. The config of these domains is right there in our codebase so if we add another service with its own domain all a dev needs to do is `git pull` and maybe restart some containers and they're away. docker-compose.yml: ``` version: '3.8' services: dns: container_name: local_dns image: defreitas/dns-proxy-server ports: - '127.0.0.1:5380:5380' - '127.0.0.1:53:53/udp' volumes: - '/var/run/docker.sock:/var/run/docker.sock' - './docker/dns:/app/conf' nginx: container_name: webserver ... ``` ./docker/dns/config.json: ``` { "version": 2, "remoteDnsServers": [ "8.8.8.8:53" ], "envs": [ { "name": "", "hostnames": [ { "hostname": ".locally-served.testdomain", "ip": "127.0.0.1" }, { "hostname": ".locally-served.statictestdomain", "ip": "127.0.0.1" } ] } ], "activeEnv": "", "webServerPort": 0, "dnsServerPort": 0, "defaultDns": null, "logLevel": "", "logFile": "", "registerContainerNames": null, "hostMachineHostname": "", "domain": "", "dpsNetwork": false, "dpsNetworkAutoConnect": false } ``` Thanks for the awesome work, and I hope this project will be maintained for a long time as I couldn't find anything else quite like it.
kerem closed this issue 2026-02-26 04:34:03 +03:00
Author
Owner

@mageddo commented on GitHub (Feb 23, 2023):

Thanks for the feedback @DaveSwainOnBuy , glad to know it's helping.

<!-- gh-comment-id:1441201793 --> @mageddo commented on GitHub (Feb 23, 2023): Thanks for the feedback @DaveSwainOnBuy , glad to know it's helping.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#100
No description provided.