Last active
November 29, 2024 00:18
-
-
Save gabrielbarros/bf75290389f2b237c341db22b24e0b63 to your computer and use it in GitHub Desktop.
NextDNS import denylist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
API_KEY=xxx # Get it from https://my.nextdns.io/account | |
PROFILE_ID=xxxxxx # Get it from https://my.nextdns.io | |
tac denylist.txt | while read -r domain; do echo $domain; curl -d $"{\"id\": \"$domain\"}" -H 'Content-Type: application/json' -H "X-Api-Key: $API_KEY" https://api.nextdns.io/profiles/$PROFILE_ID/denylist; sleep 1; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment