proxy: add a new interface proxy to distinguish client and server

This commit is contained in:
nadoo committed 2019-09-18 19:40:14 +08:00
1 parent 6c8141e43b
commit edcb21236a
27 files changed
+371 -398

No files matched your search

+2 -2
View File
@@ -22,8 +22,8 @@ type Server struct {
}
// NewServer returns a new dns server.
func NewServer(addr string, dialer proxy.Dialer, config *Config) (*Server, error) {
c, err := NewClient(dialer, config)
func NewServer(addr string, proxy proxy.Proxy, config *Config) (*Server, error) {
c, err := NewClient(proxy, config)
s := &Server{
addr: addr,
Client: c,