-
Notifications
You must be signed in to change notification settings - Fork 312
Description
Hi,
I'm new to TUN/TAP but I have been programming in Go for a while.
I couldn't find great tutorials online for general TUN/TAP information and not many examples here, but what I am trying to do is intercept PING messages (in and out) and control the response of them (increase the latency artificially) as an academic exercise in learning about virtual network interfaces.
Would anyone be able to provide an example of receiving a ping message and responding to it with an artificial delay?
My goal is to understand using TUN/TAP at both the layer 3 (ICMP) interception and then at layer 7 HTTP (i.e making a GET request to http://example.com over the TUN/TAP)
I have looked around but I'm on a mac and the general internet information is very linux specific. Water seems like the way to go about this, but i struggled to find much in the way of examples. A very basic example doing the above would really give me a head start.
Thanks!