v2socks

package
v0.0.0-...-ac0c594 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "v2socks"

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateOptions

type CertificateOptions struct {
	Usage       string `json:"usage"`
	Certificate string `json:"certificate"`
}

type HeaderItem

type HeaderItem struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type HostportOptions

type HostportOptions struct {
	Address string `json:"address" yaml:"hostport"`
	Port    int    `json:"port" yaml:"-"`
}

type Options

type Options struct {
	ListenAddr string `yaml:"on"`

	Proxy chrome.Proxy `yaml:"over"`

	ForwardServer HostportOptions `yaml:"-"`

	URL string

	Type      string
	Protocol  string `yaml:"-"`
	Transport string `yaml:"-"`
	Security  string `yaml:"-"`

	ProtocolOptions  `yaml:",inline"`
	TransportOptions `yaml:",inline"`
	SecurityOptions  `yaml:",inline"`

	Mux struct {
		Enabled     bool `json:"enabled,omitempty"`
		Concurrency int  `json:"concurrency,omitempty"`
	}

	Dial  chrome.DialOptions
	Relay chrome.RelayOptions
	// contains filtered or unexported fields
}

type ProtocolOptions

type ProtocolOptions struct {
	SHADOWSOCKS struct {
		HostportOptions `yaml:",inline"`
		Method          string `json:"method"`
		Password        string `json:"password"`
	}
	SHADOWSOCKS2022 struct {
		HostportOptions `yaml:",inline"`
		Method          string   `json:"method"`
		PSK             string   `json:"psk"`
		IPSK            []string `json:"ipsk,omitempty"`
	}
	TROJAN struct {
		HostportOptions `yaml:",inline"`
		Password        string `json:"password"`
	}
	VLESS, VMESS struct {
		HostportOptions `yaml:",inline"`
		UUID            string `json:"uuid"`
	}
}

type SecurityOptions

type SecurityOptions struct {
	TLS struct {
		ServerName  string               `json:"serverName,omitempty"`
		Certificate []CertificateOptions `json:"certificate,omitempty" yaml:"-"`
		CertFile    chrome.EnvString     `json:"-"`
	}
}

type Service

type Service struct{}

func (Service) Name

func (Service) Name() string

func (Service) Options

func (Service) Options() any

func (Service) Run

func (Service) Run(ctx chrome.Context)

type TransportOptions

type TransportOptions struct {
	GRPC struct {
		ServiceName string `json:"serviceName"`
	}
	TCP struct{}
	WS  struct {
		Path   string       `json:"path,omitempty"`
		Header []HeaderItem `json:"header,omitempty"`
	}
}

Jump to

Keyboard shortcuts

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