jedisct1 / dsvpn

A Dead Simple VPN.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Responding to pings other messages

amlwwalker opened this issue · comments

Hi,
This is really cool - i've been trying to learn about VPNs and tunnels/network level Go coding. One very simple thing I can't seem to find out how to do is to intercept ping messages.
Would you be able to help me with a simple example whereby the tunnel intercepts the ping, adds delay before responding to it? I want to artificially control the latency when a device is pinged. I realise this is specifically code for a VPN but my understanding is VPNs use the same virtual network interface (tunnel), so when a device pings a device, by rights I should be able to wait a second before responding, but I cannot for the life of me find a good reference point to start and due to your work here, I thought you might be able to potentially help me?
Thanks