naitlee / phfs Goto Github PK
View Code? Open in Web Editor NEWThis is a Python3 implementation of rejetto's HTTP File Server~*
License: GNU General Public License v3.0
This is a Python3 implementation of rejetto's HTTP File Server~*
License: GNU General Public License v3.0
Implementing bandwidth limitation means doing a lot of works on lower-level things, and seems I can't do...
There are choices: let me try first; you help me; or give up.
What would to be mentioned is, PHFS have almost no performance bottlenecks, in a 1000Mbps network, it can transfer 90MiB data per second versus 13MiB with original HFS (to one client)
I've found a problem.
Create an account in hfs.ini
, and specify a path for it. With Takeback template, launch PHFS, view the page with Firefox...
Go to the path, login to the account, back and go to the path again, one can view it;
Manage the account, logout, then re-login, after that go to the path, one got redirected to /~signin, cannot view the page successfully.
I've checked developer tool, and found that there's an unexpected cookie appeared in the request header of the path.
Cookie: HFS_SID_=d175938452acc151ca98b2a23055dd8b55c0ab0ea96548c332388c2d70b9c948; HFS_SID_=38c8b2d82da82c951b04f210ea8c7f5b41434ca03f9c916b38a97c58c4404f25
The 38c8
one is from 2nd login, but, where is the d175
one from?
There's no trace of where is this cookie from though. Weird... ๐ฆ
Now trying this in chromium-based browsers...
Currently PHFS is using a simple ini configure method for development.
Other choices:
/~
Pros/Cons:
INI file | Command line | Windowed interface | Web interface | |
---|---|---|---|---|
User friendly | โ | โ | โ | โ |
Flexibility | โ | โ | โ | โ |
Modernity | โ | โ | โ | โ |
Simplicity | โ | โ | โ | โ |
Which pro would you prefer?
I think this project should be a "core/lite" version of HFS, which means it should not be complex.
What in my mind is just to make a table (csv) that stores username, password hash, and also other things.
But, sometimes "simple" means "insecure", using big dependencies is also a way.
What do you think about? ๐
P.S. I don't like using dependencies, especially which also depends on other dependencies...
When trying to make a new folder in the web interface for a directory that is in the upload_allowed_paths, the following error occurs in the browser.
~lib.js:156 Uncaught TypeError: Cannot read property 'focus' of null
~lib.js:99 POST http://localhost:8090/uploads/?mode=section&id=ajax.mkdir 404 (NOT FOUND)
I'm guessing this is not meant to happen?
Just like HFS and CPython and many, the formal (non-experimental) version of a software may start at 2...
What I've not told is, PHFS is also an experimental project to test whether this idea can be successful.
Now that it's obvious "Yes". No need to tell reasons.
In my thoughts there will be Virtual File System & event scripts, and even new features that is good but not seen, in PHFS2, if that happens...
But this may be very late, at least for half a year, I will not start it early for personal life reasons...
Don't be upset! In the world of free/libre & open source, everyone can contribute, and make (at least) this initial version be better ๐
P.S. Once a guy tried to persuade me to give up on the entire project since "[HFS] is obsolete / old / not welcome / have technical limitations / have performance problems". You know I'll never be hopeless enough to follow such a negative attitude. Reasonable philosophy won't die. Just in case someone have doubts on you, shut him/her mouth up. No one can rule you, and your soul, your passion to learn, to develop, and to build a better world.
P.P.S. Also no need to response to someone that entirely negates you blindly & unfriendly. Just ignore those non-sense stuffs, as they really won't affect much, in any circumstances. You are unique and always the best.
-- last revise in May 2nd, 2022
Just wondering if this is useful to you...
Say something?
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.