Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Automatic Pac Lookup fails on Windows 7 due to invalid flags #6

Closed
lanoxx opened this issue Jan 23, 2019 · 7 comments
Closed

Comments

@lanoxx
Copy link

lanoxx commented Jan 23, 2019

In pac_windows.go:70 we find the following line:

dwFlags:                fWINHTTP_AUTOPROXY_CONFIG_URL + fWINHTTP_AUTOPROXY_NO_CACHE_CLIENT + fWINHTTP_AUTOPROXY_NO_CACHE_SVC,

The following two flags are causing windows to return a ERROR_INVALID_PARAMETER when I execute the proxy lookup:

  • fWINHTTP_AUTOPROXY_NO_CACHE_CLIENT
  • fWINHTTP_AUTOPROXY_NO_CACHE_SVC

Removing these flags allows me to resolve the proxy successfully. I am running this on Windows 7.

@mattn
Copy link
Owner

mattn commented Jan 24, 2019

Ah, could you please try with modifing + to | ?

@mattn
Copy link
Owner

mattn commented Jan 24, 2019

@oliverpool could you please handle this issue?

@oliverpool
Copy link
Contributor

+ and | should give the same result (since the bits are disjoint).

Maybe we could simply remove those flags (I can't remember any reason to bypass the cache...)

@mattn
Copy link
Owner

mattn commented Jan 24, 2019

which one, could you please send me PR ? I don't have environment for proxy using pac.

@lanoxx
Copy link
Author

lanoxx commented Jan 24, 2019

Hi,
in pac_windows.go:70 the are currently three flags set, remove the last two:

  • fWINHTTP_AUTOPROXY_CONFIG_URL (keep this one)
  • fWINHTTP_AUTOPROXY_NO_CACHE_CLIENT (drop this one)
  • fWINHTTP_AUTOPROXY_NO_CACHE_SVC (drop this one)

That is how I got it working on my computer yesterday.

oliverpool added a commit to oliverpool/go-ieproxy that referenced this issue Jan 24, 2019
mattn added a commit that referenced this issue Jan 25, 2019
@oliverpool
Copy link
Contributor

@lanoxx #7 has just been merged into master, could you update and tell us if it fixed your issue?

thanks!

@lanoxx
Copy link
Author

lanoxx commented Jan 25, 2019

I updated to my go.mod file and go.sum files to the latest version and it still works. Cudos for the fast fix.

@lanoxx lanoxx closed this as completed Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants