Fix source IP address

This commit is contained in:
Manuel de Brito Fontes 2017-10-05 22:55:10 -03:00
parent 23af068e17
commit 0755231469
6 changed files with 22 additions and 89 deletions

View file

@ -19,7 +19,6 @@ package template
import (
"fmt"
"net"
"regexp"
"strconv"
"strings"
@ -39,10 +38,6 @@ const (
bindAddress = "bind-address"
)
var (
realClientRegex = regexp.MustCompile(`auto|http-proxy|tcp-proxy`)
)
// ReadConfig obtains the configuration defined by the user merged with the defaults.
func ReadConfig(src map[string]string) config.Configuration {
conf := map[string]string{}
@ -125,11 +120,6 @@ func ReadConfig(src map[string]string) config.Configuration {
glog.Warningf("unexpected error merging defaults: %v", err)
}
if !realClientRegex.MatchString(to.RealClientFrom) {
glog.Warningf("unexpected value for RealClientFromSetting (%v). Using default \"auto\"", to.RealClientFrom)
to.RealClientFrom = "auto"
}
return to
}