HTTP File Server¶
HTTP file server converts the local file system directory into an HTTP server.
Usage¶
dir(string):- local file directory, defaults to the current working directory.
put(bool, default=false) 3.3.0- Enable HTTP PUT upload support. When enabled, files can be uploaded via PUT requests to the server.
Forwarding Chain
Forwarding chain will be ignored by file service.
Example¶
Simple HTTP File Server¶
Expose /home director to port 8080 as an HTTP service.
Basic Authentication¶
Set up basic authentication for the service.
TLS¶
Add a TLS encrypted transport layer (HTTPS) to the service.
Upload¶
3.3.0
The file service supports file upload via HTTP PUT method when the put option is enabled.
Upload a file:
Public Network Access¶
If you need to temporarily access the file service through the public network, you can use the public reverse proxy service provided by Wisper to anonymously expose the local file service to the public network for access.
When connected to the Wisper server normally, there will be log information similar to the following:
{"connector":"tunnel","dialer":"wss","endpoint":"006478add9ed096a","hop":"hop-0","kind":"connector","level":"info",
"msg":"create tunnel on 006478add9ed096a:0/tcp OK, tunnel=50ce9728-5d92-4d45-871d-4f275d5179cb, connector=956fcbe5-6e2d-439a-8aa3-af0df848a81a",
"node":"node-0","time":"2023-10-19T22:41:05.759+08:00",
"tunnel":"50ce9728-5d92-4d45-871d-4f275d5179cb"}
The 006478add9ed096a in the endpoint field is a temporary public access point generated by server and is valid for 24 hours. This file service can be accessed immediately through https://006478add9ed096a.gost.run.