Introduction to the

CuteHttpFileServer/ CHFS is a free, HTTP file sharing server that can be quickly accessed using a browser. It has the following characteristics:

  • Single file, no other files are required for core functions
  • Cross-platform, supporting mainstream platforms: Windows, Linux and Mac
  • The interface is simple and easy to use
  • Support scan code download and mobile phone access, mobile phone and computer file sharing is very convenient
  • Supports account permission control and address filtering
  • Support quick sharing of text snippets
  • Supports webDAV

Compared with other common file sharing methods (such as FTP, flying autumn, network disk, own site), it has the advantages of simple use and more applicable scenarios, and is very convenient and fast in the scenario of personal use and sharing with others.

download

Command line program

  • chfs-changelog.txt

  • CHFS – Linux – 386-2.0. Zip

  • CHFS – Linux – amd64-2.0. Zip

  • CHFS – Linux – arm – 2.0. Zip

  • CHFS – Linux – arm64-2.0. Zip

  • CHFS – Linux – MIPS – 2.0. Zip

  • CHFS – Linux – MIPS – softfloat – 2.0. Zip

  • CHFS – Linux – mips64-2.0. Zip

  • CHFS – Linux – mips64 softfloat – 2.0. Zip

  • CHFS – Linux – mips64le – 2.0. Zip

  • CHFS – Linux – mipsle – 2.0. Zip

  • CHFS – MAC – 386-2.0. Zip

  • CHFS – MAC – amd64-2.0. Zip

  • CHFS – Windows – x64-2.0. Zip

  • CHFS – Windows – x86-2.0. Zip

  • CHFS – Support for lower operating systems (MS XP,OpenBSD 6.0…) .zip

GUI program

  • gui-chfs-windows.zip

Basic usage

Non-system services running

The program is a console program that can be run directly by double clicking, or from the console/command line. You can configure the command line parameters, such as’ CHFS –help’ to view the help:

usage: chfs.exe []

Flags: -help              Show context-sensitive help (also try --help-long and
                      --help-man). -path=DIRECTORIES  Directories where store shared files.separated by'|'. -port=PORT         HTTP listening port(Default is80). -allow=LIST        Allowed IPv4 addresses(Allow any address by default).
                      
                      White list mode:"listitem1[,listitem2. ] "e.g"192.168.1.2 instead - 192.168.1.10 192.169.1.222"allows this 10
                      addresses.
                      
                      Black list mode:"not(listitem1[,listitem2. ] )"e.g."not(192.168.1.2 instead - 192.168.1.10 192.169.1.222)"bans this 10
                      addresses!
  --rule=LIST         Access rules(anybody can access any thing by default).
                      
                      List defines like:"USER:PWD:MASK[:DIR:MASK...][|...]":
                      
                        1,USER and PWD is account name and password
                        2,MASK: "' =NO present, 'r'=read, 'w'=write, 'd'=delete
                        3,r=view+download.w=r+upload+create+rename.d=w+delete
                        4,DIR is directory name.allows wildcard(' * '&'? ') 5,The 3rd field is access mask of shared root directory6.The optional fields is pairs of sub-directory and mask
                        7,The optional sub-directory's mask overwrite parent's8.You should avoid '|' ':' and white space(exclude DIR)
                      
                      For instance": : |root: 123456:rw" bans guest.and defines
                      a account 'root' can do anything
  --log=DIRECTORY     Log directory. Empty value will disable log. -file=FILE         A configuration file which overwrites & enhence the
                      settings. -version           Show application version.
Copy the code

Parameter Description:

help: Display help information
path: The directory you want to share, the default is the program run directory. If multiple directories need to be shared, use
port: Port number used by the program. Default is 80
allow: The IP address filtering mode can be whitelist or blacklist mode
rule: By default, anonymous users have read and write permissions. The syntax is: **RULEITEM1[
log: The directory where user operation logs are stored. The default directory is logs under the program directory. To disable logging, simply assign it a null value.
file: Configuration file that can be used to configure the preceding configuration items. The syntax is the same. If the configuration is valid, the corresponding configuration items are overwritten. In addition, some functions need to be configured through configuration files, such as page customization and SSL certificate Settings.Download the configuration file template
version: Displays the program version number

A few examples:

// The shared directory is the program running directory and the listening port number is80CHFS // The shared directory is disk D and the listening port number is8080
chfs --path="d:/" --port=8080// The shared directory is" d:\projects" and "e:\nsis", and the listening port number is"80
chfs --path= "d: \ projects | e: \ nsis" / / white list mode, allow192.168.1.2-192.168.1.100As well as192.168.1.200CHFS --allow="192.168.1.2-192.168.1.100.192.168.1.200"// Blacklist mode, forbidden192.168.1.2-192.168.1.100As well as192.168.1.200CHFS --allow="not(192.168.1.2-192.168.1.100.192.168.1.200"// anonymous user has read-only permission (anonymous user has read/write permission by default) // account ceshizu, password ceshizu123, read-only for root directory, but read/write for test directory // account yanfazu, password yanfazu123, The permission on the root directory is read-only, But for yanfa directory has read and write access CHFS - rule = ": : r | ceshizu: ceshizu123: r: test: rw | yanfazu: yanfazu123: r: yanfa: rw." " // The anonymous user has no permissions (anonymous users have read and write permissions by default) // Account admin and password admin123 have read and write permissions // Account zhangsan and password zhangsan123 have no read and write permissions on the root directory. But to zhangsanfiles directory has read and write access CHFS - rule = ": : | admin: admin123: rw | zhangsan: zhangsan123: : zhangsanfiles: rw" / / configuration through the configuration file, the file may not exist, Use CHFS --file="d:\ CHFS \chfs.ini" when you need to change the configuration laterCopy the code

\

Tips 1: In Windows, you can quickly share a directory using the right-click pop-up menu. The steps are as follows:

1, Download the registry template file 2, edit the real path of your chfs.exe in this file, and add other parameters. 3, double-click the script file to add the registryCopy the code

Tips 2: In addition, there are several functions that need to be configured in the configuration file. The main configuration items are:

1, html.title: customize the title of the web page. 2, html.notice: customize the bulletin board at the top of the web page. This can be either text or HTML tags. In this case, a pair of ' '(backquotes, printed by the key below the ESC key in the upper-left corner of the keyboard) is required to enclose all HTML tags 3, ssl.cert, and SSL.key: 4, Folder.leaf. download: Only the last directory can be packaged for download. 5, session.timeout: indicates the session duration, in minutesCopy the code

Run as a system service

This program is not a service program, so if you want to run as a system service, you need to create your own service. Here is how to create a service for Windows platform (via NSSM tool) :

1, place chfs.exe in the specified directory. D: \ \ program \ cutehttpfileserver 2, download NSSM three to http://www.nssm.cc/download, put NSSM after decompression procedure in the d: \ \ program \ cutehttpfileserver in 4, Run the command line in d: program\ cuteHttpFileserver, or run the command line and CD to the directory 5. Assuming your service name is cute_http_file_service, type: NSSM install cute_http_file_service 6, the NSSM will display the configuration dialog box, in the dialog box, enter the program path and run parameter 7, the command line: NSSM start cute_http_file_serviceCopy the code

Advanced usage

How do I enable HTTPS?

Cert and ssl.key are specified in the configuration file. You need to set the corresponding file directory. In addition, the lowest SSL version supported by CHFS is SSLv3, which is not compatible with SSL2’s handshake. Oh, and don’t forget to set the listening port to 443

I want to make a set of pages by myself. Where is the development document?

After running the CHFS, through address: http://host:port/asset/api.html access to the API documentation.

How do I enable WebDAv?

The program supports WebDAV by default and shares the same set of access rules as HTTP. The address is http://host:port/webdav