conf

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_AUTO_START = false
View Source
const DEFAULT_DIRECT_DOMAIN_LIST = "geosite:cn"
View Source
const DEFAULT_DIRECT_IP_LIST = "geoip:private,geoip:cn"
View Source
const DEFAULT_ENV_FILE = "default.env"
View Source
const DEFAULT_GRPC_PORT = 50051
View Source
const DEFAULT_HTTP_PROXY = "http://127.0.0.1:30000"
View Source
const DEFAULT_PROXY_DOMAIN_LIST = "geosite:google"
View Source
const DEFAULT_PROXY_IP_LIST = "geoip:!cn"
View Source
const DEFAULT_RUNTIME_DIR = "runtime"
View Source
const DEFAULT_SUBSCRIBE_DATA_FILE = "subscribe_data.txt"
View Source
const DEFAULT_TEST_URL = "https://www.google.com"
View Source
const DEFAULT_V2RAY_API_PORT = 15492
View Source
const DEFAULT_V2RAY_PATH = "bin/v2ray.exe"
View Source
const DEFAULT_WEB_SERVER_PORT = 8087

Variables

This section is empty.

Functions

func SetConf

func SetConf(v Conf)

func UpdateConf added in v1.3.0

func UpdateConf(mp map[string]string, fpath string) error

Types

type Conf

type Conf struct {
	TestUrl                               string
	EnvFile                               string
	RuntimeDir                            string
	AutoStart                             bool
	GrpcPort, V2rayApiPort, WebServerPort int
	V2rayPath                             string
	SubscribeUrl                          string
	SubscribeDataFile                     string
	// TODO 拆分HttpProxy配置为HTTP协议端口,SOCKS协议端口。 使用HTTP端口为系统代理
	HttpProxy                                                    string
	DirectDomainList, DirectIpList, ProxyDomainList, ProxyIpList []string
}

func GetConf

func GetConf() Conf

func (Conf) GetHttpProxyPort

func (cf Conf) GetHttpProxyPort() int

func (Conf) GetHttpProxyProtocol added in v1.4.0

func (cf Conf) GetHttpProxyProtocol() string

GetHttpProxyProtocol. get SystemProxy Inbound Protocol By HttpProxy. Only Support http and socks curl --proxy socks5://127.0.0.1:30000 https://httpbin.org/get -v curl --proxy http://127.0.0.1:30000 https://httpbin.org/get -v

func (Conf) GetLogger

func (cf Conf) GetLogger() *miniutils.Logger

func (Conf) GetOkInboundProtocols added in v1.4.1

func (cf Conf) GetOkInboundProtocols() []string

func (Conf) GetSubscribeData

func (cf Conf) GetSubscribeData() string

func (Conf) HttpProxySplit added in v1.4.0

func (cf Conf) HttpProxySplit() []string

func (Conf) UpdateSubscribeData

func (cf Conf) UpdateSubscribeData(val string) error

Jump to

Keyboard shortcuts

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