Going to archive this repo. See #9 for some explanations.
Thank you for your interest!
💫 This is a Python3 implementation of rejetto's HTTP File Server~
🏗 Under construction...
🎉 Please help make this project grow. Contributions are welcome!
👏 Done Features: | 🕳 To-do Features: |
---|---|
Filelist, download | Virtual File System |
Sorting files, Archiving | Ban, Limits |
Upload, Search | Other |
Accounts, Login | |
File actions |
🍉 Supported platforms:
python3
package installedThe release bundle for Windows platform have additional convenient features. Read them at here.
Drag-drop item(s) to batch file (start.bat
) or command-line (run.py
) for quick file-sharing.
You can just get all requirements for development in a PHFS release package.
👀 This project is not yet ready for production use. But, please, have a try!
You can try by using a release, or:
Install Python 3.
Install Werkzeug by either using pip install werkzeug
or placing the folder Werkzeug-(version)/src/werkzeug
from downloaded archive to cloned repo.
Install WSGIserver by either using pip install wsgiserver
or placing the file WSGIserver-(version)/wsgiserver.py
from downloaded archive to cloned repo.
Get sha256.js, place into repo folder.
Pick a HFS template (for HFS 2.4), rename it to hfs.tpl
and place into cloned repo.
Configure port, base folder, upload-allowed folders and accounts in hfs.ini
. Note: hfs.ini
of original HFS is not compatible to PHFS.
For running a server, open run.py
; for developing, open test.py
.
Template choices:
/sdcard/qpython/projects3
, ensure folder is not nested.dataclasses.py
from Python 3 builtin libs, put into folder. Or, install dataclasses
with PIP console.run.py
to main.py
.run.py
: Run a server. Has no debug feature, but works on pypy on aarch64 architecture.
hfs.ini
: Some configs, like port, are here. Currently you can set a base path as the root dir of served pages, also can set upload-allowed paths.
hash.py
: Hash a password interactively by executing this directly.
test.py
: Run a server for testing, debugging. It also contains werkzeug's reload feature.
_test_macro.py
: Run & test a macro, by entering as argv1 in commandline.
cfgLib.py
: The Config
and Account
object is inside this file.
classesLib.py
: Some useful classes are here.
helpersLib.py
: Some useful functions are here.
mimeLib.py
: Manages MIME types. Get a defined MIME type with something like mimeLib.getmime('*.html')
. You can define your own MIMEs in mime.ini
.
scriptLib.py
: When executing a macro/symbol, usually functions in this file will be called.
serverLib.py
: Defines a WSGI application, which acts like original HFS.
tplLib.py
: The template is interpreted by this.
hashLib.py
: Classes inside can hash passwords from/to base-hash/token-hash.
i18n.ini
: Contains localization data.
i18nLib.py
: I18n.get_string()
inside can get localization string.