lowercase

This commit is contained in:
Frank Denis 2019-11-01 23:06:42 +01:00
parent 8d191cdcf1
commit b30904f20b
2 changed files with 3 additions and 3 deletions

View File

@ -266,7 +266,7 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
proxy.xTransport.tlsCipherSuite = config.TLSCipherSuite
proxy.xTransport.mainProto = proxy.mainProto
if len(config.FallbackResolver) > 0 {
if err := IsIPAndPort(config.FallbackResolver); err != nil {
if err := isIPAndPort(config.FallbackResolver); err != nil {
dlog.Fatalf("fallback_resolver [%v]", err)
}
proxy.xTransport.ignoreSystemDNS = config.IgnoreSystemDNS
@ -689,7 +689,7 @@ func cdLocal() {
os.Chdir(filepath.Dir(exeFileName))
}
func IsIPAndPort(addrStr string) error {
func isIPAndPort(addrStr string) error {
host, port := ExtractHostAndPort(addrStr, -1)
if ip := ParseIP(host); ip == nil {
return fmt.Errorf("Host does not parse as IP '%s'", addrStr)

View File

@ -59,7 +59,7 @@ type XTransport struct {
}
func NewXTransport() *XTransport {
if err := IsIPAndPort(DefaultFallbackResolver); err != nil {
if err := isIPAndPort(DefaultFallbackResolver); err != nil {
panic("DefaultFallbackResolver does not parse")
}
xTransport := XTransport{