Page 1 of 1

Announcement: .NET API for automated creation of Users

Posted: 2014-09-16 13:45
by PolarbearDK
We needed to automate the creation of FileZilla users/groups.
We looked at modifying FileZilla Server.xml directly, but rejected the idea because /reload-config kicks all active connections.

What we really needed was an API to FileZilla, but we could'nt find one.
So I wrote an API that mimics the FileZilla Server Interface using .NET.

It is available as a nuget package for Visual Studio https://www.nuget.org/packages/Miracle.FileZilla.Api/
Source/documentation is available on: https://github.com/PolarbearDK/Miracle.FileZilla.Api

Re: Announcement: .NET API for automated creation of Users

Posted: 2014-09-16 14:28
by botg
We looked at modifying FileZilla Server.xml directly, but rejected the idea because /reload-config kicks all active connections.
It's not supposed to do that and I cannot reproduce it either. Do you have more information on this?
It is available as a nuget package for Visual Studio https://www.nuget.org/packages/Miracle.FileZilla.Api/
Source/documentation is available on: https://github.com/PolarbearDK/Miracle.FileZilla.Api
Cool. Would it be possible to rename it to make it more clear that it's for FileZilla Server instead of FileZilla? E.g. Miracle.FileZillaServer.Api

I'm surprised you managed to figure out the overly arcane protocol.

Re: Announcement: .NET API for automated creation of Users

Posted: 2014-09-16 17:40
by PolarbearDK
botg wrote:
We looked at modifying FileZilla Server.xml directly, but rejected the idea because /reload-config kicks all active connections.
It's not supposed to do that and I cannot reproduce it either. Do you have more information on this?
Sorry, that was a bit vague.

On my develop machine (Windows 7) with FileZilla Server 0.9.46 installed on port 14242 as a service:
When my college copied a large file to my machine using FTP, and I did a /reload-config, the FTP transfer was aborted. I have heard that we have seen that in production too, but I don't have the version details
Would it be possible to rename it to make it more clear that it's for FileZilla Server instead of FileZilla?
It is not possible to rename a NuGet package. Besides that, I think it is 100% clear what the package does from the name and description.
I'm surprised you managed to figure out the overly arcane protocol.
I've done a lot of similar implementations like Z-modem protocol, and obscure protocols to various devices. I guess I'm as arcane as the protocol...

Re: Announcement: .NET API for automated creation of Users

Posted: 2014-09-17 12:31
by PolarbearDK
Question: Is there a limit to how many users FileZilla can handle?

During load test of my API I noticed that when creating 10.000 groups and 100.000 users (excessive I know) only ~35.000 users were created.

Re: Announcement: .NET API for automated creation of Users

Posted: 2014-09-17 19:46
by botg
Only two bytes available for number of users (or groups) via the protocol. Once it's bigger than 65535, it starts over from zero.

100000-65536=34464

I'm not happy with that protocol at all.

Re: Announcement: .NET API for automated creation of Users

Posted: 2014-09-18 06:58
by PolarbearDK
botg wrote:100000-65536=34464
Right! I'll better throw an exception in that case :P

Re: Announcement: .NET API for automated creation of Users

Posted: 2014-09-18 08:56
by botg
Next version will allow up to 16M users/groups in the protocol.

I'm sure it'll blow up elsewhere though :)

Re: Announcement: .NET API for automated creation of Users

Posted: 2014-09-18 09:20
by PolarbearDK
botg wrote:Next version will allow up to 16M users/groups in the protocol.
Keep me in the loop. I will update the API when this happens.
I guess I need to check for ProtocolVersion here and there...
botg wrote:I'm sure it'll blow up elsewhere though :)
:D

Re: Announcement: .NET API for automated creation of Users

Posted: 2014-09-18 19:58
by boco
I just called my friend Murphy and he told me it will blow up somewhere. 8)

Re: Announcement: .NET API for automated creation of Users

Posted: 2014-09-22 12:43
by PolarbearDK
FYI: I have updated nuget package and source code.
The managed API now supports all operations supported by the FileZilla Server interface.

Re: Announcement: .NET API for automated creation of Users

Posted: 2015-02-14 20:40
by PolarbearDK
API has now been verified to work with FileZilla server versions: 0.9.46-0.9.49

Re: Announcement: .NET API for automated creation of Users

Posted: 2015-02-27 22:06
by gregnk
Very interesting, this post should be made sticky.

Re: Announcement: .NET API for automated creation of Users

Posted: 2015-06-03 10:40
by vrm42
Hi PolarbearDK!

I read through your description on github and I think I can use your program. I only want to get the content of the active transfers window.
Output line by line to a text file would be great. Can you explain to me how can I achieve that?

Thanks,
vrm

Re: Announcement: .NET API for automated creation of Users

Posted: 2015-06-04 06:41
by PolarbearDK
vrm42 wrote:Hi PolarbearDK!

I read through your description on github and I think I can use your program. I only want to get the content of the active transfers window.
Output line by line to a text file would be great. Can you explain to me how can I achieve that?

Thanks,
vrm
The GetMessagesLoop() sample in https://github.com/PolarbearDK/Miracle. ... Program.cs should suit your needs.

Use

Code: Select all

var messages = serverProtocol.ReceiveMessages(MessageType.Transfer);
to only get messages about transfers.

Re: Announcement: .NET API for automated creation of Users

Posted: 2019-04-03 10:09
by pcn60@optusnet.com.au
Has anyone developed a command-line operated utility using this API that would run on an open source platform like Linux?