summaryrefslogtreecommitdiff
path: root/vpn/install.sh
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-07-01 10:48:36 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-07-01 10:48:36 +0900
commit47e47957cc363511d1de5f78caff7ff77ed7d0c7 (patch)
treebd18418d49742bf285b010c59b03a462383b8c3a /vpn/install.sh
parentacff0eebed7cd89a5b50db2366cd055d6aed67de (diff)
Serve YE1 intermediate CA cert for Android VPN trust chain
Android (XREAL Beam Pro) can't validate the server cert because it lacks the Let's Encrypt YE1 hierarchy in its system trust store. The fix: - Serve YE1 cert at https://vpn.yyamashita.com/ca.pem via Caddy - Android VPN profile: set CA certificate to this downloaded cert - install.sh / renew-cert.sh now extract and copy YE1 to caddy dir Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'vpn/install.sh')
-rw-r--r--vpn/install.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/vpn/install.sh b/vpn/install.sh
index 3dc29bc..42088c0 100644
--- a/vpn/install.sh
+++ b/vpn/install.sh
@@ -45,6 +45,10 @@ awk '/BEGIN CERTIFICATE/{n++} n==1' "$CERT_DIR/server.crt" > "$CERT_DIR/server-l
awk '/BEGIN CERTIFICATE/{n++} n>1' "$CERT_DIR/server.crt" > "$CERT_DIR/server-chain.crt"
mv "$CERT_DIR/server-leaf.crt" "$CERT_DIR/server.crt"
+# Android 用 CA 証明書 (YE1 中間 CA) を Caddy で配信
+awk '/BEGIN CERTIFICATE/{n++} n==1' "$CERT_DIR/server-chain.crt" > "$CADDY_DIR/ca.pem"
+echo "Android 用 CA 証明書を ${CADDY_DIR}/ca.pem に配置しました。"
+
echo "証明書を $CERT_DIR/ に保存しました。"
# VPN コンテナ起動