专为个人用户所设计的 HTTP 档案系统 – Http File Server,如果您觉得架设 FTP Server 太麻烦,那么这个软件可以提供您更方便的档案传输系统,下载后无须安装,只要解压缩后执行 hfs.exe,于「Virtual File System(虚拟档案系统)」窗格下按鼠标右键,即可新增/移除虚拟档案资料夹,或者,直接将欲加入的档案拖曳至此窗口,便可架设完成个人 HTTP 虚拟档案服务器。
https://github.com/rejetto/hfs?tab=readme-ov-file#installation
官网:
http://www.rejetto.com/hfs/
下载:
汉化:https://files.cnblogs.com/files/xiaochina/hfs汉化.rar
HFS: HTTP File Server (version 3)
Introduction
Access via web your files directly from your disk.
- You be the server, share files fresh from your disk, with unlimited space and bandwidth.
- Fast! Try zipping 100GB, download starts immediately!
- Intelligent. HFS tries to detect problems and suggest solutions.
- Share even a single file with our virtual file system, even with a different name, all without touching the real file. Present things the way you want!
- Watch all activities in real-time.
- Control bandwidth, decide how much to give.
- No intermediaries, give a huge file to your friend without waiting for it to be uploaded on a server first.
This is a full rewrite of the Delphi version.
How does it work
- run HFS on your computer, administration page automatically shows up
- select what files and folders you want to be accessible
- access those files from a phone or another computer just using a browser
- possibly create accounts and limit access to files
Features
- https
- easy certificate generation
- unicode
- virtual file system
- mobile friendly
- search
- accounts
- resumable downloads & uploads
- download folders as zip archive
- delete, move and rename files
- simple website serving
- plug-ins
- real-time monitoring of connections
- show some files
- speed throttler
- geographic firewall
- admin web interface
- multi-language front-end
- virtual hosting
- anti-brute-force (plug-in)
- reverse-proxy support
- comments in file descript.ion
- integrated media player
- customizable with html, css and javascript
- dynamic-dns updater
Installation
NB: minimum Windows version required is 8.1 , Windows Server 2012 R2 (because of Node.js 18)
- go to https://github.com/rejetto/hfs/releases
- click on
Assets
- download the right version for your system, unzip and launch
hfs
file.- Mac: if you get “cannot be opened because it is from an unidentified developer”, you can hold
control
key while clicking, then clickopen
. - If you cannot find your system in the list, see next section Other systems.
- Mac: if you get “cannot be opened because it is from an unidentified developer”, you can hold
- the browser should automatically open on
localhost
address, so you can configure the rest in the Admin-panel.-
if a browser cannot be opened on the computer where you are installing HFS, you should enter this command in the HFS console:
create-admin <PASSWORD>
-
if you cannot access the console (like when you are running as a service), you can edit the config file to add your admin account
-
if you don’t want to use an editor you can create the file with this command:
echo "create-admin: PASSWORD" > config.yaml
-
If you access Admin-panel via localhost, by default HFS won’t require you to login. If you don’t like this behavior, disable it in the Admin-panel or enter this console command config localhost_admin false
.
Other systems
If your system is not Windows/Linux/Mac or you just don’t want to run the binaries, you can try this alternative version:
- install node.js version 18
- execute at command line
npx hfs@latest
The @latest
part is optional, and ensures that you are always up to date.
If this procedure fails, it may be that you are missing one of these requirements.
Configuration and other files will be stored in %HOME%/.vfs
Service
If you want to run HFS at boot (as a service), we suggest the following methods
On Linux
- install node.js
- create a file
/etc/systemd/system/hfs.service
with this content
[Unit]
Description=HFS
After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/npx -y hfs@latest
[Install]
WantedBy=multi-user.target
- run
sudo systemctl daemon-reload && sudo systemctl enable hfs && sudo systemctl start hfs && sudo systemctl status hfs
NB: update will be attempted at each restart
On Windows
- install node.js
- run
npm -g i hfs
- run
npx qckwinsvc2 install name="HFS" description="HFS" path="%APPDATA%npmnode_moduleshfssrcindex.js" args="--cwd %HOMEPATH%.hfs" now
To update
- run
npx qckwinsvc2 uninstall name="HFS"
- run
npm -g update hfs
- run
npx qckwinsvc2 install name="HFS" description="HFS" path="%APPDATA%npmnode_moduleshfssrcindex.js" args="--cwd %HOMEPATH%.hfs" now
Console commands
If you have full access to HFS’ console, you can enter commands. Start with help
to have a full list.
Configuration
For configuration please see file config.md.
Where is it stored
Configuration is stored in the file config.yaml
, exception made for custom HTML which is stored in custom.html
.
These files are kept in the Current Working Directory (cwd), which is by default the same folder of hfs.exe
if you are using this kind of distribution on Windows, or USER_FOLDER/.hfs
on other systems. You can decide a different folder passing --cwd SOME_FOLDER
parameter at command line. Any relative path provided is relative to the cwd.
Check details about config file format.
Internationalization
It is possible to show the Front-end in other languages. Translation for some languages is already provided. If you find an error, consider reporting it or editing the source file.
In the Languages section of the Admin-panel you can install additional language files.
If your language is missing, please consider translating yourself.
Why you should upgrade from HFS 2.x
HFS 2.x is vulnerable to important attacks, and there is no known solution at the moment.
As you can see from the list of features, we already have some goods that you cannot find in HFS 2. Other than that, you can also consider:
- it’s more robust: it was designed to be an always-running server, while HFS 1-2 was designed for occasional usage (transfer and quit)
- passwords are never really stored, just a non-reversible hash is
- faster search (up to 12x)
- more flexible permissions
Security
While this project focuses on ease of use, we care about security.
- HTTPS support
- Passwords are not saved, and not disclosed even without https thanks to SRP
- Automated tests ran on every release, including libraries audit
- No default admin password
Some actions you can take for improved security:
- use https, better if using a proper certificate, even free with Letsencrypt.
- have a domain (ddns is ok too), configure it in “Internet” page, and enable “Accept requests only using domain”
- install “antidos” plugin
- ensure “antibrute” plugin is running
- disable “unprotected admin on localhost”
Hidden features
- Appending
#LOGIN
to address will bring up the login dialog - Appending ?lang=CODE to address will force a specific language
- right/ctrl/command click on toggle-all checkbox will invert each checkbox state
- Appending
?login=USER:PASSWORD
will automatically log in the browser - Appending
?overwrite
on uploads, will override the dont_overwrite_uploading configuration, provided you also have delete permission - Appending
?search=PATTERN
will trigger search at start - Right-click on “check for updates” will let you input a URL of a version to install
- shift+click on a file will show & play
Contribute
There are several ways to contribute
-
It’s very important to report bugs, and if you are not so sure about it, don’t worry, we’ll discuss it. If you find important security problems, please contact us privately so that we can publish a fix before the problem is disclosed, for the safety of other users.
-
Use beta versions, and give feedback.
While betas have more problems, you’ll get more features and give a huge help to the project.
-
While the project should not become too complex, yours may be an idea for a plugin.
-
Write guides or make videos for other users. We got a wiki!
-
Submit your code
If you’d like to make a change yourself in the code, please first open an “issue” or “discussion” about it, so we’ll try to cooperate and understand what’s the best path for it.
-
A plugin can change the look (a theme), and/or introduce a new functionality.
More
-
Flag images are public-domain, downloaded from https://flagpedia.net
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/download/314701.html