Coder Social home page Coder Social logo

gohttpdns's Introduction

goHttpDns

Go Report Card

A HttpDns Server Written by Go, In order to avoid Dns hijacking and cache resolve answer

一个用 Go 写的 HttpDns 服务, 为了抵抗运营商邪恶的 DNS 劫持污染,并带有缓存功能 。

How To Compile

cd $GOPATH;
git clone http://github.com/zheng-ji/goHttpDns;
cd src;
make

How To Configure

# redis connect config
redis:
  host: 127.0.0.1:6379
  db: 0

# seelog config 
log_config: ../etc/logger.xml

# ip & port & answer cache TTL
listen: 0.0.0.0
port: 9999
ttl: 100

# DnsServer lists
dnsservers:
    - 202.96.128.86
    - 202.96.128.166
    - 8.8.8.8
    - 8.8.4.4

How To Run

After make, a binary executable file called httpDns will be generated under the bin directory

$ ./httpDns --help
Usage of ./httpDns:
  -c="../etc/conf.yml": conf file,default is ../etc/conf.yml

./httpDns -c="your_conf_yaml_path"

You can also use supervisor to start your sever

How To Use

$ curl http://127.0.0.1:9999/d?url=http://zheng-ji.info

Resp:
{
    "c":0,
    "targetip":"http://106.185.48.24",
    "host":"zheng-ji.info",
    "msg":""
}

Dependence Third Part Lib

Thanks to:

You need to go get the list above

License

Copyright (c) 2015 by zheng-ji released under a MIT style license.

gohttpdns's People

Contributors

zheng-ji 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.