conf

package
v0.0.0-...-7893bb9 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RuleOpAdd    = "add"
	RuleOpRemove = "remove"
	RuleOpUpdate = "update"
)

Variables

This section is empty.

Functions

func APIRoute

func APIRoute(router *gin.RouterGroup, eventChan chan *EventObj)

func AddProxy

func AddProxy(ctx *gin.Context)

func AddProxyGroup

func AddProxyGroup(ctx *gin.Context)

func AppendMitMRules

func AppendMitMRules(ctx *gin.Context)

func DelMitMRules

func DelMitMRules(ctx *gin.Context)

func EditProxy

func EditProxy(ctx *gin.Context)

func EditProxyGroup

func EditProxyGroup(ctx *gin.Context)

func GetDNSConfig

func GetDNSConfig(ctx *gin.Context)

func GetGeneralConfig

func GetGeneralConfig(ctx *gin.Context)

func GetHttpMap

func GetHttpMap(ctx *gin.Context)

func GetMitMRules

func GetMitMRules(ctx *gin.Context)

func GetProxies

func GetProxies(ctx *gin.Context)

func GetProxy

func GetProxy(ctx *gin.Context)

func GetProxyGroup

func GetProxyGroup(ctx *gin.Context)

func GetProxyGroups

func GetProxyGroups(ctx *gin.Context)

func GetRule

func GetRule(ctx *gin.Context)

func Policies

func Policies(ctx *gin.Context)

func RemoveProxy

func RemoveProxy(ctx *gin.Context)

func RemoveProxyGroup

func RemoveProxyGroup(ctx *gin.Context)

func SetDNSConfig

func SetDNSConfig(ctx *gin.Context)

func SetGeneralConfig

func SetGeneralConfig(eventChan chan *EventObj) func(*gin.Context)

func SetHttpMap

func SetHttpMap(ctx *gin.Context)

func SetProxies

func SetProxies(ctx *gin.Context)

func SetProxyGroups

func SetProxyGroups(ctx *gin.Context)

func SetRule

func SetRule(ctx *gin.Context)

Types

type DNSConfig

type DNSConfig struct {
	Servers  []string   `json:"servers"`
	LocalDNS [][]string `json:"local_dns"`
}

type GeneralConfig

type GeneralConfig struct {
	LogLevel            string `json:"log_level"`
	HttpPort            string `json:"http_port"`
	HttpInterface       string `json:"http_interface"`
	SocksPort           string `json:"socks_port"`
	SocksInterface      string `json:"socks_interface"`
	ControllerPort      string `json:"controller_port"`
	ControllerInterface string `json:"controller_interface"`
}

type ProxyRequest

type ProxyRequest struct {
	Name string   `json:"name"`
	VS   []string `json:"vs"`
}

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type RuleOp

type RuleOp struct {
	Op    string   `json:"op"`
	Index int      `json:"index"`
	Rule  []string `json:"rule"`
}

Jump to

Keyboard shortcuts

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