Skip to content

Instantly share code, notes, and snippets.

@Abreto
Last active February 2, 2022 22:44
Show Gist options
  • Save Abreto/a9585f6f13164f6b6f364a16d425466e to your computer and use it in GitHub Desktop.
Save Abreto/a9585f6f13164f6b6f364a16d425466e to your computer and use it in GitHub Desktop.
HTTPS Proxy
<Host> {
# push # (?)
gzip
log / stdout "{combined} | {scheme}://{host} {>Connection} {>Upgrade}"
proxy / [to] {
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
}
forwardproxy {
basicauth <user> <password>
hide_ip
hide_via
probe_resistance <secretlink.tld>
}
}
#!/usr/bin/env sh
docker run -d \
--name caddy \
--restart=always \
-v $(pwd)/Caddyfile:/etc/Caddyfile \
-p 80:80 -p 443:443 \
abreto/caddy:v1-http.forwardproxy -default-sni <Host>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment