79 lines
2.5 KiB
Bash
Executable File
79 lines
2.5 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ "x$1" = "x" ]; then
|
|
echo "Usage: $0 <Tarball URL>"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -e "gopath" ]; then
|
|
echo "gopath/ directory already exists, remove it first"
|
|
exit 1
|
|
fi
|
|
|
|
go_get() {
|
|
GOPATH="$(pwd)/gopath" go get -v "$@"
|
|
}
|
|
|
|
mkdir -p gopath/src/github.com/mholt/caddy
|
|
curl -L "$1" | tar --strip-components=1 -C gopath/src/github.com/mholt/caddy -xzf -
|
|
|
|
# Disable telemetry in run.go and rename to Cadmium
|
|
patch -d gopath/src/github.com/mholt/caddy -p1 <"$(pwd)/patches/run.go.diff"
|
|
|
|
# Replace telemetry with a stub
|
|
rm -r gopath/src/github.com/mholt/caddy/telemetry
|
|
mkdir gopath/src/github.com/mholt/caddy/telemetry
|
|
cp patches/collection.go gopath/src/github.com/mholt/caddy/telemetry/collection.go
|
|
cp patches/plugins.go gopath/src/github.com/mholt/caddy/caddy/caddymain/plugins.go
|
|
|
|
## Now download all the plugins ##
|
|
|
|
# Directives / Middleware
|
|
go_get github.com/linkonoid/caddy-dyndns
|
|
go_get github.com/casbin/caddy-authz
|
|
go_get github.com/miquella/caddy-awses
|
|
go_get github.com/coopernurse/caddy-awslambda
|
|
go_get github.com/nicolasazrak/caddy-cache
|
|
go_get github.com/jung-kurt/caddy-cgi
|
|
go_get github.com/captncraig/cors
|
|
go_get github.com/payintech/caddy-datadog
|
|
go_get github.com/epicagency/caddy-expires
|
|
go_get github.com/filebrowser/filebrowser/caddy/filemanager
|
|
go_get github.com/echocat/caddy-filter
|
|
go_get github.com/caddyserver/forwardproxy
|
|
go_get github.com/kodnaplakal/caddy-geoip
|
|
go_get github.com/abiosoft/caddy-git
|
|
go_get github.com/zikes/gopkg
|
|
go_get github.com/pieterlouw/caddy-grpc
|
|
go_get github.com/filebrowser/filebrowser/caddy/hugo
|
|
go_get github.com/pyed/ipfilter
|
|
go_get github.com/filebrowser/filebrowser/caddy/jekyll
|
|
go_get github.com/BTBurke/caddy-jwt
|
|
go_get github.com/simia-tech/caddy-locale
|
|
go_get github.com/tarent/loginsrv/caddy
|
|
go_get github.com/SchumacherFM/mailout
|
|
go_get github.com/hacdias/caddy-minify
|
|
go_get github.com/Xumeiquer/nobots
|
|
go_get github.com/miekg/caddy-prometheus
|
|
go_get github.com/mastercactapus/caddy-proxyprotocol
|
|
go_get github.com/xuqingfeng/caddy-rate-limit
|
|
go_get github.com/captncraig/caddy-realip
|
|
go_get github.com/freman/caddy-reauth
|
|
# TODO: go_get github.com/restic/caddy fails to build
|
|
go_get blitznote.com/src/caddy.upload
|
|
go_get github.com/hacdias/caddy-webdav
|
|
|
|
# DNS providers (TODO)
|
|
|
|
# Caddyfile loaders
|
|
go_get github.com/lucaslorentz/caddy-docker-proxy/plugin
|
|
|
|
# Server types
|
|
# TODO: DNS. Should be CoreDNS: https://github.com/coredns/coredns
|
|
go_get github.com/pieterlouw/caddy-net
|
|
|
|
# Event hooks
|
|
go_get github.com/hacdias/caddy-service
|