sip003

package
v0.0.0-...-2a1d78e Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: GPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPlugin

func RegisterPlugin(name string, constructor PluginConstructor)

Types

type Args

type Args map[string][]string

Args maps a string key to a list of values. It is similar to url.Values.

func ParsePluginOptions

func ParsePluginOptions(s string) (opts Args, err error)

ParsePluginOptions Parse a name–value mapping as from SS_PLUGIN_OPTIONS.

"<value> is a k=v string value with options that are to be passed to the transport. semicolons, equal signs and backslashes must be escaped with a backslash." Example: secret=nou;cache=/tmp/cache;secret=yes

func (Args) Add

func (args Args) Add(key, value string)

Add Append value to the list of values for key.

func (Args) Get

func (args Args) Get(key string) (value string, ok bool)

Get the first value associated with the given key. If there are any values associated with the key, the value return has the value and ok is set to true. If there are no values for the given key, value is "" and ok is false. If you need access to multiple values, use the map directly.

type ObfsLocal

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

func (*ObfsLocal) DialContext

func (o *ObfsLocal) DialContext(ctx context.Context) (net.Conn, error)

type Plugin

type Plugin interface {
	DialContext(ctx context.Context) (net.Conn, error)
}

func CreatePlugin

func CreatePlugin(ctx context.Context, name string, pluginArgs string, router adapter.Router, dialer N.Dialer, serverAddr M.Socksaddr) (Plugin, error)

type PluginConstructor

type PluginConstructor func(ctx context.Context, pluginArgs Args, router adapter.Router, dialer N.Dialer, serverAddr M.Socksaddr) (Plugin, error)

Jump to

Keyboard shortcuts

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