mirror of
https://github.com/fosrl/olm.git
synced 2026-03-04 01:36:47 +00:00
13
olm/olm.go
13
olm/olm.go
@@ -10,7 +10,6 @@ import (
|
|||||||
"github.com/fosrl/newt/bind"
|
"github.com/fosrl/newt/bind"
|
||||||
"github.com/fosrl/newt/holepunch"
|
"github.com/fosrl/newt/holepunch"
|
||||||
"github.com/fosrl/newt/logger"
|
"github.com/fosrl/newt/logger"
|
||||||
"github.com/fosrl/newt/updates"
|
|
||||||
"github.com/fosrl/newt/util"
|
"github.com/fosrl/newt/util"
|
||||||
"github.com/fosrl/olm/api"
|
"github.com/fosrl/olm/api"
|
||||||
"github.com/fosrl/olm/network"
|
"github.com/fosrl/olm/network"
|
||||||
@@ -87,10 +86,6 @@ func Run(ctx context.Context, config Config) {
|
|||||||
logger.GetLogger().SetLevel(util.ParseLogLevel(config.LogLevel))
|
logger.GetLogger().SetLevel(util.ParseLogLevel(config.LogLevel))
|
||||||
network.SetMTU(config.MTU)
|
network.SetMTU(config.MTU)
|
||||||
|
|
||||||
if err := updates.CheckForUpdate("fosrl", "olm", config.Version); err != nil {
|
|
||||||
logger.Debug("Failed to check for updates: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if config.Holepunch {
|
if config.Holepunch {
|
||||||
logger.Warn("Hole punching is enabled. This is EXPERIMENTAL and may not work in all environments.")
|
logger.Warn("Hole punching is enabled. This is EXPERIMENTAL and may not work in all environments.")
|
||||||
}
|
}
|
||||||
@@ -478,10 +473,10 @@ func TunnelProcess(ctx context.Context, config Config, id string, secret string,
|
|||||||
logger.Error("Failed to configure peer: %v", err)
|
logger.Error("Failed to configure peer: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// if err := addRouteForServerIP(site.ServerIP, interfaceName); err != nil {
|
if err := addRouteForServerIP(site.ServerIP, interfaceName); err != nil {
|
||||||
// logger.Error("Failed to add route for peer: %v", err)
|
logger.Error("Failed to add route for peer: %v", err)
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
if err := addRoutesForRemoteSubnets(site.RemoteSubnets, interfaceName); err != nil {
|
if err := addRoutesForRemoteSubnets(site.RemoteSubnets, interfaceName); err != nil {
|
||||||
logger.Error("Failed to add routes for remote subnets: %v", err)
|
logger.Error("Failed to add routes for remote subnets: %v", err)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user