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

only first element in the bypass-list is applied #2

Closed
NetworkBytes opened this issue Jun 20, 2015 · 3 comments
Closed

only first element in the bypass-list is applied #2

NetworkBytes opened this issue Jun 20, 2015 · 3 comments

Comments

@NetworkBytes
Copy link

only the first element in the bypass-list is being applied

my code

         winhttp_proxy { 'proxy':
           ensure       => present,
           proxy_server => $proxyserver,
           bypass_list  => ['asdds.jkhsa', '*.dsadasdsa.com', 'sadasdas']
         }

Ive tested using a string semicolon and comma separated but that errors out

I believe the issue is in the set command as its enumerated all the elements eg

Debug: Prefetching netsh resources for winhttp_proxy
Debug: Executing: 'cmd.exe /c C:\Windows\System32\netsh.exe winhttp dump'
Notice: /Stage[main]/Winconfig::Proxy/Winhttp_proxy[proxy]/bypass_list: bypass_list changed ['asdds.jkhsa'] to 'asdds.jkhsa *.dsadasdsa.com sadasdas'
Debug: Executing: 'cmd.exe /c C:\Windows\System32\netsh.exe winhttp set proxy proxy-server="proxy:3128" bypass-list="asdds.jkhsa"'
Debug: /Stage[main]/Winconfig::Proxy/Winhttp_proxy[proxy]: The container Class[Winconfig::Proxy] will propagate my refresh event

the result of the netsh winhttp dump

netsh.exe winhttp dump

# -----------------------------------------
# WinHTTP Proxy Configuration
# -----------------------------------------
pushd winhttp

set proxy proxy-server="proxy:3128" bypass-list="asdds.jkhsa"

popd

# End of WinHTTP Proxy Configuration
@NetworkBytes
Copy link
Author

its was missing a join

  def flush
    cmd = [ 'cmd.exe', '/c', command(:netsh), 'winhttp', 'set', 'proxy', 'proxy-server="%s"' % @property_hash[:proxy_server], 'bypass-list="%s"' % @property_hash[:bypass_list].join(";") ]

@sathieu
Copy link
Owner

sathieu commented Jun 25, 2015

Can you send a PR?

@sathieu
Copy link
Owner

sathieu commented Jun 25, 2015

Actually, it's #3

@sathieu sathieu closed this as completed Jun 25, 2015
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

1 participant