v2ray

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: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "v2ray"

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateOptions

type CertificateOptions struct {
	Certificate string `json:"certificate"`
	Key         string `json:"key"`
}

type Options

type Options struct {
	ListenAddr string `yaml:"on"`
	ListenHost string `yaml:"-"`
	ListenPort string `yaml:"-"`

	Proxy chrome.Proxy `yaml:"over"`

	ForwardServer struct {
		Address string `json:"address"`
		Port    int    `json:"port"`
	} `yaml:"-"`

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

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

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

type ProtocolOptions

type ProtocolOptions struct {
	SHADOWSOCKS struct {
		Method   string `json:"method"`
		Password string `json:"password"`
	}
	TROJAN, VLESS, VMESS struct {
		Users []string `json:"users"`
	}
}

type SecurityOptions

type SecurityOptions struct {
	TLS struct {
		ServerName  string               `json:"serverName,omitempty"`
		Certificate []CertificateOptions `json:"certificate,omitempty" yaml:"-"`
		CertFile    chrome.EnvString     `json:"-"`
		KeyFile     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 []struct {
			Key   string `json:"key"`
			Value string `json:"value"`
		} `json:"header,omitempty"`
	}
}

Jump to

Keyboard shortcuts

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