ssm

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package ssm implements the Shadowsocks Server Management API v1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server added in v1.14.0

type Server struct {
	// CredentialManager manages user credentials for the server.
	// It is nil if the server does not support user management.
	CredentialManager *cred.ManagedServer

	// StatsCollector provides access to server traffic statistics.
	// It MUST NOT be nil.
	StatsCollector stats.Collector
}

Server represents a server managed by the API.

type ServerManager

type ServerManager struct {
	// contains filtered or unexported fields
}

ServerManager handles server management API requests.

func NewServerManager

func NewServerManager(serverByName map[string]Server, serverNames []string) *ServerManager

NewServerManager returns a new server manager.

func (*ServerManager) RegisterHandlers added in v1.13.0

func (sm *ServerManager) RegisterHandlers(register func(method string, path string, handler restapi.HandlerFunc))

RegisterHandlers sets up handlers for the /servers endpoint.

type StandardError

type StandardError struct {
	Message string `json:"error"`
}

StandardError is the standard error response.

Jump to

Keyboard shortcuts

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