Working via Proxy
For Action1 to operate correctly via a proxy server, you need to configure proxy settings on the endpoints using the registry.
NOTE: Configuration described in this section applies to forward proxy server only (that is, a proxy operating as an intermediary between a client and internet servers on the client’s behalf). Action1 agent does not work with other proxy types.
Step 1: Configure registry settings on the endpoints
On the managed Windows endpoints, configure the registry settings for [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Action1] as shown in the table below.
Important! These settings are mandatory. Their values are case-sensitive and cannot be empty.
Name
Value
Description
Should be a string value.
Should be a string value.
Should be a DWORD value.
When operating, the agent will read these proxy settings from the registry.
Registry file example
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Action1]
agent.use.proxy=yes
agent.proxy.hostname=192.168.X.X
agent.proxy.port=dword:00000c38
agent.proxy.username=korben
agent.proxy.password=dallas
Step 2: Prepare for app deployment and patching
To install and update 3rd party apps with Action1 agent, ensure that each managed endpoint can successfully resolve the domain names of the Action1 Content Delivery Network (CDN) servers, which include the following hosts:
- us-cdn.action1.com
- eu-cdn.action1.com
- au-cdn.action1.com
- us-cdn-action1-com.b-cdn.net
- eu-cdn-action1-com.b-cdn.net
- au-cdn-action1-com.b-cdn.net
TIP: You can, for example, run nslookup queries on the endpoints.
Step 3: Prepare for Windows Updates installation
NOTE: If your Windows Update agent does not use a proxy server, no additional configuration is required.
If your Windows Update agent operates via proxy, you should prepare the endpoints for Windows Updates installation:
- Configure the registry settings as explained in Step 1 above.
- Propagate them to the system-level proxy. For that, run a script on your managed endpoints using Action1 automation, as described in this section. The script is provided below; it should be run once.
NOTE: Make sure the Action1 agent is connected to Action1 Cloud, that is, the corresponding managed endpoint is shown with Connected status in the Endpoints view.
The script will do the following:
- Check the system architecture (32-bit vs 64-bit).
- Read specific proxy configuration values from the Windows Registry.
- Configure the system proxy using
netsh
if proxy settings are enabled. - Save proxy authentication information using
cmdkey
.
PowerShell script for Run Script automation
function Get-RegistryValue {
param (
[Parameter(Mandatory)]
[string]$RegistryPath,
[Parameter(Mandatory)]
[string]$RegistryValue
)
try {
if (Test-Path -Path $RegistryPath -PathType Container) {
$key = Get-Item -Path $RegistryPath -ErrorAction Stop
$value = $key.GetValue($RegistryValue, $null)
return $value
}
}
catch {}
}
try { $arch = ((Get-CimInstance -ClassName Win32_OperatingSystem).OSArchitecture).substring(0, 2) }
catch { switch ([System.Environment]::Is64BitOperatingSystem) { $true { $arch = '64' } $false { $arch = '32' } } }
switch ($arch) {
'32' { $registryPath = 'HKLM:\SOFTWARE\Action1' }
'64' { $registryPath = 'HKLM:\SOFTWARE\WOW6432Node\Action1' }
}
$proxy = Get-RegistryValue -RegistryPath $registryPath -RegistryValue "agent.use.proxy"
$hostname = Get-RegistryValue -RegistryPath $registryPath -RegistryValue "agent.proxy.hostname"
$port = Get-RegistryValue -RegistryPath $registryPath -RegistryValue "agent.proxy.port"
$username = Get-RegistryValue -RegistryPath $registryPath -RegistryValue "agent.proxy.username"
$password = Get-RegistryValue -RegistryPath $registryPath -RegistryValue "agent.proxy.password"
if ($null -eq $proxy -or $proxy.ToLower() -ne 'yes') {
$Host.UI.WriteLine("The proxy is not configured.")
return
}
if (($null -eq $port) -or ([string]::IsNullOrEmpty($hostname) -or $port -eq 0)) {
$Host.UI.WriteLine("The proxy host name or port is not specified.")
return
}
$argument = "winhttp set proxy $hostname" + ":" + [string]$port
Start-Process -FilePath netsh -ArgumentList $argument -NoNewWindow -Wait
if ([string]::IsNullOrEmpty($username) -or [string]::IsNullOrEmpty($password)) { $Host.UI.WriteLine("The proxy user name or password is not specified.") return } Start-Process -FilePath cmdkey -ArgumentList "/generic:$hostname /user:$username /pass:$password" -NoNewWindow -Wait