add tun/tap

This commit is contained in:
ginuerzh
2021-12-20 22:00:08 +08:00
parent a853d99d92
commit e21c35a47f
73 changed files with 1867 additions and 614 deletions

View File

@ -0,0 +1,19 @@
package tun
import "net"
// Route is an IP routing entry
type Route struct {
Net net.IPNet
Gateway net.IP
}
type Config struct {
Name string
Net string
// peer addr of point-to-point on MacOS
Peer string
MTU int
Gateway string
Routes []Route
}