diff options
Diffstat (limited to 'proxy')
| -rw-r--r-- | proxy/Dockerfile | 6 | ||||
| -rw-r--r-- | proxy/deploy.sh | 10 | ||||
| -rw-r--r-- | proxy/docker-compose.yml | 9 | ||||
| -rw-r--r-- | proxy/entrypoint.sh | 13 | ||||
| -rw-r--r-- | proxy/install.sh | 12 | ||||
| -rw-r--r-- | proxy/renew-cert.sh | 22 | ||||
| -rw-r--r-- | proxy/squid.conf | 21 |
7 files changed, 0 insertions, 93 deletions
diff --git a/proxy/Dockerfile b/proxy/Dockerfile deleted file mode 100644 index f11141b..0000000 --- a/proxy/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM alpine:3.21 -RUN apk add --no-cache squid openssl -COPY squid.conf /etc/squid/squid.conf -COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] diff --git a/proxy/deploy.sh b/proxy/deploy.sh deleted file mode 100644 index 3f5c6ba..0000000 --- a/proxy/deploy.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -cd "$(dirname "$0")" - -if [ ! -f certs/server.crt ]; then - echo "Proxy: 未初期化のためスキップ (install.sh を実行してください)" - exit 0 -fi - -docker compose up -d --build diff --git a/proxy/docker-compose.yml b/proxy/docker-compose.yml deleted file mode 100644 index 81a7fa6..0000000 --- a/proxy/docker-compose.yml +++ /dev/null @@ -1,9 +0,0 @@ -services: - proxy: - build: . - restart: unless-stopped - network_mode: host - volumes: - - ./certs/server.crt:/etc/squid/certs/server.crt:ro - - ./certs/server.key:/etc/squid/certs/server.key:ro - - /app/infra/vpn/users.conf:/etc/proxy/users.conf:ro diff --git a/proxy/entrypoint.sh b/proxy/entrypoint.sh deleted file mode 100644 index b7cc6e2..0000000 --- a/proxy/entrypoint.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/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 diff --git a/proxy/install.sh b/proxy/install.sh deleted file mode 100644 index 58a8e53..0000000 --- a/proxy/install.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -cd "$(dirname "$0")" - -echo "=== Proxy Install: proxy.yyamashita.com ===" -bash "$(pwd)/renew-cert.sh" - -echo "" -echo "=== Proxy 起動完了 ===" -echo " アドレス: https://proxy.yyamashita.com:8443" -echo " 認証: VPN と同じユーザー名/パスワード (Basic 認証)" -echo " 証明書の更新: bash /app/infra/proxy/renew-cert.sh" diff --git a/proxy/renew-cert.sh b/proxy/renew-cert.sh deleted file mode 100644 index 8924d9b..0000000 --- a/proxy/renew-cert.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -cd "$(dirname "$0")" - -DOMAIN="proxy.yyamashita.com" -CADDY_DIR="/app/infra/caddy" -CADDY_CERT_BASE="/data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/${DOMAIN}/${DOMAIN}" - -echo "証明書を更新中..." -mkdir -p certs - -if ! docker compose -f "$CADDY_DIR/docker-compose.yml" exec -T caddy \ - cat "${CADDY_CERT_BASE}.crt" > certs/server.crt; then - echo "Error: 証明書の取得に失敗しました。Caddyfile に ${DOMAIN} が設定されているか確認してください。" - exit 1 -fi -docker compose -f "$CADDY_DIR/docker-compose.yml" exec -T caddy \ - cat "${CADDY_CERT_BASE}.key" > certs/server.key -chmod 600 certs/server.key - -echo "証明書を更新しました。" -bash "$(pwd)/deploy.sh" diff --git a/proxy/squid.conf b/proxy/squid.conf deleted file mode 100644 index 29ebd05..0000000 --- a/proxy/squid.conf +++ /dev/null @@ -1,21 +0,0 @@ -https_port 8443 cert=/etc/squid/certs/server.crt key=/etc/squid/certs/server.key - -auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd -auth_param basic realm "Proxy" -auth_param basic credentialsttl 2 hours - -acl authenticated proxy_auth REQUIRED -http_access allow authenticated -http_access deny all - -forwarded_for delete -via off - -dns_nameservers 1.1.1.1 8.8.8.8 - -cache_dir null /tmp -cache deny all -access_log stdio:/dev/stdout -cache_log stdio:/dev/stderr -cache_store_log none -coredump_dir /tmp |
