ss

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(proxyURL string)

Close shuts down a running Shadowsocks client

func ProxySS

func ProxySS(u *url.URL, o *proxyclient.Options) (http.RoundTripper, error)

func ProxySsSocks5

func ProxySsSocks5(u *url.URL, o *proxyclient.Options) (http.RoundTripper, error)

ProxySsSocks5 creates a RoundTripper for Shadowsocks proxy

func StartSS

func StartSS(ssURL string, port int) (int, error)

StartSS starts a Shadowsocks client and returns local SOCKS port

Types

type Config

type Config struct {
	Server     string
	Port       int
	Method     string
	Password   string
	Plugin     string
	PluginOpts string
	Name       string
}

Config holds Shadowsocks URL parameters

func ParseSS

func ParseSS(ssURL string) (*Config, error)

ParseSS parses a Shadowsocks URL

type Server

type Server struct {
	Method     string
	Password   string
	ServerAddr string
	Listener   net.Listener
	SocksPort  int
	Cancel     context.CancelFunc
}

Server represents a running Shadowsocks server

Jump to

Keyboard shortcuts

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