MCPcopy Index your code
hub / github.com/ARwMq9b6/dnsproxy

github.com/ARwMq9b6/dnsproxy @v0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.1 ↗ · + Follow
95 symbols 193 edges 10 files 27 documented · 28%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dnsproxy

Travis status

DNS 服务器 + 代理服务器

作为 DNS 服务器使用时

  • 中国大陆的域名 通过国内 DNS 服务器查询
  • gfwlist 中的域名通过代理服务器向国外 DNS 服务器查询
  • 不在以上两者中的域名:先通过代理服务器向国外 DNS 服务器查询,如果得到中国大陆 IP 则再通过国内 DNS 服务器查询一次以试图获取更好的 IP 质量

作为代理服务器使用时

获取与安装

直接下载二进制文件

See the releases page

通过 docker 编译

$ docker build -t dnsproxy https://raw.githubusercontent.com/ARwMq9b6/dnsproxy/master/cmd/dnsproxy/Dockerfile
$ docker run -v $PWD/target:/target dnsproxy

本地编译

$ go get -d -u github.com/ARwMq9b6/dnsproxy
$ cd $GOPATH/src/github.com/ARwMq9b6/dnsproxy/cmd/dnsproxy
$ make

Extension points exported contracts — how you extend this code

DomainMatcher (Interface)
check if a domain in - gfw list - obedient list - neither [1 implementers]
domain_matcher.go

Core symbols most depended-on inside this repo

Add
called by 21
cache.go
MsgExtractAnswer
called by 10
libdns_utils.go
legallySpawnExchange
called by 8
libdns_utils.go
MsgSetECSWithAddr
called by 6
libdns_utils.go
setRedirect
called by 5
proxyserve.go
Close
called by 5
proxyserve.go
Get
called by 4
cache.go
legallySpawnQuery
called by 4
libdns_utils.go

Shape

Method 40
Function 34
Struct 14
Interface 6
TypeAlias 1

Languages

Go100%

Modules by API surface

proxyserve.go35 symbols
cmd/dnsproxy/config.go14 symbols
libdns_utils.go10 symbols
cache.go10 symbols
cmd/dnsproxy/generator.go6 symbols
dnsserve.go5 symbols
globals.go4 symbols
dns_over_https/google/lib.go4 symbols
cmd/dnsproxy/main.go4 symbols
domain_matcher.go3 symbols

For agents

$ claude mcp add dnsproxy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page