Skip to content

Commit 87e2cf8

Browse files
Use local websocket without config or otel
1 parent 2489283 commit 87e2cf8

File tree

4 files changed

+645
-8
lines changed

4 files changed

+645
-8
lines changed

common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"time"
1515

1616
"github.com/fosrl/newt/logger"
17-
"github.com/fosrl/newt/websocket"
1817
"github.com/fosrl/olm/peermonitor"
18+
"github.com/fosrl/olm/websocket"
1919
"github.com/vishvananda/netlink"
2020
"golang.org/x/crypto/chacha20poly1305"
2121
"golang.org/x/crypto/curve25519"

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515

1616
"github.com/fosrl/newt/logger"
1717
"github.com/fosrl/newt/updates"
18-
"github.com/fosrl/newt/websocket"
1918
"github.com/fosrl/olm/httpserver"
2019
"github.com/fosrl/olm/peermonitor"
20+
"github.com/fosrl/olm/websocket"
2121

2222
"golang.zx2c4.com/wireguard/device"
2323
"golang.zx2c4.com/wireguard/tun"

peermonitor/peermonitor.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"time"
99

1010
"github.com/fosrl/newt/logger"
11-
"github.com/fosrl/newt/websocket"
11+
"github.com/fosrl/olm/websocket"
1212
"github.com/fosrl/olm/wgtester"
1313
"golang.zx2c4.com/wireguard/device"
1414
)
@@ -205,11 +205,11 @@ func (pm *PeerMonitor) HandleFailover(siteID int, relayEndpoint string) {
205205
return
206206
}
207207

208-
// Check for IPv6 and format the endpoint correctly
209-
formattedEndpoint := relayEndpoint
210-
if strings.Contains(relayEndpoint, ":") {
211-
formattedEndpoint = fmt.Sprintf("[%s]", relayEndpoint)
212-
}
208+
// Check for IPv6 and format the endpoint correctly
209+
formattedEndpoint := relayEndpoint
210+
if strings.Contains(relayEndpoint, ":") {
211+
formattedEndpoint = fmt.Sprintf("[%s]", relayEndpoint)
212+
}
213213

214214
// Configure WireGuard to use the relay
215215
wgConfig := fmt.Sprintf(`private_key=%s

0 commit comments

Comments
 (0)