TinyIce:兼容Icecast2的单二进制服务器(自动HTTPS,多租户)
TinyIce: Single-binary Icecast2-compatible server (auto-HTTPS, multi-tenant)

原始链接: https://github.com/DatanoiseTV/tinyice

## TinyIce:轻量级Icecast流媒体服务器 TinyIce是一个现代的、高性能的Icecast2兼容流媒体服务器,使用Go语言构建,旨在易于部署和管理。它提供了一个自包含的单个二进制文件,可即时设置——包括自动生成安全凭证和通过Let's Encrypt自动启用HTTPS。 主要功能包括多租户管理(为挂载点提供独立的管理员访问权限)、具有自动重连功能的流媒体中继,以及强大的安全措施,如bcrypt哈希和CSRF保护。TinyIce通过SSE仪表盘提供实时洞察,持久化播放历史记录,Prometheus指标和结构化日志。 它与现有的Icecast客户端和播放器完全兼容,支持动态流/用户管理、IP封禁以及用于现有工具的传统API。虽然是一个副项目且缺乏独立审计,但TinyIce旨在简化流媒体,重点关注安全性和易用性。需要Go 1.21+。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 TinyIce:单个二进制的Icecast2兼容服务器(自动HTTPS,多租户) (github.com/datanoisetv) 4 分,由 sylwester 发表于 2 小时前 | 隐藏 | 过去 | 收藏 | 1 条评论 帮助 sylwester 2 小时前 [–] 我构建了 TinyIce,作为一个有趣的副项目,目的是在几秒钟内启动一个 Icecast2 兼容的服务器,因为我对 IceCast 感到沮丧。一个静态的 Go 二进制文件,嵌入式资源,首次运行自动生成凭据,内置 ACME(Let’s Encrypt),中继,多租户管理员,Prometheus 指标,以及现代 Web UI。回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Run it, and you've got a ready Icecast server in seconds.

Notice: This is a side project. Use it at your own risk. While it implements security best practices, it has not undergone an independent audit.

TinyIce is a lightweight, high-performance, and secure Icecast2-compatible streaming server written in Go. It is designed to be self-contained, easy to deploy, and provides a modern web interface for both administrators and listeners.

image image

Go Report Card License: Apache 2.0

Traditional streaming servers can be complex to configure and resource-heavy. TinyIce aims to solve this by providing:

  • Instant Deployment: A single binary with all assets (templates, icons) embedded.
  • Zero-Config Security: Unique secure credentials automatically generated on first run.
  • Multi-Tenant Ready: Create multiple admin users who can only manage their own mount points.
  • Edge-Ready Relaying: Pull streams from other servers with automatic reconnection and in-stream ICY metadata parsing.
  • Secure & Hardened: Salted bcrypt password hashing, CSRF protection, and HTTP resource hardening.
  • Auto-HTTPS: Built-in support for ACME (Let's Encrypt) for zero-configuration SSL certificates.
  • Real-time Insights: SSE-powered dashboards with smooth, hardware-accelerated traffic charts.
  • Playback History: Persistent song history stored in a lightweight SQLite database.
  • Observability: Built-in Prometheus metrics endpoint and structured logging.
  • Icecast2 Compatible: Works with standard source clients (BUTT, OBS, Mixxx, LadioCast) and players (VLC, web browsers).
  • Approval Workflow: New streams are hidden by default until approved by an administrator.
  • Stream Relaying: Act as an edge node by pulling streams from remote servers.
  • Dual-Protocol Architecture: Handles HTTPS for listeners while allowing legacy encoders to stream over plain HTTP.
  • Playback Tracking: View the last 100 songs played per station in the admin dashboard.
  • Public Directory Listing: Built-in support for Icecast YP protocol (e.g., dir.xiph.org).
  • Dynamic Management: Add, update, disable, or remove mount points, users, and relays on the fly.
  • IP Banning: Instantly block malicious IPs from streaming or listening.
  • Legacy API: Support for /status-json.xsl for compatibility with existing Icecast tools.
  • Now Playing Metadata: Real-time display of song titles pushed from broadcast software or pulled from relays.

Requires Go 1.21 or later.

On the first run, TinyIce will generate tinyice.json with unique random passwords. Save them from the terminal!

Point your encoder (e.g., BUTT) to:

  • Server Type: Icecast 2
  • Address: your-server-ip
  • Port: 8000
  • Password: [The generated source password]
  • Mount: /live
./tinyice -host 0.0.0.0 -port 8000 -daemon -log-file tinyice.log
  • -host: Network interface to bind to (default: "0.0.0.0").
  • -config: Path to the configuration file.
  • -log-file: Path to a file for log output.
  • -log-level: debug, info, warn, error.
  • -json-logs: Enable structured JSON logging.
  • -daemon: Run in the background.
  • -pid-file: Path to write the process ID.

See PERFORMANCE.md for detailed hardware and traffic estimates.

Distributed under the Apache License 2.0. See LICENSE for more information.


Developed by DatanoiseTV

联系我们 contact @ memedata.com