init.conf. The proxy settings are scoped per module, so different modules can use different proxies or none at all. Two independent mechanisms exist: one for parsing requests (webcorshost + useproxy) and one for stream delivery (streamproxy).
Proxy config example
init.conf
proxy object fields
The proxy object is nested inside the module’s config block and defines the SOCKS5 endpoint used when useproxy is true.
Whether to send credentials when connecting to the proxy. Set to
false if the proxy does not require authentication; the username and password fields are then ignored.Username for SOCKS5 proxy authentication. Only used when
useAuth is true.Password for SOCKS5 proxy authentication. Only used when
useAuth is true.Ordered list of SOCKS5 proxy addresses. Each entry must include the scheme and port, for example
"socks5://192.0.2.1:1080". The module selects from this list when routing outbound connections.Top-level proxy switches
Two boolean flags at the top level of the module config control when the proxy is applied.When
true, parsing requests (page fetching, API calls to the upstream provider) are routed through the SOCKS5 proxy defined in the proxy object. Has no effect on stream delivery.When
true, the Lampac built-in stream proxy is used for media delivery. This applies only to streaming URLs returned to the player, not to parsing. The proxy object is not used by streamproxy.Combining webcorshost and useproxy
When webcorshost is set, the module rewrites parsing requests to go through that CORS host. When useproxy is also true, the underlying TCP connection to that host goes through the SOCKS5 proxy. Both settings target the parsing phase and complement each other.
init.conf
webcorshost and streamproxy do not conflict
webcorshost and streamproxy operate on different traffic phases and can be enabled simultaneously without interfering with each other.webcorshost affects parsing requests made by the module on the server side. streamproxy affects the streaming URLs handed off to the media player. Enabling both means: parse through the CORS host, and deliver streams through the Lampac stream proxy.
streamproxy and magic_apn are mutually exclusive
If you need to proxy Ashdi streams specifically, use magic_apn instead of streamproxy. For non-Ashdi streams, use streamproxy. See APN and Ashdi stream proxy for details on magic_apn.