Skip to content

intercept ping traffic #96

@amlwwalker

Description

@amlwwalker

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions