sub

package
v0.0.0-nightly Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClashSub

type ClashSub struct {
	Name string
	URL  string
	// contains filtered or unexported fields
}

func NewClashSub

func NewClashSub(rawClashCfgBuf []byte, name string, url string) (*ClashSub, error)

func NewClashSubByURL

func NewClashSubByURL(url string, name string) (*ClashSub, error)

func (*ClashSub) Refresh

func (c *ClashSub) Refresh() error

func (*ClashSub) ToClashConfigYaml

func (c *ClashSub) ToClashConfigYaml() ([]byte, error)

func (*ClashSub) ToGroupedClashConfigYaml

func (c *ClashSub) ToGroupedClashConfigYaml() ([]byte, error)

func (*ClashSub) ToRelayConfigs

func (c *ClashSub) ToRelayConfigs(listenHost string) ([]*relay_cfg.Config, error)

ToRelayConfigs convert clash sub to relay configs Proxy's port will be used as relay listen port Group's proxies will be merged into load balance in relay a new free port will be used as relay listen port for each group

type Proxies

type Proxies struct {
	// basic fields
	Name     string `yaml:"name"`
	Type     string `yaml:"type"`
	Server   string `yaml:"server"`
	Port     string `yaml:"port"`
	Password string `yaml:"password,omitempty"`
	UDP      bool   `yaml:"udp,omitempty"`

	// for shadowsocks todo(support opts)
	Cipher string `yaml:"cipher,omitempty"`

	// for trojan todo(support opts)
	ALPN           []string `yaml:"alpn,omitempty"`
	SkipCertVerify bool     `yaml:"skip-cert-verify,omitempty"`
	SNI            string   `yaml:"sni,omitempty"`
	Network        string   `yaml:"network,omitempty"`

	// for socks5 todo(support opts)
	UserName string `yaml:"username,omitempty"`
	TLS      bool   `yaml:"tls,omitempty"`

	// for vmess todo(support opts)
	UUID       string `yaml:"uuid,omitempty"`
	AlterID    int    `yaml:"alterId,omitempty"`
	ServerName string `yaml:"servername,omitempty"`
	// contains filtered or unexported fields
}

func (*Proxies) Clone

func (p *Proxies) Clone() *Proxies

func (*Proxies) Different

func (p *Proxies) Different(new *Proxies) bool

func (*Proxies) ToRelayConfig

func (p *Proxies) ToRelayConfig(listenHost string, listenPort string, newName string) (*relay_cfg.Config, error)

Jump to

Keyboard shortcuts

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