code: private void connect() throws IOException {
  
  	client = AFTPClient.getInstance(conn.secure(), address, conn.getPort(), conn.getUsername(), conn.getPassword(), conn.getFingerprint(), conn.getStopOnError());
  
  	if (client instanceof SFTPClientImpl && conn.getKey() != null) {
  	    ((SFTPClientImpl) client).setSshKey(conn.getKey(), conn.getPassphrase());
  	}
  
  	setConnectionSettings(client, conn);
  
  	// transfer mode
  	if (conn.getTransferMode() == FTPConstant.TRANSFER_MODE_ASCCI) getClient().setFileType(FTP.ASCII_FILE_TYPE);
  	else if (conn.getTransferMode() == FTPConstant.TRANSFER_MODE_BINARY) getClient().setFileType(FTP.BINARY_FILE_TYPE);
  
  	// Connect
  	try {
  	    Proxy.start(conn.getProxyServer(), conn.getProxyPort(), conn.getProxyUser(), conn.getProxyPassword());
  	    client.connect();
  	}
  	finally {
  	    Proxy.end();
  	}
      }
docs: connects the client
  
  @throws IOException