feat: Migrate from DuckDNS to Porkbun and add Wg-easy

This commit is contained in:
2025-12-09 19:36:19 +02:00
parent cab5220930
commit f69caa0934
8 changed files with 112 additions and 68 deletions

27
porkbun/porkbun_ddns.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
API_KEY="pk1_someapikeyvalue1234567890abcdef"
API_SECRET="sk1_somesecretapikeyvalueabcdef1234567890"
DOMAIN="example.com"
SUBDOMAINS=(
"vault"
"auth"
"cloud"
"vpn"
)
TTL="600"
# =================
IP="$(curl -fs https://api.ipify.org)"
for SUBDOMAIN in "${SUBDOMAINS[@]}"; do
curl -fs "https://api.porkbun.com/api/json/v3/dns/editByNameType/${DOMAIN}/A/${SUBDOMAIN}" \
-H "Content-Type: application/json" \
-d "{
\"apikey\": \"${API_KEY}\",
\"secretapikey\": \"${API_SECRET}\",
\"content\": \"${IP}\",
\"ttl\": \"${TTL}\"
}"
done