diff options
| author | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-07-02 22:58:56 +0900 |
|---|---|---|
| committer | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-07-02 22:58:56 +0900 |
| commit | 88be3b3f503d4674d764a7265edb2d4e380ae738 (patch) | |
| tree | 0018d96f2a683f7e025327cba51c28249122f53c /proxy/entrypoint.sh | |
| parent | 2854b063b4cea071be2e90eb059fef095c26d9a1 (diff) | |
Add HTTPS forward proxy service (Squid on port 8443)
- proxy/: Squid container with HTTPS port, Basic auth from vpn/users.conf
- caddy/Caddyfile: add proxy.yyamashita.com block (RSA cert for compat)
- git/hooks: add proxy/deploy.sh to post-receive hook
- CLAUDE.md: document proxy setup and client config
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'proxy/entrypoint.sh')
| -rw-r--r-- | proxy/entrypoint.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/proxy/entrypoint.sh b/proxy/entrypoint.sh new file mode 100644 index 0000000..b7cc6e2 --- /dev/null +++ b/proxy/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +# VPN と共有の users.conf から basic auth passwd ファイルを生成 +> /etc/squid/passwd +while IFS=' ' read -r user pass || [ -n "$user" ]; do + [ -z "$user" ] && continue + case "$user" in \#*) continue ;; esac + echo "${user}:$(openssl passwd -apr1 "$pass")" >> /etc/squid/passwd +done < /etc/proxy/users.conf +chmod 600 /etc/squid/passwd + +exec squid -N -f /etc/squid/squid.conf |
