lowercase
This commit is contained in:
parent
8d191cdcf1
commit
b30904f20b
|
@ -266,7 +266,7 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
|
||||||
proxy.xTransport.tlsCipherSuite = config.TLSCipherSuite
|
proxy.xTransport.tlsCipherSuite = config.TLSCipherSuite
|
||||||
proxy.xTransport.mainProto = proxy.mainProto
|
proxy.xTransport.mainProto = proxy.mainProto
|
||||||
if len(config.FallbackResolver) > 0 {
|
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)
|
dlog.Fatalf("fallback_resolver [%v]", err)
|
||||||
}
|
}
|
||||||
proxy.xTransport.ignoreSystemDNS = config.IgnoreSystemDNS
|
proxy.xTransport.ignoreSystemDNS = config.IgnoreSystemDNS
|
||||||
|
@ -689,7 +689,7 @@ func cdLocal() {
|
||||||
os.Chdir(filepath.Dir(exeFileName))
|
os.Chdir(filepath.Dir(exeFileName))
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsIPAndPort(addrStr string) error {
|
func isIPAndPort(addrStr string) error {
|
||||||
host, port := ExtractHostAndPort(addrStr, -1)
|
host, port := ExtractHostAndPort(addrStr, -1)
|
||||||
if ip := ParseIP(host); ip == nil {
|
if ip := ParseIP(host); ip == nil {
|
||||||
return fmt.Errorf("Host does not parse as IP '%s'", addrStr)
|
return fmt.Errorf("Host does not parse as IP '%s'", addrStr)
|
||||||
|
|
|
@ -59,7 +59,7 @@ type XTransport struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewXTransport() *XTransport {
|
func NewXTransport() *XTransport {
|
||||||
if err := IsIPAndPort(DefaultFallbackResolver); err != nil {
|
if err := isIPAndPort(DefaultFallbackResolver); err != nil {
|
||||||
panic("DefaultFallbackResolver does not parse")
|
panic("DefaultFallbackResolver does not parse")
|
||||||
}
|
}
|
||||||
xTransport := XTransport{
|
xTransport := XTransport{
|
||||||
|
|
Loading…
Reference in New Issue