55 lines
1.4 KiB
JavaScript
55 lines
1.4 KiB
JavaScript
//////////////////////////////////////////////////////////////////////////
|
|
// !!!!!!!!!!!!
|
|
// most functions here assume the 'domain' variable is set
|
|
// !!!!!!!!!!!!
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
function proxied(name)
|
|
{
|
|
D_EXTEND(
|
|
domain,
|
|
CNAME(name, 'rproxy.burble.dn42.')
|
|
);
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
function fqdn(name)
|
|
{
|
|
if (name === '@') {
|
|
return domain+'.';
|
|
}
|
|
return name+"."+domain+'.';
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// add a service including reverse DNS
|
|
function service(name, ipv6, ipv4)
|
|
{
|
|
if (typeof ipv6 !== 'undefined') {
|
|
D_EXTEND(domain, AAAA(name, ipv6));
|
|
D_EXTEND(rz_6, PTR(ipv6, fqdn(name)));
|
|
}
|
|
if (typeof ipv4 !== 'undefined') {
|
|
D_EXTEND(domain, A(name, ipv4));
|
|
D_EXTEND(rz_s4, PTR(ipv4, fqdn(name)));
|
|
}
|
|
}
|
|
|
|
// add a host, including reverse DNS
|
|
function host(name, ipv6, ipv4)
|
|
{
|
|
if (typeof ipv6 !== 'undefined') {
|
|
D_EXTEND(domain, AAAA(name, ipv6));
|
|
D_EXTEND(rz_6, PTR(ipv6, fqdn(name)));
|
|
}
|
|
if (typeof ipv4 !== 'undefined') {
|
|
D_EXTEND(domain, A(name, ipv4));
|
|
D_EXTEND(rz_n4, PTR(ipv4, fqdn(name)));
|
|
}
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// end of file
|