Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deno DoH: Blocking not working #51

Closed
amithm7 opened this issue Jan 24, 2022 · 5 comments
Closed

deno DoH: Blocking not working #51

amithm7 opened this issue Jan 24, 2022 · 5 comments

Comments

@amithm7
Copy link
Contributor

amithm7 commented Jan 24, 2022

doh -k facebook.com https://dns.rethinkdns.localhost:8080/1:4AcHAP__________-f8\=

should be blocked, but isn't.

@amithm7
Copy link
Contributor Author

amithm7 commented Jan 24, 2022

Something here is losing the config / url?

// doc.deno.land/deno/stable/~/Deno.RequestEvent
// deno.land/manual/runtime/http_server_apis#http-requests-and-responses
const req = requestEvent.request as Request;
const rw = requestEvent.respondWith.bind(requestEvent) as Function;
res = handleRequest(mkFetchEvent(req, rw));

This is the only change I see...

Also, type assertion (as Type) isn't required on line 108 & 109 as there is no ambiguity.

@ignoramous
Copy link
Contributor

ignoramous commented Jan 24, 2022

The "blocklist" Map was always adjudged "empty" on Deno (and hence blocking didn't work), because of this line of code:

if (!m.__proto__.hasOwnProperty("size")) return true;

Seems like __proto__ isn't Deno's cup of tea...

@ignoramous
Copy link
Contributor

Blocks should be up and running on Deno now: 881d891

@amithm7
Copy link
Contributor Author

amithm7 commented Jan 24, 2022

@ignoramous yes, blocking works on deno now, but node/ fly is broken with that commit: https://github.com/serverless-dns/serverless-dns/runs/4924780290?check_suite_focus=true

@ignoramous
Copy link
Contributor

Fixed: 15f5df6 Thanks. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants