Commit 2ea44a3
committed
forge: HTTP_ADDR=127.0.0.1 so WSL2 forwards to Windows localhost
gitea/forgejo's net.Listen("tcp", "0.0.0.0:3000") path internally
upgrades to AF_INET6 dual-stack (`*:3000` in ss output), and WSL2's
NAT-mode localhostForwarding does not forward dual-stack binds.
Switching to HTTP_ADDR=127.0.0.1 forces gitea to call net.Listen
with an IPv4 literal, producing an AF_INET socket that WSL2 forwards
to Windows-side 127.0.0.1:3000. Verified live 2026-05-11 -- Windows
TcpClient.ConnectAsync 127.0.0.1:3000 returns OK after the env flip.
Trade-off: LAN-side reach from a phone or second laptop loses
gitea (the listener is now loopback-only inside the VM). The
follow-up will add a socat 0.0.0.0:3000 -> 127.0.0.1:3000 bridge
service so LAN access comes back without re-introducing the dual-
stack listener that broke Windows-side.1 parent a19f9f4 commit 2ea44a3
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
71 | 85 | | |
72 | 86 | | |
73 | 87 | | |
| |||
0 commit comments