From c2dfd5ddee1ac439d763d06176cda2f178f0938d Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Tue, 25 Dec 2018 21:44:32 -0500 Subject: [PATCH] easy_domain: enable ipv6 web and dom will generate AAAA records by default now. Adapt for ipv6 changes to web_place; this makes webAtIp somewhat awkward -- users have to be assigned both an IPv4 and IPv6 address, and specify both. --- lib/easy_domain.dtl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/easy_domain.dtl b/lib/easy_domain.dtl index 5335fbe..fbee762 100644 --- a/lib/easy_domain.dtl +++ b/lib/easy_domain.dtl @@ -3,6 +3,7 @@ val web_node : (web_node) = "shelob"; val default_node : (node) = web_node_to_node web_node; val web_ip = ip_of_node (web_node_to_node web_node); +val web_ipv6 = ipv6_of_node (web_node_to_node web_node); var WebPlaces = [web_place_default web_node]; @@ -11,6 +12,7 @@ val webAt = \ host : (host) -> \\ config : Vhost -> begin dns (dnsA (literal host) (ip_of_node (web_node_to_node n))); + dns (dnsAAAA (literal host) (ipv6_of_node (web_node_to_node n))); vhost host where WebPlaces = [web_place_default n] @@ -26,12 +28,14 @@ end; val webAtIp = \ ip : (your_ip) -> + \ ipv6 : (your_ipv6) -> \ host : (host) -> \\ config : Vhost -> begin dns (dnsA (literal host) (your_ip_to_ip ip)); + dns (dnsAAAA (literal host) (your_ipv6_to_ipv6 ip)); vhost host where - WebPlaces = [web_place web_node ip] + WebPlaces = [web_place web_node ip ipv6] with config end @@ -82,7 +86,8 @@ val dom = defa : bool <- DefaultA; if defa then - dns (dnsA default (ip_of_node (web_node_to_node user_web_node))) + dns (dnsA default (ip_of_node (web_node_to_node user_web_node))); + dns (dnsAAAA default (ipv6_of_node (web_node_to_node user_web_node))) else Skip end; -- 2.20.1