From 9c9a25218e33edf9cea2fba02630c20de05326b4 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 14 Nov 2025 10:15:48 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20VPN=20IP=20=ED=99=95=EC=9D=B8=20?= =?UTF-8?q?=EB=AA=85=EB=A0=B9=EC=96=B4=20=EC=88=98=EC=A0=95=20(tailscale?= =?UTF-8?q?=20ip=20-4=20=EC=82=AC=EC=9A=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제: - tailscale status --json으로 파싱 시도했으나 동작하지 않음 - VPN IP 할당 대기 중 10초 타임아웃 발생 해결: - 기존 스크립트와 동일하게 'tailscale ip -4' 명령어 사용 - JSON 파싱 불필요, 직접 IPv4 주소 반환 테스트: - tailscale ip -4 명령어로 즉시 IP 확인 가능 - 100.64.0.14 형식의 IP 정상 출력 🤖 Generated with Claude Code Co-Authored-By: Claude --- headscale-auto-register.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headscale-auto-register.sh b/headscale-auto-register.sh index b20ce37..7f5070a 100755 --- a/headscale-auto-register.sh +++ b/headscale-auto-register.sh @@ -520,9 +520,9 @@ collect_pharmacy_info() { get_assigned_vpn_ip() { echo -e "${BLUE}VPN IP 확인 중...${NC}" - # tailscale status로 IP 추출 (최대 10초 대기) + # tailscale ip -4로 IP 추출 (최대 10초 대기) for i in {1..10}; do - VPN_IP=$(tailscale status --json 2>/dev/null | grep -oP '"TailscaleIPs":\["\K[^"]+' | head -1) + VPN_IP=$(tailscale ip -4 2>/dev/null) if [ -n "$VPN_IP" ]; then echo -e "${GREEN}✓ VPN IP: $VPN_IP${NC}"