proxy

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainInfo

type ChainInfo struct {
	Type        string `json:"type"`
	Host        string `json:"host"`
	Port        int    `json:"port"`
	AutoRun     bool   `json:"auto_run"`
	InboundPort int    `json:"inbound_port"`
}
type Link struct {
	Protocol Protocol
	Tag      string
	Address  string
	Port     int

	UUID       string
	AlterID    int
	Cipher     string
	Encryption string
	Flow       string
	Method     string
	Password   string
	Plugin     string

	Network       string
	Security      string
	HeaderType    string
	Path          string
	Host          string
	SNI           string
	ALPN          string
	Fingerprint   string
	AllowInsecure bool

	PublicKey     string
	ShortID       string
	MLDSA65Verify string
	SpiderX       string

	ServiceName         string
	Authority           string
	Mode                string
	MultiMode           bool
	IdleTimeout         int
	HealthCheckTimeout  int
	PermitWithoutStream bool
	InitialWindowsSize  int
	UserAgent           string

	Seed             string
	MTU              int
	TTI              int
	UplinkCapacity   int
	DownlinkCapacity int
	ReadBufferSize   int
	WriteBufferSize  int
	Congestion       bool

	AcceptProxyProtocol bool
}
func ParseLink(raw string) (*Link, error)

type Manager

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

func New

func New(tproxyEnabled bool) (*Manager, error)

func (*Manager) Create

func (x *Manager) Create(link string, autoRun bool) (string, error)

func (*Manager) Delete

func (x *Manager) Delete(name string) error

func (*Manager) Get

func (x *Manager) Get(name string) (ChainInfo, error)

func (*Manager) Infos

func (x *Manager) Infos() (map[string]ChainInfo, error)

func (*Manager) IsChain

func (x *Manager) IsChain(name string) bool

func (*Manager) List

func (x *Manager) List() ([]string, error)

func (*Manager) ListAuto

func (x *Manager) ListAuto() ([]string, error)

func (*Manager) SetAutoRun

func (x *Manager) SetAutoRun(name string, autoRun bool) error

func (*Manager) Start

func (x *Manager) Start(ctx context.Context, name string) error

func (*Manager) Test

func (x *Manager) Test(name string) (string, error)

func (*Manager) Update

func (x *Manager) Update(name, link string) error

type Protocol

type Protocol string
const (
	ProtoVLESS Protocol = "vless"
	ProtoVMESS Protocol = "vmess"
	ProtoSS    Protocol = "shadowsocks"
)

Jump to

Keyboard shortcuts

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