Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

LD_PRELOAD with a Lua scripting layer between the socket functions and apps

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README
General Network Connections Contortion Interface

This is a small layer inbetween the socket library and the program
that allows to intercept all the socket-related calls and 
rewrite your own processing in Lua.

The idea came during the happy eyeballs discussion, hence the name.

requres the ydns lua binding (https://github.com/ayourtch/ydns) 
if you want to decode the DNS data

Usage:

LD_PRELOAD=./gncci.so firefox

And it will execute the callbacks that are defined within gncci.lua file.

The one that you see in the tree is "pass-through" but you can define
your own interesting and complicated behaviors if you wish. 

Beware: the Lua environment is thread-local, so you might need to 
have some sort of shared memory library used.

NB: seems the addition of constructor call made the behavior a bit flaky,
I am not yet sure whether it is the race or something more fundamental.
Something went wrong with that request. Please try again.