mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-26 16:41:53 +08:00
feat(ftp): support upload, download and PASV rebind (#13)
Co-authored-by: E99p1ant <[email protected]>
This commit is contained in:
@@ -317,7 +317,7 @@ func (l *Listener) handle(conn net.Conn, connectionID uint32, acceptTime time.Ti
|
||||
}
|
||||
c.RecycleReadPacket()
|
||||
|
||||
if con, ok := c.conn.(*tls.Conn); ok {
|
||||
if con, ok := c.Conn.(*tls.Conn); ok {
|
||||
connState := con.ConnectionState()
|
||||
tlsVerStr := tlsVersionToString(connState.Version)
|
||||
if tlsVerStr != "" {
|
||||
@@ -619,8 +619,8 @@ func (l *Listener) parseClientHandshakePacket(c *Conn, firstTime bool, data []by
|
||||
// Check for SSL.
|
||||
if firstTime && l.TLSConfig != nil && clientFlags&CapabilityClientSSL > 0 {
|
||||
// Need to switch to TLS, and then re-read the packet.
|
||||
conn := tls.Server(c.conn, l.TLSConfig)
|
||||
c.conn = conn
|
||||
conn := tls.Server(c.Conn, l.TLSConfig)
|
||||
c.Conn = conn
|
||||
c.bufferedReader.Reset(conn)
|
||||
c.Capabilities |= CapabilityClientSSL
|
||||
return "", "", nil, nil
|
||||
|
||||
Reference in New Issue
Block a user