Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thypon/hostaliases

libc independent HOSTALIASES support
https://github.com/thypon/hostaliases

Last synced: 21 days ago
JSON representation

libc independent HOSTALIASES support

Awesome Lists containing this project

README

        

hostaliases.so
==============

`hostaliases.so` is a little dynamic library that enhance the posix functions used to get address from hostname.

It adds the possibility to define string aliases to network address.

Currently instruments:

- getaddrinfo
- gethostbyname
- gethostbyname2
- gethostbyname_r
- gethostbyname2_r

Usage
------------

```
export HOSTALIASES=~/.hosts
echo "g www.google.com" >> ~/.hosts
LD_PRELOAD=/usr/lib/hostaliases.so curl g # This would redirect you to www.google.com
```