dns-reverse-proxy:DNS反向代理

  • T3_863240
    了解作者
  • 12.7KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-19 21:53
    上传日期
DNS反向代理 一个DNS反向代理,可将查询路由到不同的DNS服务器。 为了说明,假设有一个HTTP反向代理,但有DNS代理。 它在指定端口上同时侦听TCP / UDP IPv4 / IPv6。 由于上游服务器看不到真实的客户端IP,而是代理,因此您可以指定允许传输的IP列表(AXFR / IXFR)。 例子: $ go run dns_reverse_proxy.go -address :53 \ -default 8.8.8.8:53 \ -route .example.com.=8.8.4.4:53 \ -allow-transfer 1.2.3.4,::1 对example.net或example.com查询将转到默认值8.8.8.8:53 。 但是,对subdomain.example.com的查询将转到8.8.4.4:53 。 -default是
dns-reverse-proxy-master.zip
  • dns-reverse-proxy-master
  • debian
  • source
  • format
    12B
  • rules
    30B
  • changelog
    138B
  • control
    453B
  • dns-reverse-proxy.default
    208B
  • compat
    2B
  • init.d
    3.3KB
  • go.mod
    225B
  • README.md
    2.2KB
  • go.sum
    1.5KB
  • dns_reverse_proxy.go
    4.5KB
  • .gitignore
    266B
  • .travis.yml
    136B
  • LICENSE
    11.1KB
  • Makefile
    178B
内容介绍
# DNS reverse proxy # [![Build Status](https://api.travis-ci.org/StalkR/dns-reverse-proxy.png?branch=master)](https://travis-ci.org/StalkR/dns-reverse-proxy) [![Godoc](https://godoc.org/github.com/StalkR/dns-reverse-proxy?status.png)](https://godoc.org/github.com/StalkR/dns-reverse-proxy) A DNS reverse proxy to route queries to different DNS servers. To illustrate, imagine an HTTP reverse proxy but for DNS. It listens on both TCP/UDP IPv4/IPv6 on specified port. Since the upstream servers will not see the real client IPs but the proxy, you can specify a list of IPs allowed to transfer (AXFR/IXFR). Example: $ go run dns_reverse_proxy.go -address :53 \ -default 8.8.8.8:53 \ -route .example.com.=8.8.4.4:53 \ -allow-transfer 1.2.3.4,::1 A query for `example.net` or `example.com` will go to `8.8.8.8:53`, the default. However, a query for `subdomain.example.com` will go to `8.8.4.4:53`. `-default` is optional - if it is not given then the server will return a failure for queries for domains where a route has not been given. # Setup # Install go package, create Debian package, install: $ go get -u github.com/miekg/dns $ go get -u github.com/StalkR/dns-reverse-proxy $ cd $GOPATH/src/github.com/StalkR/dns-reverse-proxy $ fakeroot debian/rules clean binary $ sudo dpkg -i ../dns-reverse-proxy_1-1_amd64.deb Configure in `/etc/default/dns-reverse-proxy` and start with `/etc/init.d/dns-reverse-proxy start`. <!-- Alternatively with debuild: rm -f ../dns-reverse-proxy_* Build unsigned: debuild --preserve-envvar PATH --preserve-envvar GOPATH -us -uc Build with signed dsc and changes: debuild --preserve-envvar PATH --preserve-envvar GOPATH Debuild asks for the orig tarball, you can proceed (y) or create it with: tar zcf ../dns-reverse-proxy_1.orig.tar.gz --exclude debian --exclude .git --exclude .gitignore . --> # License # [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). # Thanks # - the powerful Go [dns](https://github.com/miekg/dns) library by [Miek Gieben](https://github.com/miekg) # Bugs, feature requests, questions # Create a [new issue](https://github.com/StalkR/dns-reverse-proxy/issues/new).
评论
    相关推荐