mirror of
https://github.com/fosrl/olm.git
synced 2026-02-08 05:56:41 +00:00
7
go.mod
7
go.mod
@@ -3,20 +3,21 @@ module github.com/fosrl/olm
|
|||||||
go 1.25
|
go 1.25
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/Microsoft/go-winio v0.6.2
|
||||||
github.com/fosrl/newt v0.0.0-20250929233849-71c5bf7e65f7
|
github.com/fosrl/newt v0.0.0-20250929233849-71c5bf7e65f7
|
||||||
|
github.com/gorilla/websocket v1.5.3
|
||||||
github.com/vishvananda/netlink v1.3.1
|
github.com/vishvananda/netlink v1.3.1
|
||||||
golang.org/x/crypto v0.43.0
|
golang.org/x/crypto v0.43.0
|
||||||
golang.org/x/exp v0.0.0-20250718183923-645b1fa84792
|
golang.org/x/exp v0.0.0-20250718183923-645b1fa84792
|
||||||
|
golang.org/x/net v0.45.0
|
||||||
golang.org/x/sys v0.37.0
|
golang.org/x/sys v0.37.0
|
||||||
golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb
|
golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb
|
||||||
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20241231184526-a9ab2273dd10
|
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20241231184526-a9ab2273dd10
|
||||||
|
software.sslmate.com/src/go-pkcs12 v0.6.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gorilla/websocket v1.5.3 // indirect
|
|
||||||
github.com/vishvananda/netns v0.0.5 // indirect
|
github.com/vishvananda/netns v0.0.5 // indirect
|
||||||
golang.org/x/net v0.45.0 // indirect
|
|
||||||
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
|
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
|
||||||
gvisor.dev/gvisor v0.0.0-20250718192347-d7830d968c56 // indirect
|
gvisor.dev/gvisor v0.0.0-20250718192347-d7830d968c56 // indirect
|
||||||
software.sslmate.com/src/go-pkcs12 v0.6.0 // indirect
|
|
||||||
)
|
)
|
||||||
|
|||||||
2
go.sum
2
go.sum
@@ -1,3 +1,5 @@
|
|||||||
|
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
||||||
|
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||||
github.com/fosrl/newt v0.0.0-20250929233849-71c5bf7e65f7 h1:6bSU8Efyhx1SR53iSw1Wjk5V8vDfizGAudq/GlE9b+o=
|
github.com/fosrl/newt v0.0.0-20250929233849-71c5bf7e65f7 h1:6bSU8Efyhx1SR53iSw1Wjk5V8vDfizGAudq/GlE9b+o=
|
||||||
github.com/fosrl/newt v0.0.0-20250929233849-71c5bf7e65f7/go.mod h1:Ac0k2FmAMC+hu21rAK+p7EnnEGrqKO/QZuGTVHA/XDM=
|
github.com/fosrl/newt v0.0.0-20250929233849-71c5bf7e65f7/go.mod h1:Ac0k2FmAMC+hu21rAK+p7EnnEGrqKO/QZuGTVHA/XDM=
|
||||||
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
|
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
|
||||||
|
|||||||
13
main.go
13
main.go
@@ -153,6 +153,15 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create a context that will be cancelled on interrupt signals
|
||||||
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
|
defer stop()
|
||||||
|
|
||||||
|
// Run in console mode
|
||||||
|
runOlmMainWithArgs(ctx, os.Args[1:])
|
||||||
|
}
|
||||||
|
|
||||||
|
func runOlmMainWithArgs(ctx context.Context, args []string) {
|
||||||
// Setup Windows event logging if on Windows
|
// Setup Windows event logging if on Windows
|
||||||
if runtime.GOOS != "windows" {
|
if runtime.GOOS != "windows" {
|
||||||
setupWindowsEventLog()
|
setupWindowsEventLog()
|
||||||
@@ -212,9 +221,5 @@ func main() {
|
|||||||
// DoNotCreateNewClient: config.DoNotCreateNewClient,
|
// DoNotCreateNewClient: config.DoNotCreateNewClient,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a context that will be cancelled on interrupt signals
|
|
||||||
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
|
||||||
defer stop()
|
|
||||||
|
|
||||||
olm.Run(ctx, olmConfig)
|
olm.Run(ctx, olmConfig)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user