Documentation ¶
Index ¶
- Variables
- func CreateProxy(s *ProxyServer) error
- func DeleteProxy(proxyName string)
- func LoadConf(confFile string) (err error)
- func ReloadConf(confFile string) (err error)
- func RunDashboardServer(addr string, port int64) (err error)
- type GeneralResponse
- type Listener
- type ProxyServer
- func (p *ProxyServer) Close()
- func (p *ProxyServer) Compare(p2 *ProxyServer) bool
- func (p *ProxyServer) Init()
- func (p *ProxyServer) Lock()
- func (p *ProxyServer) RegisterNewWorkConn(c *conn.Conn)
- func (p *ProxyServer) Start(c *conn.Conn) (err error)
- func (p *ProxyServer) Unlock()
- func (p *ProxyServer) WaitUserConn() (closeFlag bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ConfigFile string = "./frps.ini" BindAddr string = "0.0.0.0" BindPort int64 = 7000 VhostHttpPort int64 = 0 // if VhostHttpPort equals 0, don't listen a public port for http protocol VhostHttpsPort int64 = 0 // if VhostHttpsPort equals 0, don't listen a public port for https protocol DashboardPort int64 = 0 // if DashboardPort equals 0, dashboard is not available LogFile string = "console" LogWay string = "console" // console or file LogLevel string = "info" LogMaxDays int64 = 3 PrivilegeMode bool = false PrivilegeToken string = "" HeartBeatTimeout int64 = 90 UserConnTimeout int64 = 10 VhostHttpMuxer *vhost.HttpMuxer VhostHttpsMuxer *vhost.HttpsMuxer ProxyServers map[string]*ProxyServer = make(map[string]*ProxyServer) // all proxy servers info and resources ProxyServersMutex sync.RWMutex )
common config
Functions ¶
func CreateProxy ¶ added in v0.7.0
func CreateProxy(s *ProxyServer) error
func DeleteProxy ¶ added in v0.7.0
func DeleteProxy(proxyName string)
func ReloadConf ¶ added in v0.6.0
the function can only reload proxy configures common section won't be changed
func RunDashboardServer ¶ added in v0.6.0
Types ¶
type GeneralResponse ¶ added in v0.6.0
type ProxyServer ¶
type ProxyServer struct { config.BaseConf BindAddr string ListenPort int64 CustomDomains []string Status int64 CtlConn *conn.Conn // control connection with frpc // contains filtered or unexported fields }
func NewProxyServer ¶ added in v0.6.0
func NewProxyServer() (p *ProxyServer)
func NewProxyServerFromCtlMsg ¶ added in v0.7.0
func NewProxyServerFromCtlMsg(req *msg.ControlReq) (p *ProxyServer)
func (*ProxyServer) Close ¶
func (p *ProxyServer) Close()
func (*ProxyServer) Compare ¶ added in v0.6.0
func (p *ProxyServer) Compare(p2 *ProxyServer) bool
func (*ProxyServer) Init ¶
func (p *ProxyServer) Init()
func (*ProxyServer) Lock ¶
func (p *ProxyServer) Lock()
func (*ProxyServer) RegisterNewWorkConn ¶ added in v0.6.0
func (p *ProxyServer) RegisterNewWorkConn(c *conn.Conn)
func (*ProxyServer) Start ¶
func (p *ProxyServer) Start(c *conn.Conn) (err error)
start listening for user conns
func (*ProxyServer) Unlock ¶
func (p *ProxyServer) Unlock()
func (*ProxyServer) WaitUserConn ¶
func (p *ProxyServer) WaitUserConn() (closeFlag bool)
Click to show internal directories.
Click to hide internal directories.