mieru

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2026 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

Package mieru provides Sing2's Mieru inbound — a drop-in replacement for the base fork's, adding the hot user updates the base cannot do (doc/13 T6). See inbound.go for why it exists.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInbound

func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.MieruInboundOptions) (adapter.Inbound, error)

func RegisterInbound

func RegisterInbound(registry *inbound.Registry)

RegisterInbound installs Sing2's Mieru inbound, replacing whatever is already registered for C.TypeMieru. Call it on the registry AFTER include.InboundRegistry().

Types

type Inbound

type Inbound struct {
	inbound.Adapter
	// contains filtered or unexported fields
}

Inbound is a Mieru server inbound backed directly by mieru's protocol.Mux.

func (*Inbound) Close

func (h *Inbound) Close() error

func (*Inbound) Start

func (h *Inbound) Start(stage adapter.StartStage) error

func (*Inbound) UpdateUsers

func (h *Inbound) UpdateUsers(users []option.MieruUser)

UpdateUsers replaces the authoritative user set on the RUNNING server.

This is the whole point of the package: established connections keep working (mieru leaves existing TCPUnderlays and Sessions alone), new handshakes immediately see the new set, and removed users can no longer authenticate. Before Start it just records the set, which Start then installs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL