export

package
v0.0.0-...-f4ab8ab Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRunningClients

func GetRunningClients() []string

GetRunningClients 获取所有正在运行的客户端ID列表 返回: 客户端ID列表

func GetVersion

func GetVersion() string

GetVersion 获取版本信息

func IsClientRunning

func IsClientRunning(clientID string) bool

IsClientRunning 检查客户端是否正在运行 clientID: 客户端唯一标识符 返回: 是否运行

func StartClient

func StartClient(clientID string, config ClientConfig) error

StartClient 启动 frpc 客户端 clientID: 客户端唯一标识符,用于管理多个客户端实例 config: 客户端配置 返回: 错误信息

func StopAllClients

func StopAllClients()

StopAllClients 停止所有客户端

func StopClient

func StopClient(clientID string) error

StopClient 停止 frpc 客户端 clientID: 客户端唯一标识符 返回: 错误信息

Types

type ClientConfig

type ClientConfig struct {
	ServerAddr string        `json:"serverAddr"`
	ServerPort int           `json:"serverPort"`
	Token      string        `json:"token,omitempty"`
	User       string        `json:"user,omitempty"`
	Proxies    []ProxyConfig `json:"proxies"`
}

ClientConfig 客户端配置结构

type ClientService

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

ClientService 客户端服务包装器

type ProxyConfig

type ProxyConfig struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	LocalIP    string `json:"localIP"`
	LocalPort  int    `json:"localPort"`
	RemotePort int    `json:"remotePort"`
}

ProxyConfig 代理配置结构

Jump to

Keyboard shortcuts

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