Initial intranet dashboard app
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
WSL_IP="$(hostname -I | awk '{print $1}')"
|
||||
WSL_HOST_IP="$(awk '/nameserver/ {print $2; exit}' /etc/resolv.conf)"
|
||||
WINDOWS_IPS="$(
|
||||
powershell.exe -NoProfile -Command "(Get-NetIPAddress -AddressFamily IPv4 | Where-Object { \$_.IPAddress -notlike '127.*' -and \$_.IPAddress -notlike '169.254*' } | Select-Object -ExpandProperty IPAddress) -join ','" \
|
||||
2>/dev/null | tr -d '\r'
|
||||
)"
|
||||
|
||||
cat <<EOF
|
||||
WSL 앱 정보
|
||||
- WSL 내부 IP: ${WSL_IP}
|
||||
- Windows 호스트와 연결된 주소 추정값: ${WSL_HOST_IP}
|
||||
- Windows IPv4 후보: ${WINDOWS_IPS:-확인 실패}
|
||||
- 앱 포트: 8010
|
||||
|
||||
중요
|
||||
- WSL2에서는 다른 PC가 WSL 내부 IP(${WSL_IP})로 직접 접속하지 못하는 경우가 많습니다.
|
||||
- 내부망 다른 PC에서는 보통 Windows 호스트 IP:8010 으로 접속해야 합니다.
|
||||
- 따라서 Windows 관리자 PowerShell에서 portproxy + 방화벽 규칙을 설정해야 합니다.
|
||||
|
||||
다음 단계
|
||||
1. WSL에서 서버 실행: ./scripts/run_server.sh
|
||||
2. Windows 관리자 PowerShell 또는 CMD에서 scripts/setup_windows_portproxy 실행
|
||||
3. 다른 PC 브라우저에서 http://Windows호스트IP:8010 접속
|
||||
EOF
|
||||
Reference in New Issue
Block a user