Skip to content

eerimoq/moblin-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moblin-assistant

A Rust implementation of the Moblin remote control assistant server. This server allows Moblin streamers to connect via WebSocket and provides remote control functionality.

Features

  • WebSocket server for Moblin remote control protocol
  • Connection setup with challenge-response authentication (SHA256-based)
  • Identification using password hashing with salt and challenge
  • Ping/pong keep-alive mechanism
  • Twitch chat ingestion and forwarding to Moblin
  • YouTube live chat ingestion and forwarding to Moblin

Building

cargo build --release

Usage

Start the server with a password:

cargo run -- --password my-secure-password

Or specify a custom port:

cargo run -- --password my-secure-password --port 2345

For release builds:

./target/release/moblin-assistant --password my-secure-password

Logging

The server uses env_logger for logging. You can control the log level using the RUST_LOG environment variable:

# Show only important events (info level)
RUST_LOG=info cargo run -- --password my-secure-password

# Show all debug information
RUST_LOG=debug cargo run -- --password my-secure-password

# Show everything including trace
RUST_LOG=trace cargo run -- --password my-secure-password

By default (without RUST_LOG set), the server runs silently. The logging levels used are:

  • info: Major events like server startup, connections, authentication success, and Twitch channel joins
  • debug: Detailed operational information like message exchanges and protocol details
  • error: Error conditions like authentication failures and connection issues

Protocol

The server implements the Moblin remote control protocol:

  1. Hello: Server sends authentication challenge and salt
  2. Identify: Client sends hashed password for authentication
  3. Identified: Server confirms authentication status
  4. Ping/Pong: Keep-alive mechanism
  5. TwitchStart/YouTubeStart: Streamer requests external chat bridge setup
  6. Chat Messages: Assistant forwards Twitch/YouTube messages to the streamer

Example

  1. Start the server:

    cargo run -- --password test123
  2. Connect your Moblin app to the server using the IP address and password

  3. Start Twitch and/or YouTube chat from the app and incoming messages are forwarded to Moblin

Reference Implementation

This implementation is based on:

About

Moblin assistant

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages