Update IPv6Prefix and Interface to match your server. The shared secret goes in the environment (next step), not in this file; SharedSecret is only a fallback when I6_SHARED_SECRET is unset. The remaining tuning constants have sensible defaults and typically don't need changes.
const ( SharedSecret = "" // Fallback only: set I6_SHARED_SECRET instead Version = "3.1" // Version of the script IPv6Prefix = "xxxx:xxxx:xxxx" // Your /48 prefix IPv6Subnet = "6000" // Subnet within your /48 Interface = "ens3" // Network interface ListenPort = 80 // Proxy server port ListenHost = "0.0.0.0" // Listen on all interfaces Debug = false // Enable debug output)
Put the shared secret in a root-only environment file. Use the same value in your client (for Wyzie Subs, I6_PROXY_SECRET):
API tokens are generated using HMAC-SHA256 with the shared secret (I6_SHARED_SECRET) over the user-agent header, and sent in the API-Token header, which the proxy never forwards upstream. See the validateAPIToken function in the source code for implementation details. If a secret ever leaks, set a new one and restart the service.