Asphaltt / dnsproxy-go

A simple library for DNS proxy in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A simple library for DNS proxy

This is a completed DNS proxy.

Usage

Like example as cmd/dnsproxy

go get github.com/Asphaltt/dnsproxy-go

and use the library in your project.

	cfg := &dnsproxy.Config{
		Addr:          ":53",
		UpServers:     []string{"8.8.8.8"},
		WithCache:     true,
		CacheFile:     "cache.json",
		WorkerPoolMin: 100,
		WorkerPoolMax: 1000,
	}

	if err := dnsproxy.Start(cfg); err != nil {
		return
	}
	defer dnsproxy.Close()

Or you can compile cmd/dnsproxy to run as a dns proxy server.

License

MIT License

About

A simple library for DNS proxy in Go

License:MIT License


Languages

Language:Go 100.0%