# Proxy support

Starting with version **3.8.0**, the Twosense Endpoint Agent supports routing its internet communication through a proxy server.

This feature is configured using Windows Registry keys at:

```
HKEY_LOCAL_MACHINE\SOFTWARE\TWOSENSE.AI\TwosenseAuthenticator
```

The following registry values control proxy configuration:

* **ProxyUrl** (REG\_SZ): The hostname or IP address of your proxy server
* **ProxyPort** (REG\_SZ): The port number for the proxy connection

You can configure these registry keys using PowerShell (shown below), manual registry editing, or Group Policy Object (GPO) for enterprise deployments.

## Configure Proxy

### Prerequisites

* Administrative privileges
* PowerShell access

### Steps

1. Open PowerShell **as Administrator**.
2. Run the following commands:

   ```powershell
   New-Item -Path "HKLM:\SOFTWARE\TWOSENSE.AI\TwosenseAuthenticator" -ErrorAction SilentlyContinue | Out-Null
   Set-ItemProperty -Path "HKLM:\SOFTWARE\TWOSENSE.AI\TwosenseAuthenticator" -Name "ProxyUrl" -Value "proxy.example.com"
   Set-ItemProperty -Path "HKLM:\SOFTWARE\TWOSENSE.AI\TwosenseAuthenticator" -Name "ProxyPort" -Value "8080"
   ```

   **Parameters:**

   * **ProxyUrl**: The hostname or IP address of your proxy server (e.g., `proxy.example.com`, or `https://proxy.example.com`)
   * **ProxyPort**: The port number for the proxy connection (e.g., `8080`)

## Disable Proxy

### Steps

1. Open PowerShell **as Administrator**.
2. Run the following commands:

   ```powershell
   Remove-ItemProperty -Path "HKLM:\SOFTWARE\TWOSENSE.AI\TwosenseAuthenticator" -Name "ProxyUrl" -ErrorAction SilentlyContinue
   Remove-ItemProperty -Path "HKLM:\SOFTWARE\TWOSENSE.AI\TwosenseAuthenticator" -Name "ProxyPort" -ErrorAction SilentlyContinue
   ```
