Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/disasters/srv-shim
SRV record support for legacy systems via LD_PRELOAD getaddrinfo/connect hooks
https://github.com/disasters/srv-shim
Last synced: 3 months ago
JSON representation
SRV record support for legacy systems via LD_PRELOAD getaddrinfo/connect hooks
- Host: GitHub
- URL: https://github.com/disasters/srv-shim
- Owner: disasters
- License: apache-2.0
- Created: 2015-08-17T05:14:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-20T17:49:27.000Z (over 9 years ago)
- Last Synced: 2024-11-17T04:52:59.294Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 137 KB
- Stars: 13
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ld-preload - srv-shim - drop-in DNS SRV record support for applications relying on getaddrinfo/connect/sendto (Libraries)
README
# srv-shim
SRV record support for legacy systems. Built on top of [plumber](https://github.com/the-tetanus-clinic/plumber), part of the [discotech](https://github.com/the-tetanus-clinic/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](https://www.rust-lang.org/install.html) (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
```