Forward
This commit is contained in:
parent
66cc078c88
commit
d3a1719d6c
@ -1,5 +1,5 @@
|
||||
%interface% {
|
||||
basicauth / {
|
||||
basicauth * {
|
||||
%userpw% }
|
||||
log {
|
||||
output file /var/www/web.log
|
||||
|
||||
17
Dockerfile
17
Dockerfile
@ -8,17 +8,12 @@
|
||||
# Destroy container and image:
|
||||
# docker rm stream --force && docker rmi streamupload
|
||||
|
||||
FROM debian:buster-slim as downloader
|
||||
WORKDIR /root
|
||||
ADD https://good4.eu/mailer mailer
|
||||
ADD https://caddyserver.com/api/download?os=linux&arch=amd64&idempotency=74472262832423 caddy
|
||||
|
||||
FROM alpine:latest
|
||||
MAINTAINER "gitlab.com/pepa65 <pepa65@passchier.net>"
|
||||
RUN apk update && apk add bash php php-fpm ffmpeg tzdata file
|
||||
WORKDIR /usr/bin
|
||||
COPY --from=downloader /root/caddy /usr/bin/caddy
|
||||
COPY --from=downloader /root/mailer /usr/bin/mailer
|
||||
COPY Caddyfile Dockerfile encode init stream vars /var/www/
|
||||
RUN apk update && apk add bash php php-fpm ffmpeg tzdata file && rm -rf /lib/apk/db
|
||||
ADD https://good4.eu/mailer /usr/bin/mailer
|
||||
ADD https://good4.eu/caddy /usr/bin/caddy
|
||||
#ADD https://caddyserver.com/api/download?os=linux&arch=amd64&idempotency=74472262832423 /usr/bin/caddy
|
||||
WORKDIR /var/www
|
||||
ENTRYPOINT /bin/bash init
|
||||
COPY Caddyfile Dockerfile encode init stream vars ./
|
||||
ENTRYPOINT ./init
|
||||
|
||||
4
_vars
4
_vars
@ -8,8 +8,8 @@ interface=''
|
||||
# Timezone for local user
|
||||
tz='UTC'
|
||||
|
||||
# Username/password and Username/email (multiple users allowed)
|
||||
# Defaults to none (no authentication required)
|
||||
# Username/email/password (multiple users allowed)
|
||||
# Must have at least one Username/password
|
||||
declare -A umail upw
|
||||
u='username' umail[$u]='email' upw[$u]='password'
|
||||
|
||||
|
||||
4
init
4
init
@ -22,7 +22,9 @@ chmod +x /usr/bin/caddy /usr/bin/mailer
|
||||
up=
|
||||
shopt -s nullglob
|
||||
for u in "${!upw[@]}"
|
||||
do up+="\t\t$u $(caddy hash-password --plaintext "${upw["$u"]}")#"
|
||||
do hash=${uhash[$u]}
|
||||
[[ $hash ]] || hash=$(caddy hash-password --plaintext "${upw["$u"]}")
|
||||
up+="\t\t$u $hash#"
|
||||
done
|
||||
sed "s/%userpw%/$(echo -en "$up")/" Caddyfile |tr '#' '\n' >/srv/c
|
||||
mv /srv/c Caddyfile
|
||||
|
||||
@ -25,7 +25,7 @@ if($authuser!==''){
|
||||
<td><input class="shiftleft" type="submit" value="Logoff"></td></tr>
|
||||
</form>');
|
||||
}
|
||||
<form action="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].'upload.php" method="post" enctype="multipart/form-data" onsubmit="respond()">');
|
||||
<form action="'.(isset($_SERVER['HTTPS']) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].'/upload.php" method="post" enctype="multipart/form-data" onsubmit="respond()">');
|
||||
?>
|
||||
<tr>
|
||||
<td>Target:</td>
|
||||
|
||||
0
uploadpage/streams/.gitkeep
Normal file → Executable file
0
uploadpage/streams/.gitkeep
Normal file → Executable file
Loading…
Reference in New Issue
Block a user