gopac icon indicating copy to clipboard operation
gopac copied to clipboard

ReferenceError: 'myIpAddressEx' is not defined error while trying to find proxy entry

Open SureshdKumar opened this issue 6 years ago • 0 comments

Hi,

I am using GoPac package to parse and find proxy from PAC file. I have followed the example and able to parse the auto config URL using parse.ParseURL() however while trying to find the proxy entry, getting below error.

Sample Code:

            parser := new(gopac.Parser)
	if err := parser.ParseUrl(autoConfigURL); err != nil {
		log.Fatalf("Failed to parse PAC (%s)", err)
	}

	// find the proxy entry for host check.immun.es
	entry, err := parser.FindProxy("", "proxyconf")

	if err != nil {
		log.Fatalf("Failed to find proxy entry (%s)", err)
	}

Error: 2019/08/29 08:56:51 Failed to find proxy entry (ReferenceError: 'myIpAddressEx' is not defined)

I am running the above code directly in main(). I tried replacing myIpAddressEX() with myIpAddress for IPv4 still same issue.

Any assistance is greatly appreciated.

SureshdKumar avatar Aug 29 '19 03:08 SureshdKumar