- Make Sparoid::Instance public-IP resolution thread-safe and empty-aware; raise Sparoid::PublicIPError when no public IP resolves (#25)
- Raise when sendmsg fails for every resolved address (#23)
- Skip addresses that fail synchronous connect in fdpass (#20)
- Remove the usage of Timeout (#19)
- Aligning CLI with Crystal client interface (
send/connectsubcommands with flags) - Detect public IPv6 via UDP socket probe instead of interface enumeration
- Remove v2 message format, only send v1 (with IPv4 or IPv6 address)
- Add IPv6 support
- Add Timeout.timeout safety net around Socket.tcp for Ruby 3.3+ Happy Eyeballs v2 compatibility
- Lookup public IP using http://checkip.amazonaws.com, as it's more reliable for IPv6 connections than the DNS method
- Allow override of public ip, open for someone else by passing
:open_for_iptoSparoid.auth(..., open_for_ip:)(#11)
- Fix
Addrinfo SocketErrorshould raiseSparoid::ResolvError(#10)
- Fix where Sparoid::Instance returned nil for public_ip
- Ignore EISCONN errors (already connected) error as BSD raises on second connect_nonblock
- Don't read from public ip disk cache in Sparoid::Instance
- Fix nil error on timeout
- Only resolv the IP(s) once
- TCP connect to IPs in parallel
- Fix bug where 3 UDP packets was sent to each IP
- Raise more specific error when failing to resolv hostname
- Resolv host IPs before generating message (in case resolving takes a lot of time)
- Raise an exception, don't abort, when resolving hostname fails
- Send UDP packets to all resolved IPs for a hostname
- Do not warn on empty public ip cache file
- The public ip cache file path can be controlled using the
SPAROID_CACHE_PATHenvironment variable
- Use file locking to prevent multiple processes/threads to write to the public ip cache file
- Log hostname when reporting unhandled exceptions
- Cache public IP in
/tmp/.sparoid_public_ipfor 1 min
- Exit gracefully on abort (ctrl-c) instead of dumping huge stacktrace
- Sleep 20ms aftering sending UDP package to allow for remote host to open its firewall
- Get ENV variables if config file is missing
- Get key and hmac key from ENV variables
- Use static IP for opendns resolver, saves one DNS lookup
- Prefix all logging with
Sparoid:
- Only warn if config is missing when connecting with CLI
- Nicer error handling in CLI, remove --fdpass option
sparoid sendrenamed tosparoid authsparoid connect [host] [port]added for automatic fd passing
- --fdpass option to send
- Initial release