Git Product home page Git Product logo

resolver's Introduction

Resolver

A simple DNS resolver that goes through a SOCKS 5 proxy.

resolve.py

The main program.

  1. Modify and save the following snippet as [CONFIG_FILE_NAME]:
{
  "local_addr":"",
  "proxy_addr":"",
  "remote_addr":"",
  "direct_addr":""
}
  1. Write down the domain suffixes you want to query without the proxy and save as [RULESET_FILE_NAME].

  2. Run python3 resolve.py -c [CONFIG_FILE_NAME] -x [RULESET_FILE_NAME].

Command-line flags:

--config,-c [path to config file]
--rules,-x [path to ruleset file]
--laddr,-l [local listening address]
--paddr,-p [proxy address]
--raddr,-r [server to be queries through proxy]
--daddr,-d [server to be directly queried]
--log-file,-o [file to write log to]

protocol.py

This file includes an easy-to-use Buffer class, and provides a basic DNS parser with related classes. EDNS0-specific RRs are kept as is. DNSSEC is not tested.

TODO

  • Implement repacking of DNS message
    • Implement repacking with compression (kinda pointless nowadays)
  • Parse EDNS0 info
  • Reuse TCP connection with a relay on a remote server
  • Actually truncate UDP response
  • Implement DNS caching
  • Automatically choose between proxy and direct
  • More powerful rule matching

License

GPLv3

resolver's People

Watchers

James Cloos avatar ZYDIIG avatar

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.