FubarDevelopment / FtpServer

Portable FTP server written in .NET
http://fubardevelopment.github.io/FtpServer/
MIT License
473 stars 161 forks source link

Remote ip address in custom FileSystem #71

Closed LetMeSleepAlready closed 5 years ago

LetMeSleepAlready commented 5 years ago

Hi,

I ran into an obstacle, and I am not quite sure if I am approaching it from the right angle.

I have created a custom MembershipProvider, where ValidateUserAsync does the authentication and then returns a custom IFTPUser back so that I have some extra information available later on.

However, now I need to get the RemoteIP address. The current call into IMembershipProvider.ValidateUserAsync can not provide that to me, as it only has username/password.

In the end, I need the remoteIP address in a custom IUnixFileEntry. It calls a remote service, which needs the original remote IP for logging purposes etc.

The remote IP address is obviously available somewhere, but how can I get that at the creation of my filesystem?

fubar-coder commented 5 years ago

Yes, you can access it.

Version 2.x

Version 3.x