Skip to content

Make AttemptFetchingPublicIP fit to our use case/code base

Pea Nut requested to merge fix-library into main

Issue: bitmask-core#12 (closed)
We only use the library to to get our current IP. So just the function AttemptFetchingPublicIP.

The library needs some updates/fixes, like using zerlog like we do in bitmask-core/vpn. And there are some bugs to fix:

  • sometimes the code segfaults (to reproduce: go test -count=1 -v ./... -run TestGeolocatation)
  • some stun servers do not work/are outdated?
  • needs more testing with blocking UDP

In general: there are about 20 STUN servers we try. If they fail, we use public WebAPIs. All STUN servers (except one) are listening on Port 3478. All STUN servers use UDP. If the port or UDP is blocked, the timeout is huge..

Edited by Pea Nut

Merge request reports

Loading