Skip to content

v0.2.1

Compare
Choose a tag to compare
@dumbmoron dumbmoron released this 12 May 13:07
· 3 commits to main since this release
6817696

fixes build action

changes from v0.2.0:

new methods

  • freebind.dispatcherFromIP(ip, options) - where ip is a valid IPv4 or IPv6 address

    • uses freebind.createConnectorFromIP(ip, tlsOpts, sockOpts) under the hood, which is also exported
    • creates a dispatcher that uses this particular IP address, even if it's not assigned to any interface
  • freebind.randomStickyDispatcher()

    • uses freebind.createRandomStickyConnector(ip, tlsOpts, sockOpts) under the hood, which is also exported
    • like randomDispatcher, except the IP "sticks" and is determined when the dispatcher is constructed
  • freebind.ip.random(prefix) - e.g. freebind.ip('fd00::/48')

    • returns a random IP (string) from this range
  • freebind.tcp.createSocketFromHostname(hostname, port, sourceIP, options)

    • like createRandomSocket, except it takes an IP address instead of a CIDR block, and uses a random IP from it