add web interface support to windows setup ...

... and other small improvements
This commit is contained in:
Nicola Murino 2019-10-07 22:37:28 +02:00
parent c74d90407b
commit 3e0558c0e9
4 changed files with 29 additions and 24 deletions

View file

@ -18,8 +18,9 @@ Full featured and highly configurable SFTP server
- Automatically terminating idle connections.
- Atomic uploads are configurable.
- Optional SCP support.
- REST API for users and quota management and real time reports for the active connections with possibility of forcibly closing a connection.
- Prometheus metrics are exposed.
- REST API for users and quota management and real time reports for the active connections with possibility of forcibly closing a connection.
- Web based interface to manage users and connections.
- Configuration is a your choice: JSON, TOML, YAML, HCL, envfile are supported.
- Log files are accurate and they are saved in the easily parsable JSON format.
@ -416,6 +417,7 @@ The logs can be divided into the following categories:
- [cobra](https://github.com/spf13/cobra)
- [xid](https://github.com/rs/xid)
- [nathanaelle/password](https://github.com/nathanaelle/password)
- [SB Admin 2](https://github.com/BlackrockDigital/startbootstrap-sb-admin-2)
Some code was initially taken from [Pterodactyl sftp server](https://github.com/pterodactyl/sftp-server)

View file

@ -18,12 +18,17 @@ import (
)
const (
logSender = "api"
logSender = "httpd"
activeConnectionsPath = "/api/v1/connection"
quotaScanPath = "/api/v1/quota_scan"
userPath = "/api/v1/user"
versionPath = "/api/v1/version"
metricsPath = "/metrics"
webBasePath = "/web"
webUsersPath = "/web/users"
webUserPath = "/web/user"
webConnectionsPath = "/web/connections"
staticFileWebPath = "/static"
)
var (

View file

@ -13,18 +13,11 @@ import (
)
const (
templateBase = "base.html"
templateUsers = "users.html"
templateUser = "user.html"
templateConnections = "connections.html"
templateMessage = "message.html"
webBasePath = "/web"
webUsersPath = "/web/users"
webUserPath = "/web/user"
webConnectionsPath = "/web/connections"
staticFileWebPath = "/static"
templateBase = "base.html"
templateUsers = "users.html"
templateUser = "user.html"
templateConnections = "connections.html"
templateMessage = "message.html"
pageUsersTitle = "Users"
pageConnectionsTitle = "Connections"
page400Title = "Bad request"

View file

@ -2,9 +2,11 @@
; You need to change the paths for the source files to match your environment
#define MyAppName "SFTPGo"
#define MyAppVersion "0.9.2"
#define MyAppVersion "0.9.2-dev"
#define MyAppURL "https://github.com/drakkan/sftpgo"
#define MyAppExeName "sftpgo.exe"
#define MyAppDir "C:\Users\vbox\Desktop\sftpgo_setup"
#define MyOutputDir "C:\Users\vbox\Desktop"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
@ -18,10 +20,10 @@ AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
LicenseFile=C:\Users\vbox\Desktop\sftpgo_setup\LICENSE.txt
LicenseFile={#MyAppDir}\LICENSE.txt
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputDir=C:\Users\vbox\Desktop
OutputDir={#MyOutputDir}
OutputBaseFilename=sftpgo_windows_x86_64
Compression=lzma
SolidCompression=yes
@ -35,19 +37,22 @@ MinVersion=6.1
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "C:\Users\vbox\Desktop\sftpgo_setup\sftpgo.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\vbox\Desktop\sftpgo_setup\sftpgo.db"; DestDir: "{app}"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Users\vbox\Desktop\sftpgo_setup\README.pdf"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\vbox\Desktop\sftpgo_setup\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\vbox\Desktop\sftpgo_setup\sftpgo.json"; DestDir: "{app}"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Users\vbox\Desktop\sftpgo_setup\scripts\*"; DestDir: "{app}\scripts"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:\Users\vbox\Desktop\sftpgo_setup\sql\*"; DestDir: "{app}\sql"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MyAppDir}\sftpgo.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppDir}\sftpgo.db"; DestDir: "{app}"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "{#MyAppDir}\README.pdf"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppDir}\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppDir}\sftpgo.json"; DestDir: "{app}"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "{#MyAppDir}\scripts\*"; DestDir: "{app}\scripts"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MyAppDir}\sql\*"; DestDir: "{app}\sql"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MyAppDir}\templates\*"; DestDir: "{app}\templates"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MyAppDir}\static\*"; DestDir: "{app}\static"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Dirs]
Name: "{app}\logs"; Permissions: everyone-full
[Icons]
Name: "{group}\Web Admin"; Filename: "http://127.0.0.1:8080/web";
Name: "{group}\Service Control"; WorkingDir: "{app}"; Filename: "powershell.exe"; Parameters: "-Command ""Start-Process cmd \""/k cd {app} & {#MyAppName} service --help\"" -Verb RunAs"; Comment: "Install, start, stop, uninstall SFTPGo Service"
Name: "{group}\REST API CLI"; WorkingDir: "{app}\scripts"; Filename: "{cmd}"; Parameters: "/k sftpgo_api_cli.exe --help"; Comment: "Manage users and connections"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"