Amor5207

lvguo-core

lvguo-core is a cross-platform short-drama engine packaged as a Rust dynamic library exposing C-ABI, JNI and HTTP RPC, handling request signing, CENC streaming decryption and multi-threaded resumable downloads.

v3.1.14
Published at
17h ago
27
Stars
603
Download

Latest release

v3.1.14Dec 5, 2026, 10:28 AM
Downloads slow? Switch the source anytime above

README

Project Overview

lvguo-core is a cross-platform short-drama engine built for client developers, and it exists to stop rewriting three things every time the frontend changes: request signing, streaming decryption and download scheduling. The UI layer keeps only presentation, while everything else compiles into one Rust dynamic library reached through C-ABI, JNI or local HTTP.

The core is at version 1.1.10 with an ABI of v1; the reference hosts and frontends are at 3.1.14. The Android TV app, desktop client and web server all run the same core.

Item Value
Core version 1.1.10 (ABI v1)
Host version 3.1.14 (internal build 3022)
Implementation Rust (cdylib plus rlib)
Exported calls 9 C functions
License GPL-3.0

Swap the interface freely; signing and keys live only inside that one hot-swappable library.

Core Capabilities

  • CENC streaming decryption: the player issues a Range request to /media/:vid.mp4, and cenc/ decrypts chunk by chunk at sample offsets while streaming, leaving neither plaintext nor ciphertext on disk
  • Request signing: sign/ carries three implementations, argus, v5 and passport, backed by device registration in upstream/device.rs
  • Single-file hot update: <dataDir>/core_hot/ accepts exactly one target library (lvguo_core.dll, liblvguo_core.so or liblvguo_core.dylib) and no external policy files
  • Triple validation: an update must match SHA-256, the platform binary magic (ELF, PE or Mach-O) and abiVersion (currently 1) before an atomic replace
  • Crash-safe rollback: an .attempt marker is written before load and cleared once lvguo_init returns healthy; two consecutive failures discard the update and restore the bundled baseline
  • Multi-threaded downloads: HTTP Range segments in parallel with a global rate limit, decrypted before landing on disk
  • Capability negotiation: the frontend calls GET /api/capabilities at startup and enables offline downloads, the native player and shaders only if the host reports them
  • Three update channels: default for the official source, custom for a self-hosted manifest or live server, disabled for fully offline use

Integration

HTTP RPC

  1. Start lvguo-web --listen 127.0.0.1:8780, or lvguo-pc --headless --listen 127.0.0.1:8780 for backend only
  2. Every capability goes through POST /api/call with a body of {"action":...,"params":...}
  3. play returns data.mediaUrl, which the player seeks against directly
curl -s -X POST http://127.0.0.1:8780/api/call -H 'Content-Type: application/json' -d '{"action":"play","params":{"vid":"<episode_vid>","q":"1080p"}}'

C-ABI library

  1. Load the library for your platform and check lvguo_core_abi_version() returns 1
  2. Call lvguo_init with dataDir, hostKind and updateMode
  3. Then lvguo_call(action, params) returns {"ok":true,"data":...} synchronously, and the pointer must be released with lvguo_free

Android JNI

  1. Drop liblvguo_core.so into the matching ABI directory
  2. Call the 5 native static methods on ink.pengfei.lvguo.core.CoreBridge, so Java holds no signing or decryption code

Hosts and Releases

  • LvguoTV-3.1.14.apk ships arm64-v8a and armeabi-v7a in one package, minSdk 23, targetSdk 28, package ink.pengfei.lvguo
  • LvguoPC-Setup-3.1.14-win.exe detects 32-bit and 64-bit Windows on its own
  • macOS gets a Universal .dmg, Linux gets .deb builds for amd64, i386, arm64 and armhf
  • The lvguo-web server offers service install, status and uninstall for systemd or Windows Task Scheduler
  • Desktop hosts reuse the system WebView for a frameless window, falling back to a browser on Linux or old systems, so the install stays a few megabytes
  • When a local mpv is detected it unlocks a separate hardware-decoded window, and WebGL2 machines can enable CAS sharpening, FSR upscaling and Anime4K enhancement
  • Common actions include home, foryou, rank, search, detail, play, download.add, history.* and core.update.check

Environment Requirements

Item Requirement
Runtime platforms Android 6.0+, Windows 7+, macOS, Linux
Architectures ARMv7, ARM64, x86, x86_64
Build tools Rust 1.75+, Node.js
Android packaging aapt2, javac, d8, zipalign, apksigner called directly
Data directory Set with --data-dir or LVGUO_DATA_DIR

Notes

  • No video content here: the repository only resolves and decrypts, media rights stay with their owners, and upstream availability can change
  • Hot updates must be newer: a core_hot library at or below the baseline version is deleted and rolled back, so an old core cannot shadow a new client
  • The APK needs cross-compilation: build liblvguo_core.so for aarch64-linux-android and armv7-linux-androideabi first
  • Two CLI surfaces: the desktop host takes --listen, --data-dir and --update-mode, while the server adds --core PATH and reads LVGUO_PORT, LVGUO_UPDATE_MODE and friends
  • Custom frontends must respect the boundary: talk only through POST /api/call and /media/:vid.mp4, never hardcode upstream domains or signing logic in the UI

Release history

Sort