SFTPGo: new build script + TOML config
This commit is contained in:
parent
f651a5343f
commit
dc3dad842b
|
@ -11,6 +11,7 @@ Packages =
|
||||||
nginx-mod-headers-more
|
nginx-mod-headers-more
|
||||||
certbot-nginx
|
certbot-nginx
|
||||||
php-sqlite
|
php-sqlite
|
||||||
|
go
|
||||||
openssh
|
openssh
|
||||||
iputils
|
iputils
|
||||||
which
|
which
|
||||||
|
|
|
@ -13,5 +13,6 @@ Packages =
|
||||||
python3-certbot-nginx
|
python3-certbot-nginx
|
||||||
knot-dnsutils
|
knot-dnsutils
|
||||||
php-sqlite3
|
php-sqlite3
|
||||||
|
golang-1.18
|
||||||
openssh-server
|
openssh-server
|
||||||
iputils-ping
|
iputils-ping
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
"sftpd": {
|
|
||||||
"bindings": [
|
|
||||||
{
|
|
||||||
"port": 2022,
|
|
||||||
"address": "[::1]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"port": 2022,
|
|
||||||
"address": "127.0.0.1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"host_keys": [
|
|
||||||
"/etc/sftpgo/ed25519"
|
|
||||||
],
|
|
||||||
"host_key_algorithms": [
|
|
||||||
"ssh-ed25519"
|
|
||||||
],
|
|
||||||
"kex_algorithms": [
|
|
||||||
"curve25519-sha256@libssh.org"
|
|
||||||
],
|
|
||||||
"ciphers": [
|
|
||||||
"aes128-gcm@openssh.com",
|
|
||||||
"aes256-gcm@openssh.com",
|
|
||||||
"chacha20-poly1305@openssh.com"
|
|
||||||
],
|
|
||||||
"macs": [
|
|
||||||
"hmac-sha2-256-etm@openssh.com"
|
|
||||||
],
|
|
||||||
"login_banner_file": "/etc/sftpgo/banner.txt",
|
|
||||||
"enabled_ssh_commands": []
|
|
||||||
},
|
|
||||||
"data_provider": {
|
|
||||||
"driver": "sqlite",
|
|
||||||
"name": "sftpgo.db",
|
|
||||||
"users_base_dir": "/srv/ht",
|
|
||||||
"external_auth_hook": "/srv/php/niver/sftpgo-auth.php",
|
|
||||||
"external_auth_scope": 0
|
|
||||||
},
|
|
||||||
"httpd": {
|
|
||||||
"bindings": [
|
|
||||||
{
|
|
||||||
"port": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
[sftpd]
|
||||||
|
banner = "SFTPGo"
|
||||||
|
host_keys = [
|
||||||
|
"/etc/sftpgo/ed25519"
|
||||||
|
]
|
||||||
|
host_key_algorithms = [
|
||||||
|
"ssh-ed25519"
|
||||||
|
]
|
||||||
|
kex_algorithms = [
|
||||||
|
"curve25519-sha256",
|
||||||
|
"curve25519-sha256@libssh.org"
|
||||||
|
]
|
||||||
|
ciphers = [
|
||||||
|
"chacha20-poly1305@openssh.com",
|
||||||
|
"aes128-gcm@openssh.com",
|
||||||
|
"aes256-gcm@openssh.com"
|
||||||
|
]
|
||||||
|
macs = [
|
||||||
|
"hmac-sha2-256-etm@openssh.com",
|
||||||
|
"hmac-sha2-512-etm@openssh.com"
|
||||||
|
]
|
||||||
|
login_banner_file = "/etc/sftpgo/banner.txt"
|
||||||
|
enabled_ssh_commands = []
|
||||||
|
|
||||||
|
[[sftpd.bindings]]
|
||||||
|
port = 2022
|
||||||
|
address = "[::1]"
|
||||||
|
|
||||||
|
[[sftpd.bindings]]
|
||||||
|
port = 2022
|
||||||
|
address = "127.0.0.1"
|
||||||
|
|
||||||
|
[data_provider]
|
||||||
|
driver = "memory"
|
||||||
|
users_base_dir = "/srv/ht"
|
||||||
|
external_auth_hook = "/srv/php/niver/sftpgo-auth.php"
|
||||||
|
external_auth_scope = 0
|
||||||
|
|
||||||
|
[[httpd.bindings]]
|
||||||
|
port = 0
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
git clone https://github.com/drakkan/sftpgo /root/sftpgo-src
|
|
||||||
cd /root/sftpgo-src
|
|
||||||
git checkout v2.2.3
|
|
||||||
pacman -Syu go
|
|
||||||
go build -tags nogcs,nos3,noazblob,nobolt,nomysql,nopgsql,noportable,nometrics -o /usr/local/bin/sftpgo
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
source /etc/os-release
|
||||||
|
export GO=/usr/bin/go
|
||||||
|
if [[ $ID = "debian" ]]; then
|
||||||
|
export GO=/usr/lib/go-1.18/bin/go
|
||||||
|
fi
|
||||||
|
|
||||||
|
git clone https://github.com/drakkan/sftpgo /root/sftpgo-src
|
||||||
|
cd /root/sftpgo-src
|
||||||
|
git checkout v2.2.3
|
||||||
|
$GO build -tags nogcs,nos3,noazblob,nobolt,nomysql,nopgsql,noportable,nometrics -o /usr/local/bin/sftpgo
|
Binary file not shown.
Loading…
Reference in New Issue