MattIPv4 / DNS-over-Discord

1.1.1.1 works from a Discord server, thanks to the 1.1.1.1 bot. Invite the bot to your Discord server to start using DNS over Discord.
https://dns-over-discord.v4.wtf/invite
Apache License 2.0
281 stars 31 forks source link

Allow disabling DNSSEC with cdflag #65

Closed Dhravya closed 2 years ago

Dhravya commented 2 years ago

Hey @MattIPv4 can you please review this and let me know if any changes need to be made? I was unable to test it

MattIPv4 commented 2 years ago

👋 I'm not sure what exactly your last commit did, but you appear to have caused a diff across every single file in the repo now? Have you changed the line endings on everything perhaps?

Dhravya commented 2 years ago

That's weird - I've not changed anything manually, except for the dns.js file

MattIPv4 commented 2 years ago

If you're using a Windows system, make sure git is configured to use lf endings, not crlf endings. It should warn you about this though when you staged/committed this massive change.

Dhravya commented 2 years ago

Oh - I got it now. Any way to undo it?

MattIPv4 commented 2 years ago

If you've updated git to use lf endings, I'd expect it'd now let you commit again to revert it all -- or you could just drop the last commit and redo the change.

Dhravya commented 2 years ago

HELL YES! Done

image
Dhravya commented 2 years ago

Ok I was testing if everything works fine and I noticed a mistake i made

So I followed the cloudflare docs (https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/) and added the cd bit to the JSON and DNS lookup snippets, but this causes an error when using google's DNS lookup (8.8.8.8)

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at async performLookup (worker.js:10086:42)
    at async Promise.all (index 0)
    at async handleDig (worker.js:14844:21)
    at async worker.js:17271:35 at line 0, col 0
Dhravya commented 2 years ago

Wait.... it should still work with 8.8.8.8, that's odd

image
Dhravya commented 2 years ago

dns.google is returning Error 400 (Bad Request)!!

MattIPv4 commented 2 years ago

Before I can start reviewing this, you're going to need to revert the line ending changes that you've made to every file here

Dhravya commented 2 years ago

Ok! I'll revert the commit and do the same changes again

Dhravya commented 2 years ago

Done! @MattIPv4

Dhravya commented 2 years ago

Hey @MattIPv4 I think all the changes are done (soo sorry for all the trouble)

Dhravya commented 2 years ago

Fixed eslint errors

Dhravya commented 2 years ago

Made the changes

Dhravya commented 2 years ago

cool, thanks a lot! I genuinely learnt so much through this one PR and I definitely look forward to contributing more to this repository!