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:
- Windows 7 and upper
- GNU/Linux, *nix, *BSD
- Android, with QPython 3L or Termux with
python3
package installed - ARM Boards like Raspberry Pi, with PyPy
- ...
The 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 folderWerkzeug-(version)/src/werkzeug
from downloaded archive to cloned repo. -
Install WSGIserver by either using
pip install wsgiserver
or placing the fileWSGIserver-(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, opentest.py
.
Template choices:
- HFS Default Template
- Takeback (Recommended)
- Throwback
- Stripes
- mobil-light
- To use in QPython 3L on Android:
- Put a unix release into folder
/sdcard/qpython/projects3
, ensure folder is not nested. - Get
dataclasses.py
from Python 3 builtin libs, put into folder. Or, installdataclasses
with PIP console. - Rename
run.py
tomain.py
. - In QPython 3L app, go to Programs, in Projects tab, select phfs-unix then run.
- Put a unix release into folder
-
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
: TheConfig
andAccount
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 likemimeLib.getmime('*.html')
. You can define your own MIMEs inmime.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.