Closed ajinwu closed 4 years ago
hello, I have an error when TLS open and download limit, I recvied an error:
like this:
ls: Fatal error: gnutls_handshake: An unexpected TLS packet was received.
my puftpdlib version: pyftpdlib 1.5.6
pyftpdlib 1.5.6
my python version: Python 3.6.3
Python 3.6.3
mycode:
import os from pyftpdlib.handlers import FTPHandler, ThrottledDTPHandler, TLS_FTPHandler from pyftpdlib.servers import FTPServer, ThreadedFTPServer import logging from hashlib import md5 from Auth.myauth import Auth def main(): authorizer = Auth() authorizer.add_user('user', md5("12345".encode("utf-8")).hexdigest(), './', perm='elradfmwMT') authorizer.add_anonymous(os.getcwd()) # limit download and upload dtp_handler = ThrottledDTPHandler dtp_handler.read_limit = 1000 * 100 dtp_handler.write_limit = 1000 * 10 # handler logic # handler = FTPHandler # handler.authorizer = authorizer # handler.dtp_handler = dtp_handler # handler.banner = "ftp server is running" address = ('0.0.0.0', 21) # ssl support handler = TLS_FTPHandler handler.certfile = 'M:\\ftp_server\cert_file\cert.pem' handler.keyfile = 'M:\\ftp_server\cert_file\key.pem' handler.authorizer = authorizer handler.tls_control_required = True handler.tls_data_required = True # handler.dtp_handler = dtp_handler handler.banner = "ftp server is running" # logging logging.basicConfig(format='%(asctime)s %(filename)s : %(levelname)s %(message)s', datefmt='%Y-%m-%d %A %H:%M:%S', filename='../log/ftp.log', level=logging.DEBUG) server = FTPServer(address, handler) server.max_cons = 256 server.max_cons_per_ip = 5 # start ftp server server.serve_forever() if __name__ == '__main__': main()
hello, I have an error when TLS open and download limit, I recvied an error:
like this:
ls: Fatal error: gnutls_handshake: An unexpected TLS packet was received.
my puftpdlib version:
pyftpdlib 1.5.6
my python version:
Python 3.6.3
mycode: