Skip to content

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

@SureshdKumar

Description

@SureshdKumar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions