Documentation
¶
Index ¶
- func EnsureFrpc() (string, error)
- func EnsureFrps() (string, error)
- func FrpcConfigPath() string
- func FrpcPath() string
- func FrpsConfigPath() string
- func FrpsPath() string
- func GenerateFrpcConfig(relay *config.RelayConfig) error
- func GenerateFrpsConfig(bindPort int, token string) error
- func LogFilePath() string
- func PID() int
- func Running() bool
- func Start() error
- func StartQuick(port, proto string) error
- func Stop() error
- type CheckResult
- type RuleCheckResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateFrpcConfig ¶
func GenerateFrpcConfig(relay *config.RelayConfig) error
GenerateFrpcConfig 从 config.yml 的 relay 配置生成 frpc.toml
func GenerateFrpsConfig ¶
GenerateFrpsConfig 生成服务端 frps.toml
func StartQuick ¶
StartQuick 前台运行 frpc(quick --relay 模式,Ctrl+C 退出)
Types ¶
type CheckResult ¶ added in v0.7.1
type CheckResult struct {
Server string `json:"server"`
ServerOK bool `json:"server_ok"`
ServerLatency int64 `json:"server_latency_ms"`
FrpcRunning bool `json:"frpc_running"`
FrpcPID int `json:"frpc_pid"`
Rules []RuleCheckResult `json:"rules"`
Total int `json:"total"`
Passed int `json:"passed"`
Failed int `json:"failed"`
}
CheckResult 链路检测总结果
func Check ¶ added in v0.7.1
func Check(cfg *config.RelayConfig, ruleName string) CheckResult
Check 执行链路检测
type RuleCheckResult ¶ added in v0.7.1
type RuleCheckResult struct {
Name string `json:"name"`
Proto string `json:"proto"`
LocalPort int `json:"local_port"`
RemotePort int `json:"remote_port"`
LocalOK bool `json:"local_ok"`
RemoteOK bool `json:"remote_ok"`
LatencyMS int64 `json:"latency_ms"`
LocalErr string `json:"local_err,omitempty"`
RemoteErr string `json:"remote_err,omitempty"`
}
RuleCheckResult 单条规则检测结果
Click to show internal directories.
Click to hide internal directories.