You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifce, err := water.New(water.Config{
DeviceType: water.TUN,
})
if err != nil {
log.Fatal(err)
}
for {
frame := make([]byte, 65535)
n, err := ifce.Read(frame)
if err != nil {
log.Fatal(err)
}
frame = frame[:n]
log.Printf("%s Received packet, length: %d", ifce.Name(), n)
ipHeader, err := ipv4.ParseHeader(frame)
if err != nil {
log.Printf("Error parsing IP header: %v", err)
} else {
log.Printf("Received packet from %s to %s", ipHeader.Src, ipHeader.Dst)
}
}
}
I used the OpenVPN TAP driver 9.27, installed by "devcon install OemVista.inf tap0901". The adapter seems working fine.
I have set the IP, default gateway etc for the adapter. But no matter what I do, the go program only sees packets with Src 0.0.0.0. I have compiled it and run it as admin, still the same...
Then I tried to turn off network isolation according to GPT by "netsh interface set interface <interface_name> admin=enabled". Still no help....
Tried TAP too, seems still can not say any non-broadcast packets...
The text was updated successfully, but these errors were encountered:
Really need someone to help me figure this out, here is a test code:
package main
import (
"log"
)
func main() {
}
I used the OpenVPN TAP driver 9.27, installed by "devcon install OemVista.inf tap0901". The adapter seems working fine.
I have set the IP, default gateway etc for the adapter. But no matter what I do, the go program only sees packets with Src 0.0.0.0. I have compiled it and run it as admin, still the same...
Then I tried to turn off network isolation according to GPT by "netsh interface set interface <interface_name> admin=enabled". Still no help....
Tried TAP too, seems still can not say any non-broadcast packets...
The text was updated successfully, but these errors were encountered: