Coder Social home page Coder Social logo

fantuz / dnsproxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andreafabrizi/dnsproxy

15.0 15.0 4.0 4.93 MB

DNSProxy listens for incoming DNS requests, parses and encapsulates such queries into HTTP requests towards DoH resolvers as per RFC-8484. Upon valid response from DoH HTTP service DNSProxy will craft and send RFC-1035 compliant DNS responses back to calling client. DNSProxy protects you from privacy leaks, with option to store raw response packets

Home Page: https://tools.ietf.org/html/rfc8484

License: MIT License

Makefile 0.42% PHP 6.39% Shell 0.09% C 87.87% C++ 4.29% Go 0.41% HTML 0.21% JavaScript 0.33%
anonymity anonymization dns dns-over-https doh hex https privacy privacy-protection proxy rfc1035 rfc8484 tcp-server tor tor-network tor-proxy udp-server

dnsproxy's People

Contributors

andreafabrizi avatar fantuz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dnsproxy's Issues

classify HTTP query server formats

at least few formats and classes to break down:

  • HTTP2 and DOH only
  • robust multi standard clients (DNSP with his PHP or GO resolver)
  • non standard HTTP DNS: dns.google.com to mention one

Goal is to discover more of this public service types, in order to build few pools.

Need advice on "Hex signed 2's complement" alrgorithm

this post to track the progress of "Hex signed 2's complement" rework.

TTL value is generated from headers, but not reflected correctly in UDP packet due to wrong conversion HEX to HEX 2's.

Tracking to find help and close soon, is trivial to fix.

Sometimes no-cache for HTTP 304, returns 200. Why ? headers to blame.

DNSP and caching have a very tight relation.
If caching doesn't happen, DNSP can still go through proxy and get the desired response.
Problem is, the whole process without cache is bit slower (~100 msec per request depending on remote server's presence on the internet. It means, DNS response can get up to 200 msec per request.

Itself is not an issue, but I must have messed up with Etag and other caching headers, and I can get no cache anymore on my webserver, which happens to be behind CloudFlare caching/acceleration.

Caching was OK, it has always been working on simple Apaches/NGINX.
I want and need to repair it. Having the resource correcly cached means that we do not even need to get the 304 from the remote server, we shall pop the resource from the cache, but query string sometimes doesn't play nicely with Polipo or Squid......

DNSP doesn't seem to be impacted in its core functions, and the PHP is still fast, correct, looks good.
The problem is with cache-valdity overrides done by custom CloudFlare headers. Is a common practice for CDN, but it doesn't integrate with DNSP.

Solution: strip down the headers in the dnsp.c code programmatically, and fine tune HTTP cache to accept the suggested validity (14400).

"make" encounter error

HI.

yudeMacBook-Air:DNSProxy-by-fantuz brite$ make
gcc -w -c dnsp.c
gcc dnsp.o -O2 -Wall -W -pedantic -g -rdynamic -DTLS -L/usr/local/lib -lcurl -lpthread -lrt -w -o dnsp
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [dnsp] Error 1
yudeMacBook-Air:DNSProxy-by-fantuz brite$

how to fix it? tks

proper expiry of HTTP header with TTL

As I was bit lazy, I forgot to add the TTL override setting...
my bad !

to summarize, i am creating this issue to track the TTL handling between DNS and HTTP responses.

So far we offer a static TTL although we could (should) return the TTL value to be reflected in the generated HTTP response.

easy-peasy (10-20 minutes), this issue is just a tracker, wip wip wip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.