portforwardconf

package
v1.10.8 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PortsCheck

func PortsCheck(ports1Str, ports2Str string) (bool, error)

func PortsStrToIList

func PortsStrToIList(portsStr string) (ports []int, err error)

portsStrToIList

Types

type PortForwardsConfigure

type PortForwardsConfigure struct {
	PortForwardsLimit                  int64 `json:"PortForwardsLimit"`                  //全局端口转发数量限制
	TCPPortforwardMaxConnections       int64 `json:"TCPPortforwardMaxConnections"`       //端口转发全局TCP并发链接数限制
	UDPReadTargetDataMaxgoroutineCount int64 `json:"UDPReadTargetDataMaxgoroutineCount"` //端口转发全局UDP读取目标地址数据协程数限制
}

type PortForwardsRule

type PortForwardsRule struct {
	Name              string                       `json:"Name"`
	Key               string                       `json:"Key"`
	Enable            bool                         `json:"Enable"`
	ForwardTypes      []string                     `json:"ForwardTypes"`
	ListenAddress     string                       `json:"ListenAddress"`
	ListenPorts       string                       `json:"ListenPorts"`
	TargetAddressList []string                     `json:"TargetAddressList"`
	TargetPorts       string                       `json:"TargetPorts"`
	Options           socketproxy.RelayRuleOptions `json:"Options"`
	ReverseProxyList  *[]socketproxy.Proxy         `json:"-"`

	LogLevel                   int  `json:"LogLevel"`           //日志输出级别
	LogOutputToConsole         bool `json:"LogOutputToConsole"` //日志输出到终端
	AccessLogMaxNum            int  `json:"AccessLogMaxNum"`
	WebListShowLastLogMaxCount int  `json:"WebListShowLastLogMaxCount"` //前端列表显示最新日志最大条数
	// contains filtered or unexported fields
}

func (*PortForwardsRule) Fire

func (r *PortForwardsRule) Fire(entry *logrus.Entry) error

func (*PortForwardsRule) GetLastLogs

func (r *PortForwardsRule) GetLastLogs(maxCount int) []any

func (*PortForwardsRule) GetLogrus

func (r *PortForwardsRule) GetLogrus() *logrus.Logger

func (*PortForwardsRule) GetLogsBuffer

func (r *PortForwardsRule) GetLogsBuffer() *logsbuffer.LogsBuffer

func (*PortForwardsRule) InitProxyList

func (r *PortForwardsRule) InitProxyList() error

func (*PortForwardsRule) Levels

func (r *PortForwardsRule) Levels() []logrus.Level

func (*PortForwardsRule) ProxyCount

func (r *PortForwardsRule) ProxyCount() int

func (*PortForwardsRule) StartAllProxys

func (r *PortForwardsRule) StartAllProxys()

func (*PortForwardsRule) StopAllProxys

func (r *PortForwardsRule) StopAllProxys()

Jump to

Keyboard shortcuts

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