Go based 0chain webserver Serves files stored on 0chain from specified authticket
Open dedicated console window in above folder
./g0chainwebserver --port <port.no> (default 6942)
Listening on port: 6942
SRV: /img.png (localhost:6942)
GET: /img.png 637.4 KB in 4.180 secs (152.5 KB/sec)
SND: /img.png 637.4 KB in 0.007 secs (91.39 MB/sec)
browser (or app) point to:-
http://IPaddress:port/authticket/xxxxxxxxxxxxxx
e.g. localhost:6942/authticket/xxxxxxxxxxxxxx
http://IPaddress:port/authticket/xxxxxxxxxxxxxx/remote/path/file.ext
e.g. http://192.168.1.50:6942/authticket/xxxxxxxxx/video/cat.m3u8
http://IPaddress:port/authhash/xxxxxxxxxxxxxx/yyyyyyyyyyyyyy_file.ext
e.g. http://192.168.1.50:6942/authhash/xxxxxxxxx/yyyyyyyyyyyyyy_cat.m3u8
e.g. localhost:6942/authhash/xxxxxxxxx/yyyyyyyyyyyyyy_cat.m3u8
--proto (default http) specify http or https
--certpath specify path to ssl certificate if https proto selected
--keypath specify path to ssl private key if https proto selected
--wallet (default wallet.json) specify different wallet file
--allocation (default allocation.txt) specify different allocation file
--debug <1/0> (default 0) - 1 shows command line output to console
--config <configfile.yaml> (default config.yaml)
--port <portno.> (default 6942)
/enckeys (Show client_id and encryption_public_key for server wallet to enable encrypted file shares)
/status (Status OK)
/config (Show currently selected config.yaml file contents)
/version (show version number)
- Added --proto parameter for http/https plus --certpath, --keypath for https option
- Added /enckeys url info path
- Changed filehash separator to _ on folder shares to preserve path relative to authticket
- Fixed file size accuracy
- Improved file size handling
- Better error handling for incorrect paths
- Fixed differences in file/folder handling (folder still requires allocation even though encoded in authticket)
- Added support for filehash for folder shares
- Added file size / xfer speed to console output
- Added support for default file for folder share. If no file specified, looks for .default file and then performs (301) redirect to file specified within