add router component

This commit is contained in:
ginuerzh
2023-11-19 14:23:21 +08:00
parent 88cc6ff4d5
commit 74639e9c4e
25 changed files with 788 additions and 123 deletions

View File

@ -1,12 +1,10 @@
package tun
import "net"
import (
"net"
// Route is an IP routing entry
type Route struct {
Net net.IPNet
Gateway net.IP
}
"github.com/go-gost/core/router"
)
type Config struct {
Name string
@ -15,5 +13,5 @@ type Config struct {
Peer string
MTU int
Gateway net.IP
Routes []Route
Router router.Router
}