MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / myIPAddress

Function myIPAddress

jsext/addrutil.go:73–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71}
72
73func 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
83func AddMyIPAddress(vm *goja.Runtime) error {
84 return vm.GlobalObject().Set("myIpAddress", func(call goja.FunctionCall) goja.Value {

Callers 1

AddMyIPAddressFunction · 0.85

Calls 1

probeRouteFunction · 0.85

Tested by

no test coverage detected