singbox

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(
	ctx context.Context,
	config map[string]any,
) error

Start initializes and runs a Sing-Box instance using the provided configuration. It returns an error if the configuration is invalid or if the Sing-Box instance fails to start.

func TryParseOutboundURL

func TryParseOutboundURL(url *url.URL) (map[string]any, error)

TryParseOutboundURL constructs a Singbox outbound configuration map from the provided URL and its query parameters.

The function extracts relevant fields such as type, server, port, UUID, transport settings, and TLS parameters from the URL and its query string. The resulting map is structured under the key path "core.singbox.outbounds" and is suitable for use in Singbox configuration files.

Returns the constructed configuration map and a nil error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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