Hi,
This is more just trying to get help to update windows service page for vault agent.
I have had a couple days problems trying to get vault agent through our squid proxy and setting a proxy block via the config file didn’t do the trick.
I tried setting system variables, which I could see was somewhat hitting Vault but then failed very quickly after, after further tests and stuff I found I needed to set the proxy system variables, as well as a bypass list and the vault address at system variable level to get this working so I was going to add it into docs in case anyone needed it in future but I’ dont have a clue how to work github so was wondering if someone could help/edit them for me with these commands:
You can test variables first via a session variables for just that session to confirm it does work:
$env:VAULT_ADDR = “https://your-vault-address:port”
$env:HTTPS_PROXY = “http://proxy-address:port”
$env:HTTP_PROXY = “http://proxy-address:port”
$env:NO_PROXY = “bypass,list,use,commas,to,split”
If it does for you, then use the following to set permanent system variables:
[System.Environment]::SetEnvironmentVariable(‘VAULT_ADDR’, ‘https://your-vault-address:port’, [System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable(‘HTTPS_PROXY’, ‘http://proxy-address:port’, [System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable(‘HTTP_PROXY’, ‘http://proxy-address:port’, [System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable(‘NO_PROXY’, ‘bypass,list,use,commas,to,split’, [System.EnvironmentVariableTarget]::Machine)