baskapteijn / vs-ftp Goto Github PK
View Code? Open in Web Editor NEWA Very Small FTP Server focused on simplicity and portability.
License: GNU General Public License v3.0
A Very Small FTP Server focused on simplicity and portability.
License: GNU General Public License v3.0
Might require another filesystem implementation. Certainly another main entry section. Need to investigate.
In the main of the Linux sources it might be nice to do some DNS resolving on the IP(4) argument.
And look into inet_aton for IP4 string to binary conversion.
Timeout when not received or transmitted >= xx minutes. Where xx minutes should be configurable (config.h).
Make sure to check ALL send and receive functions for sockets.
Let it determine if it's a file or a dir and return abspath.
Maybe even merge is relative path and abs path checks into 1 function if possible.
$ ./vs-ftp 172.16.16.107 2021 /src/yquake2/
2020-07-15_16:57:12 vsftp_server.c[244]: Initializing server
2020-07-15_16:57:12 vsftp_server.c[261]: Starting server
Server handler failed with error -1
On branch: staging/baskapteijn/add_size_cmd
On commit SHA: ddfaacf
Only dir and read flags supported so may not be much more code or complexity. It does make it more useful for gui clients. Need to investigate.
For security reasons, probably better.
$ pftp 172.16.16.107 2021
Connected to 172.16.16.107.
220 Service ready for new user.
Name (172.16.16.107:bas): anonymous
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
On branch: staging/baskapteijn/add_size_cmd
On commit SHA: ddfaacf
strnlen i.o. strlen f.e.
Investigate if a codebase can be created that 1:1 allows it to be run on linux and windows.
This will increase code coverage since it allows for removing some more lines of code and replacing it with a simple branch.
Keep the assertion check active in release!
Just investigate if we can unify this, or even simplify it with the current transfer calls.
Currently universal time is used. Might be nicer to use local time.
master, commit 5f33c39.
Client side (manual abort):
--2020-07-24 09:07:39-- ftp://82.161.203.4:2021//baseq3/pak0.pk3
=> ‘pak0.pk3’
Connecting to 82.161.203.4:2021... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /baseq3 ... done.
==> SIZE pak0.pk3 ... 479493658
==> PASV ... done. ==> RETR pak0.pk3 ... done.
Length: 479493658 (457M) (unauthoritative)
pak0.pk3 9%[=========> ] 41,17M 3,35MB/s eta 1m 53s ^C
Server side:
$ tail -f 2020-07-24_07:05:27.log
2020-07-24_07:07:39 vsftp_server.c[201]: Received command from client: TYPE I
2020-07-24_07:07:39 vsftp_server.c[214]: Command handled successfully
2020-07-24_07:07:39 vsftp_server.c[201]: Received command from client: CWD /baseq3
2020-07-24_07:07:39 vsftp_server.c[214]: Command handled successfully
2020-07-24_07:07:39 vsftp_server.c[201]: Received command from client: SIZE pak0.pk3
2020-07-24_07:07:39 vsftp_server.c[214]: Command handled successfully
2020-07-24_07:07:39 vsftp_server.c[201]: Received command from client: PASV
2020-07-24_07:07:39 vsftp_server.c[126]: Socket 6 on port 40000 ready for connection...
2020-07-24_07:07:39 vsftp_server.c[214]: Command handled successfully
2020-07-24_07:07:39 vsftp_server.c[201]: Received command from client: RETR pak0.pk3
Hangs (or even crashed).
See f.e. https://github.com/adafruit/Adafruit_Si7021
Also note the introduction page of the doxygen report.
Server seems to disconnect/kill itself after a while. Possibly socket timeout?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.