Documentation ¶
Index ¶
- func GetFtpPasvPort(msg string) (port int)
- func GetRunIdByInterfaceName() (runId string)
- func HandleFtpControlConnection(localInfo *config.LocalSvrConf, bp *BaseProxy, cfg *config.FtpProxyConf, ...)
- func HandleTcpWorkConnection(localInfo *config.LocalSvrConf, proxyPlugin plugin.Plugin, ...)
- func IsIpv4(host string) bool
- func JoinFtpControl(fc io.ReadWriteCloser, fs io.ReadWriteCloser, bp *BaseProxy, ...) (inCount int64, outCount int64)
- func NewFtpPasv(port int) (newMsg string)
- func SetFtpDataProxyLocalServer(bp *BaseProxy, cfg *config.FtpProxyConf, localInfo *config.LocalSvrConf, ...) (err error)
- type BaseProxy
- type Control
- type FtpProxy
- type HttpProxy
- type HttpsProxy
- type Proxy
- type Service
- type TcpProxy
- type UdpProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFtpPasvPort ¶
func GetRunIdByInterfaceName ¶
func GetRunIdByInterfaceName() (runId string)
func HandleFtpControlConnection ¶
func HandleFtpControlConnection(localInfo *config.LocalSvrConf, bp *BaseProxy, cfg *config.FtpProxyConf, workConn frpNet.Conn)
func HandleTcpWorkConnection ¶
func HandleTcpWorkConnection(localInfo *config.LocalSvrConf, proxyPlugin plugin.Plugin, baseInfo *config.BaseProxyConf, workConn frpNet.Conn)
Common handler for tcp work connections.
func JoinFtpControl ¶
func JoinFtpControl(fc io.ReadWriteCloser, fs io.ReadWriteCloser, bp *BaseProxy, cfg *config.FtpProxyConf, localInfo *config.LocalSvrConf) (inCount int64, outCount int64)
handler for ftp work connection
func NewFtpPasv ¶
func SetFtpDataProxyLocalServer ¶
func SetFtpDataProxyLocalServer(bp *BaseProxy, cfg *config.FtpProxyConf, localInfo *config.LocalSvrConf, port int) (err error)
todo
Types ¶
type Control ¶
func (*Control) NewWorkConn ¶
func (ctl *Control) NewWorkConn()
func (*Control) Run ¶
1. login 2. start reader() writer() manager() 3. connection closed 4. In reader(): close closedCh and exit, controler() get it 5. In controler(): close readCh and sendCh, manager() and writer() will exit 6. In controler(): ini readCh, sendCh, closedCh 7. In controler(): start new reader(), writer(), manager() controler() will keep running
type FtpProxy ¶
type FtpProxy struct { BaseProxy // contains filtered or unexported fields }
ftp
func (*FtpProxy) InWorkConn ¶
type HttpProxy ¶
type HttpProxy struct { BaseProxy // contains filtered or unexported fields }
HTTP
func (*HttpProxy) InWorkConn ¶
type HttpsProxy ¶
type HttpsProxy struct { BaseProxy // contains filtered or unexported fields }
HTTPS
func (*HttpsProxy) Close ¶
func (pxy *HttpsProxy) Close()
func (*HttpsProxy) InWorkConn ¶
func (pxy *HttpsProxy) InWorkConn(conn frpNet.Conn)
func (*HttpsProxy) Run ¶
func (pxy *HttpsProxy) Run() (err error)
type Proxy ¶
type Proxy interface { Run() error // InWorkConn accept work connections registered to server. InWorkConn(conn frpNet.Conn) Close() log.Logger }
Proxy defines how to work for different proxy type.
type TcpProxy ¶
type TcpProxy struct { BaseProxy // contains filtered or unexported fields }
TCP
func (*TcpProxy) InWorkConn ¶
Click to show internal directories.
Click to hide internal directories.