Configuration
The proxy reads its settings from two files in the proxy directory:
- Windows service settings (
service_config.json): the service name, the port, and the SSL certificate. - Proxy settings (
conf.json): global limits and the execution profiles.
Annotated examples ship with the proxy as service_config.json.sample and conf.json.sample. The examples below
show the recommended setup with the pull transport mode, where the proxy opens all
connections itself.
Windows service settings
service_config.json configures the Windows service and the HTTP server:
| Key | Default | Description |
|---|---|---|
name | techwork-automator-proxy-service | Windows service name |
description | techwork automator proxy service ssl | Windows service description |
port | 8043 (HTTPS) / 8040 (HTTP) | Port the server listens on |
route_prefix | execute | URL prefix for the API routes |
ssl_key_path | — | Path to SSL private key file (enables HTTPS) |
ssl_cert_path | — | Path to SSL certificate file (enables HTTPS) |
With the pull transport mode, the automator never connects to the proxy, so the endpoint and SSL certificate are not used and a minimal configuration suffices:
{
"name": "techwork-automator-proxy-service",
"description": "techwork automator proxy service",
"port": "8040"
}
Profiles using the push transport mode do accept incoming requests; for those, set both
ssl_key_path and ssl_cert_path so the endpoint is served over HTTPS.
When the proxy is started directly instead of as a service, the environment variables PORT and ROUTE_PREFIX
override the port and the URL prefix.
Proxy settings
conf.json holds the global settings and the execution profiles.
Global settings
| Key | Default | Description |
|---|---|---|
max_call_stack_count | 10000 | Maximum number of queued requests before the throttle rejects with overflow |
throttle_calls_per_sec | 100 | Number of requests executed per second |
logfile | log/execproxy.log | Path to the log file |
Profiles
The profiles array defines the execution targets. Each profile matches one Proxy account on the automator platform:
| Key | Required | Default | Description |
|---|---|---|---|
name | Yes | — | Unique profile identifier |
active | Yes | — | Whether the profile is enabled |
mode | Yes | — | Execution mode: exec or script |
token | Yes | — | Authentication token (must match the Proxy account's token) |
key | Yes | — | Encryption key (must match the Proxy account's key). Script mode requires exactly 64 hexadecimal characters (256 bits); generate one with node bin/secret |
commands | Script mode only | — | The scripts a package may run. Maps each command name to its definition: script (path to the script file; relative paths resolve against working_dir) and params (array of allowed parameter names, including their - or -- prefix) |
automator_url | No | — | The Automator URL shown on the Proxy account form. When set, the profile uses the pull transport mode; when omitted, it listens for pushes at /execute/<name>. |
shell | No | — | Shell type: powershell (runs powershell.exe), unix (/bin/bash), or cmd (cmd.exe) |
shell_path | No | based on shell | Custom shell executable path (overrides the default for shell) |
working_dir | No | — | Working directory for the child process. Relative paths resolve against the proxy directory, so scripts means the scripts folder inside the proxy installation |
init_cmd | No | — | Command prefix prepended to the actual command (e.g. powershell.exe -c) |
env_vars | No | ["PATH"] | List of environment variable names to pass to the executed command |
Example profile
A script-mode profile using the pull transport mode, allowing packages to run a single PowerShell script
(createUser.ps1) with two parameters:
{
"name": "execute_ps_script",
"active": true,
"mode": "script",
"token": "<your-token>",
"key": "<your-secret-key>",
"automator_url": "<the Automator URL copied from the account>",
"working_dir": "scripts",
"shell": "powershell",
"commands": {
"createUser": {
"script": "createUser.ps1",
"params": ["-Name", "-Department"]
}
}
}