Skip to content

Instantly share code, notes, and snippets.

View mio-19's full-sized avatar
😿
ill.

mio-19

😿
ill.
  • Aotearoa New Zealand and Australia
  • 06:44 (UTC +13:00)
View GitHub Profile
@mio-19
mio-19 / force-inet4-or-inet6.c
Created May 7, 2024 07:20 — forked from winny-/force-inet4-or-inet6.c
Force IPv4 or IPv6 in applications such as Lynx
/*
force-inet4-or-inet6.c - hack to force applications to use IPv4 or IPv6 exclusively
compilation: cc -fPIC -shared -DUSE_INET4 -o force-inet4.so force-inet4-or-inet6.c
cc -fPIC -shared -DUSE_INET6 -o force-inet6.so force-inet4-or-inet6.c
usage: LD_PRELOAD=/path/to/library.so program args ...
This file is in the public domain.
*/