config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	G_KeyBytes       []byte
	G_KeyBlock       cipher.Block
	G_Cache          *lru.Cache
	G_RequestDummies *lru.Cache
)
View Source
var (
	G_Config = flag.String("c", "", "config file path")

	G_Key      = flag.String("k", "0123456789abcdef", "key, important")
	G_Auth     = flag.String("a", "", "proxy authentication, form: username:password (remember the colon)")
	G_Upstream = flag.String("up", "", "upstream server address (e.g. 127.0.0.1:8100)")
	G_Local    = flag.String("l", ":8100", "local listening")

	G_Debug            = flag.Bool("debug", false, "debug mode")
	G_DisableShoco     = flag.Bool("disable-shoco", false, "disable shoco compression")
	G_DisableConsole   = flag.Bool("disable-console", false, "disable the console access")
	G_ProxyAllTraffic  = flag.Bool("proxy-all", false, "proxy Chinese websites")
	G_UseChinaList     = flag.Bool("china-list", true, "identify Chinese websites using china-list")
	G_HRCounter        = flag.Bool("hr-counter", true, "use high resolution counter")
	G_RecordLocalError = flag.Bool("local-error", false, "log all localhost errors")
	G_PartialEncrypt   = flag.Bool("partial", false, "partially encrypt the tunnel traffic")

	G_DNSCacheEntries = flag.Int("dns-cache", 1024, "DNS cache size")
	G_Throttling      = flag.Int("throttling", 0, "traffic throttling, experimental")
	G_ThrottlingMax   = flag.Int("throttling-max", 1024*1024, "traffic throttling token bucket max capacity")
)

Functions

func LoadConfig

func LoadConfig()

func ParseConf

func ParseConf(str string) (*conf_t, error)

func UpdateKey

func UpdateKey()

Types

type ConfError

type ConfError struct {
	// contains filtered or unexported fields
}

func (*ConfError) Error

func (e *ConfError) Error() string

Jump to

Keyboard shortcuts

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