Skip to main content
Version: Next

Interceptor Environment Variables

VARIABLEDescriptionRequired?Default ValueExample
LUNAR_PROXY_HOSTConfigure Lunar.dev API Consumption Gateway IP and PortYes--lunar-proxy:8000
LUNAR_HANDSHAKE_PORTConfigure Lunar.dev API Consumption Gateway Handshake Port. This port is represented as ENGINE_ADMIN_PORT on the Proxy configurationsNo80819292
LUNAR_INTERCEPTOR_LOG_LEVELConfigure the log level of the InterceptorNoINFODEBUG
LUNAR_ALLOW_LISTWhen this variable is set, only requests to domains that are in LUNAR_ALLOW_LIST are forwarded to Lunar.dev API Consumption Gateway (any other request is sent directly to the API provider)No--use.com,192.168.1.1
LUNAR_BLOCK_LISTWhen this variable is set, requests to domains that are in LUNAR_BLOCK_LIST are not forwarded to Lunar.dev API Consumption Gateway (instead they are sent directly to the API provider)No--do_not_use.com,192.168.1.2
LUNAR_ENTER_COOLDOWN_AFTER_ATTEMPTSConfigure the number of successive failed connection attempts that trigger a Failsafe mechanismNo510
LUNAR_EXIT_COOLDOWN_AFTER_SECConfigure the cooldown time in seconds for turning back Proxy availabilityNo1020

Connection Validation

When Lunar Interceptor starts, it attempts to connect to the Lunar.dev API Consumption Gateway. Normally, no message is shown for a successful connection. However, if the connection fails, an error message is printed to stdout to indicate the issue. In debug mode, extra logs may provide more details to help diagnose connection problems.

  • If both LUNAR_BLOCK_LIST and LUNAR_ALLOW_LIST are empty, the Interceptor will forward all domains to the Lunar.dev API Consumption Gateway.
  • If LUNAR_ALLOW_LIST is empty, all domains except those in the LUNAR_BLOCK_LIST will be forwarded to the gateway.