feat: support both ipv6 and ipv4 nginx resolver
updates the script to generate the nginx resolver to support both ipv6 and ipv4
This commit is contained in:
		
							parent
							
								
									01d8bdc5e6
								
							
						
					
					
						commit
						9088101ef6
					
				| @ -13,6 +13,6 @@ else | ||||
| fi | ||||
| 
 | ||||
| mkdir -p /etc/nginx/resolvers/ | ||||
| echo resolver $(awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf) valid=10s ipv6=off";" > /etc/nginx/resolvers/resolvers.conf | ||||
| echo resolver $(grep -oP '(?<=nameserver\s)[^\s]+' /etc/resolv.conf | awk '{ if ($1 ~ /:/) { printf "[" $1 "] "; } else { printf $1 " "; } }') valid=10s ipv6=off";" > /etc/nginx/resolvers/resolvers.conf | ||||
| 
 | ||||
| cat /etc/nginx/resolvers/resolvers.conf | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user