Documentation ¶
Index ¶
- Constants
- Variables
- func ParseMetas(metas string) map[string]string
- func ParseRangePort(name string, m *echo.Mapx, mapx map[string]*echo.Mapx) (err error)
- func ProxyConfigFromForm(prefix string, data url.Values) (visitor echo.H, proxy echo.H, err error)
- func RecvProxyConfig(data map[string]interface{}) (recv config.ProxyConf)
- func RecvVisitorConfig(data map[string]interface{}) (recv config.VisitorConf)
- func Run(mConfig map[string]string)
- func ServerPluginExists(name string) bool
- func ServerPluginOptions(pluginNames ...string) map[string]plugin.HTTPPluginOptions
- func ServerPluginRegister(name string, title string, plug PluginGetter)
- func ServerPluginUnregister(names ...string)
- func SetClientConfigFromDB(conf *dbschema.NgingFrpClient) *config.ClientCommonConf
- func SetServerConfigFromDB(conf *dbschema.NgingFrpServer) *config.ServerCommonConf
- func StartClient(pxyCfgs map[string]config.ProxyConf, visitorCfgs map[string]config.VisitorConf, ...) (err error)
- func StartClientByConfig(configContent string, pidFile string) error
- func StartClientByConfigFile(filePath string, pidFile string) error
- func StartFrp(nodeName string, configFile string, wg *sync.WaitGroup) error
- func StartServer(pidFile string, c *config.ServerCommonConf) error
- func StartServerByConfig(configContent string, pidFile string) error
- func StartServerByConfigFile(filePath string, pidFile string) error
- func Table2Config(cc *dbschema.NgingFrpClient) (hash echo.H, err error)
- type ClientConfig
- type Plugin
- type PluginGetter
- type ProxyConfg
- type ServerConfigExtra
Constants ¶
View Source
const (
NotFound = `` /* 4760-byte string literal not displayed */
)
Variables ¶
View Source
var (
Hook = hook.New()
)
Functions ¶
func ParseMetas ¶
func ParseRangePort ¶
func ProxyConfigFromForm ¶
ProxyConfigFromForm 将表单数据转为frpc代理参数
func RecvProxyConfig ¶
func RecvVisitorConfig ¶
func RecvVisitorConfig(data map[string]interface{}) (recv config.VisitorConf)
func ServerPluginExists ¶
func ServerPluginOptions ¶ added in v3.6.3
func ServerPluginOptions(pluginNames ...string) map[string]plugin.HTTPPluginOptions
func ServerPluginRegister ¶
func ServerPluginRegister(name string, title string, plug PluginGetter)
func ServerPluginUnregister ¶
func ServerPluginUnregister(names ...string)
func SetClientConfigFromDB ¶
func SetClientConfigFromDB(conf *dbschema.NgingFrpClient) *config.ClientCommonConf
func SetServerConfigFromDB ¶
func SetServerConfigFromDB(conf *dbschema.NgingFrpServer) *config.ServerCommonConf
func StartClient ¶
func StartClientByConfig ¶
func StartClientByConfigFile ¶
func StartServer ¶
func StartServer(pidFile string, c *config.ServerCommonConf) error
func StartServerByConfig ¶
func StartServerByConfigFile ¶
func Table2Config ¶
func Table2Config(cc *dbschema.NgingFrpClient) (hash echo.H, err error)
Table2Config 数据库表中的数据转为frp配置文件数据格式
Types ¶
type ClientConfig ¶
type ClientConfig struct { Extra echo.H *dbschema.NgingFrpClient }
func NewClientConfig ¶
func NewClientConfig() *ClientConfig
type Plugin ¶
func ServerPluginGet ¶
func ServerPluginSlice ¶
func ServerPluginSlice() []*Plugin
func (*Plugin) Getter ¶
func (p *Plugin) Getter() PluginGetter
type PluginGetter ¶
type PluginGetter func() plugin.HTTPPluginOptions
type ProxyConfg ¶
func NewProxyConfig ¶
func NewProxyConfig() *ProxyConfg
type ServerConfigExtra ¶ added in v3.6.3
type ServerConfigExtra struct { PluginOptions map[string]plugin.HTTPPluginOptions `json:"pluginOptions"` Extra json.RawMessage `json:"extra,omitempty"` // contains filtered or unexported fields }
func NewServerConfigExtra ¶ added in v3.6.3
func NewServerConfigExtra() *ServerConfigExtra
func (*ServerConfigExtra) Parse ¶ added in v3.6.3
func (s *ServerConfigExtra) Parse(extra string) error
func (*ServerConfigExtra) String ¶ added in v3.6.3
func (s *ServerConfigExtra) String() string
func (*ServerConfigExtra) UnmarshaledExtra ¶ added in v3.6.3
func (s *ServerConfigExtra) UnmarshaledExtra() param.Store
Source Files ¶
Click to show internal directories.
Click to hide internal directories.