Skip to content

Commit

Permalink
feat: install tun driver on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
wencaiwulue committed Feb 17, 2024
1 parent be01f02 commit bd54c2b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/cmds/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/wencaiwulue/kubevpn/v2/pkg/driver"
"github.com/wencaiwulue/kubevpn/v2/pkg/util"

"github.com/wencaiwulue/tlstunnel/pkg/client"
Expand All @@ -23,6 +24,11 @@ func CmdClient() *cobra.Command {
Use: "client",
Short: "client to connect server",
Long: `client to connect server`,
PreRun: func(cmd *cobra.Command, args []string) {
if util.IsWindows() {
driver.InstallWireGuardTunDriver()
}
},
RunE: func(cmd *cobra.Command, args []string) error {
switch mode {
case config.ProxyTypeGlobe:
Expand All @@ -44,6 +50,7 @@ func CmdClient() *cobra.Command {
<-signals
cancelFunc()
}()
defer driver.UninstallWireGuardTunDriver()
return client.Connect(ctx, extraCIDR, sshConf)
},
SilenceUsage: true,
Expand Down

0 comments on commit bd54c2b

Please sign in to comment.