mirror of
https://github.com/fosrl/olm.git
synced 2026-02-08 14:06:41 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7fc09f8ed1 | ||
|
|
079843602c | ||
|
|
70bf22c354 |
7
go.mod
7
go.mod
@@ -3,20 +3,21 @@ module github.com/fosrl/olm
|
||||
go 1.25
|
||||
|
||||
require (
|
||||
github.com/Microsoft/go-winio v0.6.2
|
||||
github.com/fosrl/newt v0.0.0-20250929233849-71c5bf7e65f7
|
||||
github.com/gorilla/websocket v1.5.3
|
||||
github.com/vishvananda/netlink v1.3.1
|
||||
golang.org/x/crypto v0.43.0
|
||||
golang.org/x/exp v0.0.0-20250718183923-645b1fa84792
|
||||
golang.org/x/net v0.45.0
|
||||
golang.org/x/sys v0.37.0
|
||||
golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb
|
||||
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20241231184526-a9ab2273dd10
|
||||
software.sslmate.com/src/go-pkcs12 v0.6.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/gorilla/websocket v1.5.3 // 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
|
||||
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/go.mod h1:Ac0k2FmAMC+hu21rAK+p7EnnEGrqKO/QZuGTVHA/XDM=
|
||||
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
|
||||
if runtime.GOOS != "windows" {
|
||||
setupWindowsEventLog()
|
||||
@@ -212,9 +221,5 @@ func main() {
|
||||
// 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)
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
573df1772c00fcb34ec68e575e973c460dc27ba8
|
||||
@@ -1 +0,0 @@
|
||||
ba2c118fd96937229ef54dcd0b82fe5d53d94a87
|
||||
@@ -52,9 +52,9 @@ type Config struct {
|
||||
// Source tracking (not in JSON)
|
||||
sources map[string]string
|
||||
|
||||
Version string
|
||||
OrgID string
|
||||
DoNotCreateNewClient bool
|
||||
Version string
|
||||
OrgID string
|
||||
// DoNotCreateNewClient bool
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -343,8 +343,6 @@ func TunnelProcess(ctx context.Context, config Config, id string, secret string,
|
||||
stopRegister = nil
|
||||
}
|
||||
|
||||
// close(stopHolepunch)
|
||||
|
||||
// wait 10 milliseconds to ensure the previous connection is closed
|
||||
logger.Debug("Waiting 500 milliseconds to ensure previous connection is closed")
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
|
||||
Reference in New Issue
Block a user