Skip to content

Commit

Permalink
Allow extending dnsmasq by providing custom configuration. (#162)
Browse files Browse the repository at this point in the history
* Allow extending dnsmasq by providing custom configuration.

* update README with optional dnsmasq config
  • Loading branch information
ThisIsQasim authored Jun 6, 2021
1 parent 728e0eb commit 488a762
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,20 @@ docker create \
--network host \
--cap-add NET_ADMIN \
--volume /data:/data \
# Optional directory for mounting dnsmasq configurations
--volume /etc/dnsmasq.d:/etc/dnsmasq.d \
--env SUBSPACE_HTTP_HOST="subspace.example.com" \
# Optional variable to change upstream DNS provider
# Optional variable to change upstream DNS provider
--env SUBSPACE_NAMESERVERS="1.1.1.1,8.8.8.8" \
# Optional variable to change WireGuard Listenport
# Optional variable to change WireGuard Listenport
--env SUBSPACE_LISTENPORT="51820" \
# Optional variables to change IPv4/v6 prefixes
--env SUBSPACE_IPV4_POOL="10.99.97.0/24" \
--env SUBSPACE_IPV6_POOL="fd00::10:97:0/64" \
# Optional variables to change IPv4/v6 Gateway
# Optional variables to change IPv4/v6 Gateway
--env SUBSPACE_IPV4_GW="10.99.97.1" \
--env SUBSPACE_IPV6_GW="fd00::10:97:1" \
# Optional variable to enable or disable IPv6 NAT
# Optional variable to enable or disable IPv6 NAT
--env SUBSPACE_IPV6_NAT_ENABLED=1 \
# Optional variable to disable DNS server. Enabled by default.
# consider disabling DNS server, if supporting international VPN clients
Expand All @@ -203,6 +205,7 @@ services:
container_name: subspace
volumes:
- /opt/docker/subspace:/data
- /opt/docker/dnsmasq:/etc/dnsmasq.d
restart: always
environment:
- SUBSPACE_HTTP_HOST=subspace.example.org
Expand Down
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ if [[ ${SUBSPACE_DISABLE_DNS} == "0" ]]; then
# Never forward addresses in the non-routed address spaces.
bogus-priv
# Allow extending dnsmasq by providing custom configurations.
conf-dir=/etc/dnsmasq.d
DNSMASQ

mkdir -p /etc/service/dnsmasq
Expand Down

0 comments on commit 488a762

Please sign in to comment.