A web app that allows simple remote apps and file management on the host machine. With it, you can:
- Start, restart, stop console apps and view their logs
- Download files from url
- Delete files in a directory
- See available and total disk space
App uses SignalR for realtime server-client communication. Multiple clients can use this app at the same time.
- Make sure you have
.NET 8 sdk
installed - Clone repo
git clone https://github.com/CompleXss/RemoteFileManager.git
- To build framework-dependent app (executable size is ~200 KB), run:
build.bat
on Windowsbuild.sh
on Linux
- To build framework-independent app (executable size is ~100 MB), run:
build_self_contained.bat
on Windowsbuild_self_contained.sh
on Linux
If you want to just run the app and not publish it:
cd RemoteFileManager
(into the inner folder)- Run one of the following (or use your IDE instead):
# To run in debug mode
dotnet run
# To run in release mode
dotnet run -c Release
Also, you can run dotnet publish
with options manually if you want to customize build behaviour.
After using build scripts or dotnet publish
the app is ready to be used outside of this project folder.
To configure app, edit appsettings.json
which looks like this:
{
"AppRunner": {
"AppPaths": {
"TestApp": "C:/test/app.bat"
},
"MaxLogsCountPerApp": 256
},
"FileManager": {
"AllowedDirectories": [
{
"Name": "Test directory",
"Path": "./test/",
"CreateAllowed": true,
"EditAllowed": true
}
],
"QueryParams": [
{
"HostWildcard": "example.com/download",
"Params": {
"token": "my-token"
}
}
],
"FilesChangesLogFile": "./logs/files-changes.log"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"System.Net.Http": "Warning",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"Urls": "http://0.0.0.0:7007"
}
AppRunner/AppPaths
- display names and paths of console appsAppRunner/MaxLogsCountPerApp
- max number of log lines to keep in memory per appFileManager/AllowedDirectories
- directories available to clients where:
"Name" - directory name that will be shown to client
"Path" - path to directory (client won't see it)
"CreateAllowed" - allows client to download files into this directory
"EditAllowed" - allows client to edit and delete files in this directory
FileManager/QueryParams
(optional) - query params that should be added to download url if it containsHostWildcard
FileManager/FilesChangesLogFile
(optional) - location of the log file with"file was created / file was deleted"
contentsUrls
- address and port forhttps
and/orhttp
protocols (0.0.0.0
meanslocalhost
but available for other computers in the same network)AllowedHosts
- who can connect to the app. * (star) means everyone
FileManager/AllowedDirectories
section supports hot reload. You can change this section while app is running- All
AllowedDirectories
are locked when app is running so you can't delete/change them. If you remove directory fromAllowedDirectories
(when app is working) it will become unlocked - Paths may be either absolute or relative
- Select an app
- View its status (running / stopped) and logs
- Start, restart, stop it
- Download: select directory, paste file link, specify file name (if you want to), hit
Start download
- Delete: select directory, select file, hit
Delete
, confirm - Disk space shows info for directory selected in block "Manage files"
- Pause / resume / cancel downloads