Add support for IPv6 (#76)

pull/79/merge
Mateusz Kowalski 2021-02-05 07:46:49 +01:00 committed by GitHub
parent 51585675e6
commit b9e5c932ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@ set -Eeuo pipefail
trap "echo TRAPed signal" HUP INT QUIT TERM trap "echo TRAPed signal" HUP INT QUIT TERM
#configure nginx DNS settings to match host, why must we do that nginx? #configure nginx DNS settings to match host, why must we do that nginx?
conf="resolver $(/usr/bin/awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf) ipv6=off; # Avoid ipv6 addresses for now" conf="resolver $(/usr/bin/awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf);"
[ "$conf" = "resolver ;" ] && echo "no nameservers found" && exit 0 [ "$conf" = "resolver ;" ] && echo "no nameservers found" && exit 0
confpath=/etc/nginx/resolvers.conf confpath=/etc/nginx/resolvers.conf
if [ ! -e $confpath ] || [ "$conf" != "$(cat $confpath)" ] if [ ! -e $confpath ] || [ "$conf" != "$(cat $confpath)" ]

View File

@ -14,7 +14,7 @@ http {
map_hash_bucket_size 128; map_hash_bucket_size 128;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
# Include nginx timeout configs # Include nginx timeout configs
include /etc/nginx/nginx.timeouts.config.conf; include /etc/nginx/nginx.timeouts.config.conf;
@ -133,6 +133,7 @@ http {
# The proxy director layer, listens on 3128 # The proxy director layer, listens on 3128
server { server {
listen 3128; listen 3128;
listen [::]:3128;
server_name proxy_director_; server_name proxy_director_;
# dont log the CONNECT proxy. # dont log the CONNECT proxy.