clash

package
v0.0.1-30e5f85 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port        uint               `yaml:"port"`
	SocksPort   uint               `yaml:"socks-port"`
	Mode        string             `yaml:"mode"`
	LogLevel    string             `yaml:"log-level"`
	Proxies     []ProxyConfig      `yaml:"proxies"`
	ProxyGroups []ProxyGroupConfig `yaml:"proxy-groups"`

	RuleProviders map[string]RuleProvider `yaml:"rule-providers"`
	Rules         []string                `yaml:"rules"`
}

func Default

func Default() *Config

func (*Config) AddProxy

func (c *Config) AddProxy(t, n, addr, port, password string, udp bool)

func (*Config) String

func (c *Config) String() string

type ProxyConfig

type ProxyConfig struct {
	Name     string `yaml:"name"`
	Type     string `yaml:"type"`
	Server   string `yaml:"server"`
	Password string `yaml:"password"`
	Port     int    `yaml:"port"`
	Udp      bool   `yaml:"udp"`
}

type ProxyGroupConfig

type ProxyGroupConfig struct {
	Name    string   `yaml:"name"`
	Type    string   `yaml:"type"`
	Proxies []string `yaml:"proxies"`
}

func NewProxyGroup

func NewProxyGroup(n, t string) ProxyGroupConfig

type RuleProvider

type RuleProvider struct {
	Type     string `yaml:"type"`
	Behavior string `yaml:"behavior"`
	Url      string `yaml:"url"`
	Path     string `yaml:"path"`
	Interval int    `yaml:"interval"`
}

Jump to

Keyboard shortcuts

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