()
| 71 | } |
| 72 | |
| 73 | func myIPAddress() netip.Addr { |
| 74 | for _, a := range probingAddresses { |
| 75 | myIP := probeRoute(a) |
| 76 | if myIP.IsValid() { |
| 77 | return myIP |
| 78 | } |
| 79 | } |
| 80 | return fallbackOwnAddress |
| 81 | } |
| 82 | |
| 83 | func AddMyIPAddress(vm *goja.Runtime) error { |
| 84 | return vm.GlobalObject().Set("myIpAddress", func(call goja.FunctionCall) goja.Value { |
no test coverage detected