mirror of
https://github.com/fosrl/olm.git
synced 2026-02-27 23:36:46 +00:00
@@ -12,6 +12,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/fosrl/newt/bind"
|
"github.com/fosrl/newt/bind"
|
||||||
|
"github.com/fosrl/newt/clients/permissions"
|
||||||
"github.com/fosrl/newt/holepunch"
|
"github.com/fosrl/newt/holepunch"
|
||||||
"github.com/fosrl/newt/logger"
|
"github.com/fosrl/newt/logger"
|
||||||
"github.com/fosrl/newt/network"
|
"github.com/fosrl/newt/network"
|
||||||
@@ -99,6 +100,13 @@ func Init(ctx context.Context, config GlobalConfig) {
|
|||||||
|
|
||||||
logger.GetLogger().SetLevel(util.ParseLogLevel(config.LogLevel))
|
logger.GetLogger().SetLevel(util.ParseLogLevel(config.LogLevel))
|
||||||
|
|
||||||
|
logger.Debug("Checking permissions for native interface")
|
||||||
|
err := permissions.CheckNativeInterfacePermissions()
|
||||||
|
if err != nil {
|
||||||
|
logger.Fatal("Insufficient permissions to create native TUN interface: %v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if config.HTTPAddr != "" {
|
if config.HTTPAddr != "" {
|
||||||
apiServer = api.NewAPI(config.HTTPAddr)
|
apiServer = api.NewAPI(config.HTTPAddr)
|
||||||
} else if config.SocketPath != "" {
|
} else if config.SocketPath != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user