Skip to main content
LME.KlonFUN integrates Lampac NextGen with klon.fun, a Ukrainian streaming site. For TV serials it exposes per-season, per-voice (dubbing track) episode navigation; for movies it returns one or more labelled stream variants. The module reloads its configuration whenever Lampac’s init.conf is updated at runtime (via EventListener.UpdateInitFile), and supports magic_apn for Ashdi-origin stream links.
Module version: 2.1 (ModInit.Version in LME.KlonFUN/ModInit.cs). Default backend: https://klon.fun.

HTTP route

GET /lite/lme.klonfun
Key query parameters:
ParameterTypeDescription
imdb_idstringIMDb identifier used in search
titlestringDisplay title
original_titlestringOriginal title
yearintRelease year
serialint1 = TV serial, 0 = movie
sintSeason number (-1 = show season list)
tstringSelected voice/dubbing track key
hrefstringDirect item URL (skips search)
checksearchboolLightweight content availability check
rjsonboolReturn JSON instead of HTML templates

How content is resolved

  1. Searchinvoke.Search(imdb_id, title, original_title) queries klon.fun. If multiple results are returned a SimilarTpl disambiguation list is shown.
  2. Item fetchinvoke.GetItem(href) retrieves the page and extracts the iframe player URL. item.IsSerialPlayer is used alongside the serial parameter to determine the content type.
  3. Serial structureinvoke.GetSerialStructure(playerUrl) parses all voice tracks, seasons, and episode lists from the player. Voices are keyed by a string identifier (voice.Key) and have a separate human-readable DisplayName.
  4. Movie streamsinvoke.GetMovieStreams(playerUrl) returns a list of (Title, Link) stream variants.

Configuration (init.conf)

"LME.KlonFUN": {
  "enable": true,
  "domain": "https://klon.fun",
  "displayname": "KlonFUN",
  "displayindex": 1,
  "streamproxy": false,
  "useproxy": false,
  "proxy": {
    "useAuth": true,
    "username": "",
    "password": "",
    "list": [
      "socks5://ip:port"
    ]
  },
  "magic_apn": {
    "ashdi": "https://tut.im/proxy.php?url={encodeurl}"
  }
}

Key parameters

enable
boolean
default:"true"
Enables or disables the module.
domain
string
default:"https://klon.fun"
Base URL of the klon.fun site. Update if the domain changes.
displayname
string
default:"KlonFUN"
Label shown in the Lampac source list.
displayindex
integer
default:"0"
Sort order among sources.
streamproxy
boolean
default:"false"
Route video streams through Lampac’s built-in stream proxy. Automatically disabled when APN is active.
useproxy
boolean
default:"false"
Route outbound parsing requests through the proxy list.
magic_apn.ashdi
string
APN URL template applied only to Ashdi-origin stream links when the inner player is active. The {encodeurl} placeholder is replaced with the percent-encoded stream URL.

Multi-voice serial navigation

For serials, season and voice selection works as follows:
  • s=-1 — returns a SeasonTpl with all seasons. If t is already set to a valid voice key, the season list is filtered to only the seasons that voice covers.
  • s=<n> — filters voices to those that have episodes in season n. The first matching voice is auto-selected if t is not provided or does not match. Returns a VoiceTpl merged with an EpisodeTpl; episodes are sorted by episode number.
  • Switching t (voice key) while keeping s constant re-renders the episode list for the newly selected voice.
Voice keys are case-insensitive string identifiers (e.g. "ukr", "eng"). The DisplayName is the human-readable label shown in the UI, while Key is what goes in the t query parameter.

Runtime config reload

Unlike most other LME modules, KlonFUN re-runs UpdateConfig() whenever Lampac fires the EventListener.UpdateInitFile event. This means changes to init.conf are picked up without restarting Lampac.

APN and stream proxy precedence

  • APN active → streamproxy is forced off.
  • streamproxy: true and no APN → apnstream and apn are cleared.
  • magic_apn.ashdi activates per-request, only for Ashdi URLs, only when the inner player is in use.

Build docs developers (and LLMs) love