(c net.Conn)
| 29 | ) |
| 30 | |
| 31 | func accept(c net.Conn) (net.Conn, bool) { |
| 32 | d := relay.NewProxyConn(c) |
| 33 | // if the incoming sni == our dns-server, then serve the req |
| 34 | for i := range tlsDNSNames { |
| 35 | if strings.Contains(d.HostName, tlsDNSNames[i]) { |
| 36 | return d, false |
| 37 | } |
| 38 | } |
| 39 | // else, proxy the request to the backend as approp |
| 40 | go d.Forward() |
| 41 | return d, true |
| 42 | } |
| 43 | |
| 44 | func StartPPWithDoH(tcp *proxyproto.Listener, doh DohResolver, wg *sync.WaitGroup) { |
| 45 | defer wg.Done() |
no test coverage detected