This is simple "Cloud-storage" implementation using File Transfer Protocol, which is meant to be run on one
machine.
Warning: Current version doesn't support SSL certificates passwords. To use SSL, just make sure your certificate does not have a password and is installed on your machine.
Tip: If you're planning on handling big amount of users using this program, you should make sure that port range difference(MaxPort - MinPort
) is more than 10
API Usage:
As a rule, you must use DI pattern in this API(DenInject
), which leads us to:
- Registering dependencies:
var configBuilder = new DiConfigBuilder();
configBuilder.UseNeccessaryClasses();
configBuilder.UseFileSystem();
//using default implementation.
configBuilder.UseAuthentication();
//custom logger
configBuilder.UseLogger<InterfaceLogger>();
//Dependency provider is ready.
DiContainer.Construct(configBuilder);
2.Validation of your provider before starting the server as:
DiContainer.ValidateProvider();
- Resolving Ftp Server dependency, i.e:
var server = DiContainer.Provider.Resolve<FtpServer>();
- Starting the server:
Task.Run(() => server.Start(IsEncryptionUsed));
To access storage, users can:
1. Use 'anonymous' login and any password.
2. USE SITE REG <login> <password> command while logged in as 'anonymous'(Using SSL of course) - This will register user in database as <login> with password <password>.
For any other questions, you can browse this repo, which itself is an example of API usage.