Page 1 of 1

How to totally bypass proxy?

PostPosted: 24.02.2017, 21:23
by wayneG
Machine runs a proxy server by default, but with many exceptions including all of the Microsoft download sites. wget appears not to look for the exceptions, so incorrectly uses the proxy server, even when it should not. What is the procedure to force WSUS offline to never use the proxy server? I've tried putting "none", "noproxy", "ignore" and a few others into the Proxy field, none of those work. I looked through the cmd files and tried hacking around the proxy server but it continues to be used.

Re: How to totally bypass proxy?

PostPosted: 25.02.2017, 14:55
by Dalai
You can try the following:
  1. Create a file .wgetrc (with the leading dot) in wsusoffline directory containing this line:
    Code: Select all
    use_proxy=off
  2. Create a batch file in the same directory containing the following code:
    Code: Select all
    @echo off

    set wgetrc=%~dp0.wgetrc
    call "%~dp0cmd\DownloadUpdates.cmd" w61-x64 glb /excludesp /includedotnet /verify
You may adapt the OS and parameters to your needs. You can use UpdateGenerator to help creating the script for you with the parameters you want, there's a checkbox "Only create collection script" in UpdateGenerator; there's also a topic in the forum with all the possible OS's and parameters. Run this generated batch instead of UpdateGenerator.

Regards
Dalai

Re: How to totally bypass proxy?

PostPosted: 26.02.2017, 06:47
by boco
If you drop the .wgetrc file with the use_proxy=off line into the same directory as wget.exe (./bin) then it will be picked up by WGet automatically. I'm already using it for years.

Re: How to totally bypass proxy?

PostPosted: 26.02.2017, 14:51
by Dalai
@boco: Ah, clever! I tried to find the default location for this file, but somehow failed to do so. However, this method will only work because $HOME is not set on Windows (as %HOME%). In other words: it will probably stop working if some program sets %HOME% env variable. But it's definitely nice to have an alternative.

Regards
Dalai

Re: How to totally bypass proxy?

PostPosted: 26.02.2017, 20:34
by wayneG
Thank you. Placing the .wgetrc file in the ./bin directory worked as desired.