Skip to content

SRV record support for legacy systems via LD_PRELOAD getaddrinfo/connect hooks

License

Notifications You must be signed in to change notification settings

disasters/srv-shim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

srv-shim

SRV record support for legacy systems. Built on top of plumber, part of the discotech suite.

It works by intercepting calls to getaddrinfo, which would normally fail due to reliance on A/AAAA records, and using SRV instead for names prefixed with an underscore.

Compile-Time Prerequisites

  1. Rust (stable recommended but not required)

Building

cargo build

Now, target/debug/libsrvshim.so should exist.

Usage

Linux/FreeBSD:

LD_PRELOAD=target/debug/libsrvshim.so \
curl _my-service._tcp.domain

You may also create an entry in /etc/ld.so.conf to cause it to be loaded in all processes on the system.

OSX:

DYLD_INSERT_LIBRARIES=/abs/path/to/libsrvshim.so \
DYLD_FORCE_FLAT_NAMESPACE=YES \
curl _my-service._tcp.domain

About

SRV record support for legacy systems via LD_PRELOAD getaddrinfo/connect hooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages