#Configuration

pxgo configuration sources are applied in this order:

defaults < pxgo.ini < .env < environment < command line

Environment variables use the PXGO_ prefix. For example, --proxy maps to PXGO_PROXY, and --client-username maps to PXGO_CLIENT_USERNAME.

#Config File Lookup

When --config is provided, pxgo reads that exact file.

Without --config, pxgo checks:

  1. ./pxgo.ini
  2. the platform config directory
  3. pxgo.ini next to the executable

Platform config directories:

  • Windows: %APPDATA%\pxgo
  • macOS: ~/Library/Application Support/pxgo
  • Linux/Unix: $XDG_CONFIG_HOME/pxgo or ~/.config/pxgo

#Starter Config

Generate a config:

./pxgo --save --config=./pxgo.ini --proxy=proxy.company.com:8080

Use the commented repository sample ../pxgo.ini when you want a human-edited config with explanations.

#Proxy Section

Key / FlagDefaultDescription
server, proxy / --proxyemptyUpstream proxy server list
pac / --pacemptyPAC URL or local file
pac_encoding / --pac-encodingutf-8PAC file encoding
port / --port3128Local listen port
listen / --listen127.0.0.1Local listen address list
gateway / --gateway0Bind all interfaces
hostonly / --hostonly0Bind all interfaces but allow local host IPs
allow / --allow*.*.*.*Client allow list
noproxy / --noproxyemptyDirect-connect bypass list
useragent / --useragentemptyOverride or set User-Agent
username / --usernameemptyUpstream auth username or Kerberos principal
auth / --authemptyUpstream auth selector
kerberos / --kerberos0Enable Kerberos ticket management

#Client Section

Key / FlagDefaultDescription
client_auth / --client-authNONELocal client auth selector
client_username / --client-usernameemptyLocal client auth username
client_nosspi / --client-nosspi0Compatibility flag retained from Python Px

#Settings Section

Key / FlagDefaultDescription
workers / --workers1Compatibility setting retained for config parity
threads / --threads32Compatibility setting retained for config parity
idle / --idle30CONNECT tunnel idle timeout in seconds
socktimeout / --socktimeout20.0Upstream socket timeout in seconds
proxyreload / --proxyreload60PAC/system proxy refresh interval
foreground / --foreground0Compatibility flag
log / --log0Debug log destination: 1=script dir, 2=cwd, 3=unique file, 4=stdout

#Passwords

Store credentials interactively (prompts with no echo, saves to OS keyring):

./pxgo --username=0 --password
./pxgo --client-username=client --client-password

On Windows this uses Credential Manager; on macOS, Keychain; on Linux, libsecret. Once stored, pxgo loads the password automatically when the matching username is supplied.

For non-interactive runs (Docker, CI), use environment variables instead:

PXGO_PASSWORD='upstream-secret' ./pxgo --username=1
PXGO_CLIENT_PASSWORD='client-secret' ./pxgo --client-username=client

For environments without an OS keyring, opt in to plaintext storage:

PXGO_KEYRING_PLAINTEXT=1 ./pxgo --username=0 --password=secret
PXGO_KEYRING_PLAINTEXT=1 ./pxgo --client-username=client --client-password=secret

Use PXGO_KEYRING_FILE=/path/to/keyring.json to choose the plaintext keyring file.