middleware/proxy: multiple enhancements (#145)

Add port 53 in the proxy host if not specified.
Check if the host is actually an IP address (v4 or v6)
Remove the http headers and other TODOs
This commit is contained in:
Miek Gieben 2016-04-30 15:54:41 +01:00
parent 14b84ce02b
commit e635b4e773
7 changed files with 86 additions and 62 deletions

View file

@ -1,5 +1,10 @@
package proxy
// Also test these inputs:
//.:1053 {
//proxy . ::1 2001:4860:4860::8844 8.8.8.8:54 [2001:4860:4860::8845]:53
//}
/*
func init() {
tryDuration = 50 * time.Millisecond // prevent tests from hanging