rxfr isn't a thing

master
Keith Irwin 2023-03-31 14:21:18 -06:00
parent 5a80881f25
commit 734f48022b
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
3 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ elif ! [[ ${#username} -ge 3 ]]; then
fi
# Check if user already exists
if /usr/lib/wgapi/ns_lookup_rxfr | grep ".${username}.${TLD}" >/dev/null; then
if /usr/lib/wgapi/ns_lookup_axfr | grep ".${username}.${TLD}" >/dev/null; then
printf 'User %s already exists!\n' "${username}" | tee >(cat 1>&2) | /usr/lib/wgapi/http_res 409
exit
fi

View File

@ -1,7 +1,7 @@
#!/bin/bash
# FILE: ips_to_peers
# DESCRIPTION: Takes a list of IPs from wg show allowed-ips
# and adds domains using rxfr lookups
# and adds domains using axfr lookups
# USAGE: ips_to_peers json <<<"${user_peers}"
# ERRORS:
# 3: bad usage
@ -13,7 +13,7 @@ source /etc/wgapi/config
format="${1}"
# Perform AXFR lookup
res="$(/usr/lib/wgapi/ns_lookup_rxfr)" || exit 4
res="$(/usr/lib/wgapi/ns_lookup_axfr)" || exit 4
# This should read from stdin
# TODO: Run this loop in parallel