mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
add dns for proxy inside container
This commit is contained in:
parent
ce34f302a1
commit
0d98667650
9 changed files with 37 additions and 12 deletions
|
|
@ -66,4 +66,22 @@ then
|
|||
cp /etc/supervisor/blackfire.conf /etc/supervisor/enabled/
|
||||
fi
|
||||
|
||||
if [ -n "${PROXY_BASE:-}" ]; then
|
||||
UPSTREAM_DNS=$(cat /etc/resolv.conf | grep nameserver | cut -d' ' -f 2)
|
||||
(
|
||||
RC=$(sed '/nameserver/d' /etc/resolv.conf)
|
||||
echo "$RC" > /etc/resolv.conf
|
||||
)
|
||||
echo 'nameserver 127.0.0.22' >> /etc/resolv.conf
|
||||
|
||||
echo "s/UPSTREAM_DNS/${UPSTREAM_DNS}"
|
||||
sed -i "s/UPSTREAM_DNS/${UPSTREAM_DNS}/" /etc/dnsmasq.conf
|
||||
echo "s/PROXY_BASE/${PROXY_BASE}"
|
||||
sed -i "s/PROXY_BASE/${PROXY_BASE}/" /etc/dnsmasq.conf
|
||||
echo "s/HOST_IP/${HOST_IP}"
|
||||
sed -i "s/HOST_IP/${HOST_IP}/" /etc/dnsmasq.conf
|
||||
|
||||
cp /etc/supervisor/dnsmasq.conf /etc/supervisor/enabled/
|
||||
fi
|
||||
|
||||
exec supervisord -c /etc/supervisor/supervisord.conf
|
||||
Loading…
Add table
Add a link
Reference in a new issue