Socket Enhancer

For end-user documentation on Socket Enhancer, see Help:Socket Enhancer.
Socket Enhancer preloaded in Firefox. With this library loaded, it is possible to connect to link-local addresses without a scope ID. The blacked out part on the top is just a bunch of hex digits (there is no %scope_id part).

Socket Enhancer is an LD_PRELOAD library that intercepts the bind and connect system calls. This library can be used for various purposes, including connecting to IPv6 link-local addresses without client support, setting the source IP for individual applications, and enabling IP_FREEBIND (for use with the AnyIP trick, as described in Snippets:Nginx geo local server address).

To do list

  • Transparent proxying
  • NAT64 CLAT
  • Connections to Unix domain sockets
  • Improvements to the "universal link-local address mode" (e.g. changing the fixed prefix, selecting the device via other means e.g. using a dictionary or static map)
  • Randomizing source IP for "ip route add local" of a /64 (or other prefix length)
  • BSD-style format (fe80:x::y:y:y:y) for universal link-local mode