Skip to main content
Each LME module can route its outbound network traffic through a SOCKS5 proxy configured directly in 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
"LME.Uaflix": {
  "webcorshost": null,
  "streamproxy": false,
  "useproxy": false,
  "proxy": {
    "useAuth": true,
    "username": "FooBAR",
    "password": "Strong_password",
    "list": [
      "socks5://adress:port"
    ]
  }
}

proxy object fields

The proxy object is nested inside the module’s config block and defines the SOCKS5 endpoint used when useproxy is true.
proxy.useAuth
boolean
default:"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.
proxy.username
string
Username for SOCKS5 proxy authentication. Only used when useAuth is true.
proxy.password
string
Password for SOCKS5 proxy authentication. Only used when useAuth is true.
proxy.list
string[]
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.
useproxy
boolean
default:"false"
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.
streamproxy
boolean
default:"false"
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

Use webcorshost together with useproxy when your Lampac server cannot reach the upstream provider directly but can reach it through a CORS relay and a SOCKS5 proxy.
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
"LME.Uaflix": {
  "webcorshost": "https://cors.example.com",
  "useproxy": true,
  "proxy": {
    "useAuth": false,
    "list": ["socks5://10.0.0.1:1080"]
  }
}

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

Do not enable both streamproxy and magic_apn. If magic_apn is configured and active, the module automatically disables streamproxy at startup to avoid routing conflicts.
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.

Build docs developers (and LLMs) love