Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupReloadHandler ¶ added in v1.3.0
func SetupReloadHandler(reloadFunc func())
SetupReloadHandler 设置信号处理器,监听 SIGUSR1
Types ¶
type CfgRules ¶
type CfgRules struct {
Port int `yaml:"port,omitempty"` // 端口
Country string `yaml:"country,omitempty"` // 国家
RegionName string `yaml:"regionName,omitempty"` // 省
City string `yaml:"city,omitempty"` // 城市
Rules string `yaml:"rules,omitempty"` // 规则
Time int64 `yaml:"time,omitempty"` // 时间
Count int `yaml:"count,omitempty"` // 次数
}
type Conf ¶
type Conf struct {
FrpsLog string `yaml:"frps_log,omitempty"` // 监听的frps日志文件
Logs string `yaml:"logs,omitempty"` // 自身日志文件
NamePort map[string]int `yaml:"name_port,omitempty"` // 名字端口对应表
TablesType string `yaml:"tables_type,omitempty"` // 启用防火墙类型
AllowIp []string `yaml:"allow_ip,omitempty"` // ip白名单
AllowPort []int `yaml:"allow_port,omitempty"` // 端口白名单
Rules []CfgRules `yaml:"rules,omitempty"` // 规则访问
RateMaxTime int64 `yaml:"-"` // IP频率中最高超时时间
}
配置文件结构体
var Cfg Conf
Click to show internal directories.
Click to hide internal directories.