mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-07 08:07:42 +00:00
wgengine: unexport some windows funcs
This commit is contained in:
parent
b446de103a
commit
50aeb5b9ad
@ -72,7 +72,7 @@ func bindSocketRoute(family winipcfg.AddressFamily, device *device.Device, ourLu
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func MonitorDefaultRoutes(device *device.Device, autoMTU bool, tun *tun.NativeTun) (*winipcfg.RouteChangeCallback, error) {
|
func monitorDefaultRoutes(device *device.Device, autoMTU bool, tun *tun.NativeTun) (*winipcfg.RouteChangeCallback, error) {
|
||||||
guid := tun.GUID()
|
guid := tun.GUID()
|
||||||
ourLuid, err := winipcfg.InterfaceGuidToLuid(&guid)
|
ourLuid, err := winipcfg.InterfaceGuidToLuid(&guid)
|
||||||
lastLuid4 := uint64(0)
|
lastLuid4 := uint64(0)
|
||||||
@ -237,7 +237,7 @@ func setFirewall(ifcGUID *windows.GUID) (bool, error) {
|
|||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ConfigureInterface(m *wgcfg.Config, tun *tun.NativeTun, dns []wgcfg.IP, dnsDomains []string) error {
|
func configureInterface(m *wgcfg.Config, tun *tun.NativeTun, dns []wgcfg.IP, dnsDomains []string) error {
|
||||||
const mtu = 0
|
const mtu = 0
|
||||||
guid := tun.GUID()
|
guid := tun.GUID()
|
||||||
log.Printf("wintun GUID is %v\n", guid)
|
log.Printf("wintun GUID is %v\n", guid)
|
||||||
|
@ -40,7 +40,7 @@ func (r *winRouter) Up() error {
|
|||||||
// MonitorDefaultRoutes handles making sure our wireguard UDP
|
// MonitorDefaultRoutes handles making sure our wireguard UDP
|
||||||
// traffic goes through the old route, not recursively through the VPN.
|
// traffic goes through the old route, not recursively through the VPN.
|
||||||
var err error
|
var err error
|
||||||
r.routeChangeCallback, err = MonitorDefaultRoutes(r.wgdev, true, r.nativeTun)
|
r.routeChangeCallback, err = monitorDefaultRoutes(r.wgdev, true, r.nativeTun)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("MonitorDefaultRoutes: %v\n", err)
|
log.Fatalf("MonitorDefaultRoutes: %v\n", err)
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ func (r *winRouter) Up() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *winRouter) SetRoutes(rs RouteSettings) error {
|
func (r *winRouter) SetRoutes(rs RouteSettings) error {
|
||||||
err := ConfigureInterface(rs.Cfg, r.nativeTun, rs.DNS, rs.DNSDomains)
|
err := configureInterface(rs.Cfg, r.nativeTun, rs.DNS, rs.DNSDomains)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.logf("ConfigureInterface: %v\n", err)
|
r.logf("ConfigureInterface: %v\n", err)
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user