Commit 62da801
committed
hack/test-port-forwarding.pl: add reporting "failed to listen tcp"
Add reporting for the "failed to listen tcp" error.
Additionally, it should print information about the processes listening on the failed ports.
e.g.
```console
$ socat TCP-LISTEN:2020,bind=127.0.0.1,fork /dev/null&
$ socat TCP-LISTEN:4040,bind=127.0.0.1,fork /dev/null&
$ hack/test-port-forwarding.pl default
✅ Not forwarding TCP 127.0.0.2:3000
✅ Forwarding TCP from 127.0.0.3:3001 to 127.0.0.1:2001
✅ Forwarding TCP from 0.0.0.0:3002 to 127.0.0.1:2002
✅ Not forwarding TCP 0.0.0.0:3010
✅ Not forwarding TCP 127.0.0.1:3011
❌ Forwarding TCP from 127.0.0.2:3020 to 127.0.0.1:2020
Guest received: ''
✅ Forwarding TCP from 127.0.0.1:3021 to 127.0.0.1:2021
✅ Forwarding TCP from 0.0.0.0:3022 to 127.0.0.1:2022
✅ Forwarding TCP from [::]:3023 to 127.0.0.1:2023
✅ Forwarding TCP from [::1]:3024 to 127.0.0.1:2024
✅ Forwarding TCP from 127.0.0.1:3030 to 192.168.12.19:2030
✅ Forwarding TCP from 0.0.0.0:3031 to 192.168.12.19:2031
✅ Forwarding TCP from [::]:3032 to 192.168.12.19:2032
✅ Forwarding TCP from [::1]:3033 to 192.168.12.19:2033
✅ Forwarding TCP from 127.0.0.1:300 to 127.0.0.1:300
✅ Forwarding TCP from 127.0.0.1:310 to 0.0.0.0:310
✅ Forwarding TCP from 192.168.5.15:4000 to 192.168.12.19:4000
✅ Forwarding TCP from [::1]:4010 to [::]:4010
✅ Forwarding TCP from 127.0.0.1:4020 to 192.168.12.19:4020
✅ Forwarding TCP from 127.0.0.2:4021 to 192.168.12.19:4021
✅ Forwarding TCP from 192.168.5.15:4022 to 192.168.12.19:4022
✅ Forwarding TCP from 0.0.0.0:4023 to 192.168.12.19:4023
✅ Forwarding TCP from [::]:4024 to 192.168.12.19:4024
✅ Forwarding TCP from [::1]:4025 to 192.168.12.19:4025
✅ Forwarding TCP from 127.0.0.1:4030 to 192.168.12.19:4030
✅ Forwarding TCP from 127.0.0.2:4031 to 192.168.12.19:4031
✅ Forwarding TCP from 192.168.5.15:4032 to 192.168.12.19:4032
✅ Forwarding TCP from 0.0.0.0:4033 to 192.168.12.19:4033
✅ Forwarding TCP from [::]:4034 to 192.168.12.19:4034
✅ Forwarding TCP from [::1]:4035 to 192.168.12.19:4035
❌ Forwarding TCP from 0.0.0.0:4040 to 127.0.0.1:4040
Guest received: ''
✅ Forwarding TCP from [::]:4041 to 127.0.0.1:4041
✅ Not forwarding TCP 127.0.0.1:4043
✅ Not forwarding TCP 192.168.5.15:4044
✅ Forwarding TCP from 127.0.0.1:5000 to /Users/norio/.lima/default/sock/port5000.sock
1 parent 8944d8b commit 62da801
1 file changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| 194 | + | |
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
| |||
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
223 | 243 | | |
224 | 244 | | |
225 | 245 | | |
| |||
0 commit comments