Skip to content

Commit

Permalink
Allow binding to localhost (#371) (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevynb authored Jan 2, 2023
1 parent 2f50939 commit e2a8041
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion adguard/rootfs/etc/s6-overlay/s6-rc.d/init-adguard/run
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ schema_version=$(yq e '.schema_version // ""' "${CONFIG}")
if bashio::var.has_value "${schema_version+}"; then
if (( schema_version == 7 )); then
# Clean up old interface bind formats
yq --inplace e 'del(.dns.bind_host)' "${CONFIG}"
yq --inplace e 'del(.dns.bind_host)' "${CONFIG}"
yq --inplace e '.schema_version = 8' "${CONFIG}"
fi

Expand Down Expand Up @@ -56,6 +56,9 @@ for interface in "${interfaces[@]}"; do
hosts+=($(bashio::network.ipv6_address "${interface}"))
done
hosts+=($(bashio::addon.ip_address))
# Bind to localhost ip addresses as well.
hosts+=("127.0.0.1")
hosts+=("::1")

# Add interface to bind to, to AdGuard Home
yq --inplace e '.dns.bind_hosts = []' "${CONFIG}"
Expand Down

0 comments on commit e2a8041

Please sign in to comment.