mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-12 03:39:55 +00:00
Compare commits
2 Commits
ui-refacto
...
wasm-webso
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e230cf1d96 | ||
|
|
fbd74d3867 |
@@ -21,6 +21,7 @@ import (
|
|||||||
"github.com/netbirdio/netbird/client/wasm/internal/http"
|
"github.com/netbirdio/netbird/client/wasm/internal/http"
|
||||||
"github.com/netbirdio/netbird/client/wasm/internal/rdp"
|
"github.com/netbirdio/netbird/client/wasm/internal/rdp"
|
||||||
"github.com/netbirdio/netbird/client/wasm/internal/ssh"
|
"github.com/netbirdio/netbird/client/wasm/internal/ssh"
|
||||||
|
nbwebsocket "github.com/netbirdio/netbird/client/wasm/internal/websocket"
|
||||||
"github.com/netbirdio/netbird/util"
|
"github.com/netbirdio/netbird/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -30,6 +31,7 @@ const (
|
|||||||
pingTimeout = 10 * time.Second
|
pingTimeout = 10 * time.Second
|
||||||
defaultLogLevel = "warn"
|
defaultLogLevel = "warn"
|
||||||
defaultSSHDetectionTimeout = 20 * time.Second
|
defaultSSHDetectionTimeout = 20 * time.Second
|
||||||
|
dialWebSocketTimeout = 30 * time.Second
|
||||||
|
|
||||||
icmpEchoRequest = 8
|
icmpEchoRequest = 8
|
||||||
icmpCodeEcho = 0
|
icmpCodeEcho = 0
|
||||||
@@ -677,6 +679,7 @@ func createClientObject(client *netbird.Client) js.Value {
|
|||||||
obj["createSSHConnection"] = createSSHMethod(client)
|
obj["createSSHConnection"] = createSSHMethod(client)
|
||||||
obj["proxyRequest"] = createProxyRequestMethod(client)
|
obj["proxyRequest"] = createProxyRequestMethod(client)
|
||||||
obj["createRDPProxy"] = createRDPProxyMethod(client)
|
obj["createRDPProxy"] = createRDPProxyMethod(client)
|
||||||
|
obj["dialWebSocket"] = createDialWebSocketMethod(client)
|
||||||
obj["status"] = createStatusMethod(client)
|
obj["status"] = createStatusMethod(client)
|
||||||
obj["statusSummary"] = createStatusSummaryMethod(client)
|
obj["statusSummary"] = createStatusSummaryMethod(client)
|
||||||
obj["statusDetail"] = createStatusDetailMethod(client)
|
obj["statusDetail"] = createStatusDetailMethod(client)
|
||||||
@@ -691,6 +694,74 @@ func createClientObject(client *netbird.Client) js.Value {
|
|||||||
return js.ValueOf(obj)
|
return js.ValueOf(obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func createDialWebSocketMethod(client *netbird.Client) js.Func {
|
||||||
|
return js.FuncOf(func(_ js.Value, args []js.Value) any {
|
||||||
|
url, protocols, timeout, errVal := parseDialWebSocketArgs(args)
|
||||||
|
if !errVal.IsUndefined() {
|
||||||
|
return errVal
|
||||||
|
}
|
||||||
|
|
||||||
|
return createPromise(func(resolve, reject js.Value) {
|
||||||
|
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
|
conn, err := nbwebsocket.Dial(ctx, client, url, protocols)
|
||||||
|
if err != nil {
|
||||||
|
reject.Invoke(js.ValueOf(fmt.Sprintf("dial websocket: %v", err)))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
resolve.Invoke(nbwebsocket.NewJSInterface(conn))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func parseDialWebSocketArgs(args []js.Value) (url string, protocols []string, timeout time.Duration, errVal js.Value) {
|
||||||
|
if len(args) < 1 || args[0].Type() != js.TypeString {
|
||||||
|
return "", nil, 0, js.ValueOf("error: dialWebSocket requires a URL string argument")
|
||||||
|
}
|
||||||
|
url = args[0].String()
|
||||||
|
|
||||||
|
if len(args) >= 2 && !args[1].IsNull() && !args[1].IsUndefined() {
|
||||||
|
arr, err := jsStringArray(args[1])
|
||||||
|
if err != nil {
|
||||||
|
return "", nil, 0, js.ValueOf(fmt.Sprintf("error: protocols: %v", err))
|
||||||
|
}
|
||||||
|
protocols = arr
|
||||||
|
}
|
||||||
|
|
||||||
|
timeout = dialWebSocketTimeout
|
||||||
|
if len(args) >= 3 && !args[2].IsNull() && !args[2].IsUndefined() {
|
||||||
|
if args[2].Type() != js.TypeNumber {
|
||||||
|
return "", nil, 0, js.ValueOf("error: timeoutMs must be a number")
|
||||||
|
}
|
||||||
|
timeoutMs := args[2].Int()
|
||||||
|
if timeoutMs <= 0 {
|
||||||
|
return "", nil, 0, js.ValueOf("error: timeout must be positive")
|
||||||
|
}
|
||||||
|
timeout = time.Duration(timeoutMs) * time.Millisecond
|
||||||
|
}
|
||||||
|
|
||||||
|
return url, protocols, timeout, js.Undefined()
|
||||||
|
}
|
||||||
|
|
||||||
|
// jsStringArray converts a JS array of strings to a Go []string.
|
||||||
|
func jsStringArray(v js.Value) ([]string, error) {
|
||||||
|
if !v.InstanceOf(js.Global().Get("Array")) {
|
||||||
|
return nil, fmt.Errorf("expected array")
|
||||||
|
}
|
||||||
|
n := v.Length()
|
||||||
|
out := make([]string, n)
|
||||||
|
for i := 0; i < n; i++ {
|
||||||
|
el := v.Index(i)
|
||||||
|
if el.Type() != js.TypeString {
|
||||||
|
return nil, fmt.Errorf("element %d is not a string", i)
|
||||||
|
}
|
||||||
|
out[i] = el.String()
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// netBirdClientConstructor acts as a JavaScript constructor function
|
// netBirdClientConstructor acts as a JavaScript constructor function
|
||||||
func netBirdClientConstructor(_ js.Value, args []js.Value) any {
|
func netBirdClientConstructor(_ js.Value, args []js.Value) any {
|
||||||
return js.Global().Get("Promise").New(js.FuncOf(func(_ js.Value, promiseArgs []js.Value) any {
|
return js.Global().Get("Promise").New(js.FuncOf(func(_ js.Value, promiseArgs []js.Value) any {
|
||||||
|
|||||||
304
client/wasm/internal/websocket/websocket.go
Normal file
304
client/wasm/internal/websocket/websocket.go
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
//go:build js
|
||||||
|
|
||||||
|
package websocket
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/binary"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"net"
|
||||||
|
"sync"
|
||||||
|
"syscall/js"
|
||||||
|
|
||||||
|
"github.com/gobwas/ws"
|
||||||
|
"github.com/gobwas/ws/wsutil"
|
||||||
|
netbird "github.com/netbirdio/netbird/client/embed"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
type closeError struct {
|
||||||
|
code uint16
|
||||||
|
reason string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e *closeError) Error() string {
|
||||||
|
return fmt.Sprintf("websocket closed: %d %s", e.code, e.reason)
|
||||||
|
}
|
||||||
|
|
||||||
|
// bufferedConn fronts a net.Conn with a reader that serves any bytes buffered
|
||||||
|
// during the WebSocket handshake before falling through to the raw conn.
|
||||||
|
type bufferedConn struct {
|
||||||
|
net.Conn
|
||||||
|
r io.Reader
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bufferedConn) Read(p []byte) (int, error) { return c.r.Read(p) }
|
||||||
|
|
||||||
|
// Conn wraps a WebSocket connection over a NetBird TCP connection.
|
||||||
|
type Conn struct {
|
||||||
|
conn net.Conn
|
||||||
|
mu sync.Mutex
|
||||||
|
closed chan struct{}
|
||||||
|
closeOnce sync.Once
|
||||||
|
closeErr error
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dial establishes a WebSocket connection to the given URL through the NetBird network.
|
||||||
|
// Optional protocols are sent via the Sec-WebSocket-Protocol header.
|
||||||
|
func Dial(ctx context.Context, client *netbird.Client, rawURL string, protocols []string) (*Conn, error) {
|
||||||
|
d := ws.Dialer{
|
||||||
|
NetDial: client.Dial,
|
||||||
|
Protocols: protocols,
|
||||||
|
}
|
||||||
|
|
||||||
|
conn, br, _, err := d.Dial(ctx, rawURL)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("websocket dial: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// br is non-nil when the server pushed frames alongside the handshake
|
||||||
|
// response; those bytes live in the bufio.Reader and must be drained
|
||||||
|
// before reading from conn, otherwise we'd skip the first frames.
|
||||||
|
if br != nil {
|
||||||
|
if br.Buffered() > 0 {
|
||||||
|
conn = &bufferedConn{Conn: conn, r: io.MultiReader(br, conn)}
|
||||||
|
} else {
|
||||||
|
ws.PutReader(br)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return &Conn{
|
||||||
|
conn: conn,
|
||||||
|
closed: make(chan struct{}),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadMessage reads the next WebSocket message, handling control frames automatically.
|
||||||
|
func (c *Conn) ReadMessage() (ws.OpCode, []byte, error) {
|
||||||
|
for {
|
||||||
|
msgs, err := wsutil.ReadServerMessage(c.conn, nil)
|
||||||
|
if err != nil {
|
||||||
|
return 0, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, msg := range msgs {
|
||||||
|
if msg.OpCode.IsControl() {
|
||||||
|
if err := c.handleControl(msg); err != nil {
|
||||||
|
return 0, nil, err
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
return msg.OpCode, msg.Payload, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Conn) handleControl(msg wsutil.Message) error {
|
||||||
|
switch msg.OpCode {
|
||||||
|
case ws.OpPing:
|
||||||
|
c.mu.Lock()
|
||||||
|
defer c.mu.Unlock()
|
||||||
|
return wsutil.WriteClientMessage(c.conn, ws.OpPong, msg.Payload)
|
||||||
|
case ws.OpClose:
|
||||||
|
code, reason := parseClosePayload(msg.Payload)
|
||||||
|
return &closeError{code: code, reason: reason}
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteText sends a text WebSocket message.
|
||||||
|
func (c *Conn) WriteText(data []byte) error {
|
||||||
|
c.mu.Lock()
|
||||||
|
defer c.mu.Unlock()
|
||||||
|
return wsutil.WriteClientMessage(c.conn, ws.OpText, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteBinary sends a binary WebSocket message.
|
||||||
|
func (c *Conn) WriteBinary(data []byte) error {
|
||||||
|
c.mu.Lock()
|
||||||
|
defer c.mu.Unlock()
|
||||||
|
return wsutil.WriteClientMessage(c.conn, ws.OpBinary, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close sends a close frame with StatusNormalClosure and closes the underlying connection.
|
||||||
|
func (c *Conn) Close() error {
|
||||||
|
return c.closeWith(ws.StatusNormalClosure, "")
|
||||||
|
}
|
||||||
|
|
||||||
|
// closeWith sends a close frame with the given code/reason and closes the underlying connection.
|
||||||
|
// Used to echo the server's code when responding to a server-initiated close per RFC 6455 §5.5.1.
|
||||||
|
func (c *Conn) closeWith(code ws.StatusCode, reason string) error {
|
||||||
|
var first bool
|
||||||
|
c.closeOnce.Do(func() {
|
||||||
|
first = true
|
||||||
|
close(c.closed)
|
||||||
|
|
||||||
|
c.mu.Lock()
|
||||||
|
_ = wsutil.WriteClientMessage(c.conn, ws.OpClose, ws.NewCloseFrameBody(code, reason))
|
||||||
|
c.mu.Unlock()
|
||||||
|
|
||||||
|
c.closeErr = c.conn.Close()
|
||||||
|
})
|
||||||
|
|
||||||
|
if !first {
|
||||||
|
return net.ErrClosed
|
||||||
|
}
|
||||||
|
return c.closeErr
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewJSInterface creates a JavaScript object wrapping the WebSocket connection.
|
||||||
|
// It exposes: send(string|Uint8Array), close(), and callback properties
|
||||||
|
// onmessage, onclose, onerror.
|
||||||
|
//
|
||||||
|
// Callback properties may be set from the JS thread while the read loop
|
||||||
|
// goroutine reads them. In WASM this is safe because Go and JS share a
|
||||||
|
// single thread, but the design would need synchronization on
|
||||||
|
// multi-threaded runtimes.
|
||||||
|
func NewJSInterface(conn *Conn) js.Value {
|
||||||
|
obj := js.Global().Get("Object").Call("create", js.Null())
|
||||||
|
|
||||||
|
sendFunc := js.FuncOf(func(_ js.Value, args []js.Value) any {
|
||||||
|
if len(args) < 1 {
|
||||||
|
log.Errorf("websocket send requires a data argument")
|
||||||
|
return js.ValueOf(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
data := args[0]
|
||||||
|
switch data.Type() {
|
||||||
|
case js.TypeString:
|
||||||
|
if err := conn.WriteText([]byte(data.String())); err != nil {
|
||||||
|
log.Errorf("failed to send websocket text: %v", err)
|
||||||
|
return js.ValueOf(false)
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
buf, err := jsToBytes(data)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("failed to convert js value to bytes: %v", err)
|
||||||
|
return js.ValueOf(false)
|
||||||
|
}
|
||||||
|
if err := conn.WriteBinary(buf); err != nil {
|
||||||
|
log.Errorf("failed to send websocket binary: %v", err)
|
||||||
|
return js.ValueOf(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return js.ValueOf(true)
|
||||||
|
})
|
||||||
|
obj.Set("send", sendFunc)
|
||||||
|
|
||||||
|
closeFunc := js.FuncOf(func(_ js.Value, _ []js.Value) any {
|
||||||
|
if err := conn.Close(); err != nil {
|
||||||
|
log.Debugf("failed to close websocket: %v", err)
|
||||||
|
}
|
||||||
|
return js.Undefined()
|
||||||
|
})
|
||||||
|
obj.Set("close", closeFunc)
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
defer func() {
|
||||||
|
if err := conn.Close(); err != nil && !errors.Is(err, net.ErrClosed) {
|
||||||
|
log.Debugf("close websocket on readLoop exit: %v", err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
readLoop(conn, obj)
|
||||||
|
// Undefining before Release turns post-close JS calls into TypeError
|
||||||
|
// instead of a silent "call to released function".
|
||||||
|
obj.Set("send", js.Undefined())
|
||||||
|
obj.Set("close", js.Undefined())
|
||||||
|
sendFunc.Release()
|
||||||
|
closeFunc.Release()
|
||||||
|
}()
|
||||||
|
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
|
||||||
|
func jsToBytes(data js.Value) ([]byte, error) {
|
||||||
|
var uint8Array js.Value
|
||||||
|
switch {
|
||||||
|
case data.InstanceOf(js.Global().Get("Uint8Array")):
|
||||||
|
uint8Array = data
|
||||||
|
case data.InstanceOf(js.Global().Get("ArrayBuffer")):
|
||||||
|
uint8Array = js.Global().Get("Uint8Array").New(data)
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("send: unsupported data type, use string, Uint8Array, or ArrayBuffer")
|
||||||
|
}
|
||||||
|
|
||||||
|
buf := make([]byte, uint8Array.Get("length").Int())
|
||||||
|
js.CopyBytesToGo(buf, uint8Array)
|
||||||
|
return buf, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func readLoop(conn *Conn, obj js.Value) {
|
||||||
|
var ce *closeError
|
||||||
|
defer func() { invokeOnClose(obj, ce) }()
|
||||||
|
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case <-conn.closed:
|
||||||
|
return
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
|
||||||
|
op, payload, err := conn.ReadMessage()
|
||||||
|
if err != nil {
|
||||||
|
ce = handleReadError(conn, obj, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dispatchMessage(obj, op, payload)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func handleReadError(conn *Conn, obj js.Value, err error) *closeError {
|
||||||
|
var ce *closeError
|
||||||
|
if errors.As(err, &ce) {
|
||||||
|
if cerr := conn.closeWith(ws.StatusCode(ce.code), ce.reason); cerr != nil {
|
||||||
|
log.Debugf("failed to close websocket after server close frame: %v", cerr)
|
||||||
|
}
|
||||||
|
return ce
|
||||||
|
}
|
||||||
|
if errors.Is(err, io.EOF) || errors.Is(err, net.ErrClosed) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if onerror := obj.Get("onerror"); onerror.Truthy() {
|
||||||
|
onerror.Invoke(js.ValueOf(err.Error()))
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func invokeOnClose(obj js.Value, ce *closeError) {
|
||||||
|
onclose := obj.Get("onclose")
|
||||||
|
if !onclose.Truthy() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if ce != nil {
|
||||||
|
onclose.Invoke(js.ValueOf(int(ce.code)), js.ValueOf(ce.reason))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
onclose.Invoke()
|
||||||
|
}
|
||||||
|
|
||||||
|
func dispatchMessage(obj js.Value, op ws.OpCode, payload []byte) {
|
||||||
|
onmessage := obj.Get("onmessage")
|
||||||
|
if !onmessage.Truthy() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
switch op {
|
||||||
|
case ws.OpText:
|
||||||
|
onmessage.Invoke(js.ValueOf(string(payload)))
|
||||||
|
case ws.OpBinary:
|
||||||
|
uint8Array := js.Global().Get("Uint8Array").New(len(payload))
|
||||||
|
js.CopyBytesToJS(uint8Array, payload)
|
||||||
|
onmessage.Invoke(uint8Array)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func parseClosePayload(payload []byte) (uint16, string) {
|
||||||
|
if len(payload) < 2 {
|
||||||
|
return 1005, "" // RFC 6455: No Status Rcvd
|
||||||
|
}
|
||||||
|
code := binary.BigEndian.Uint16(payload[:2])
|
||||||
|
return code, string(payload[2:])
|
||||||
|
}
|
||||||
9
go.mod
9
go.mod
@@ -45,7 +45,7 @@ require (
|
|||||||
github.com/creack/pty v1.1.24
|
github.com/creack/pty v1.1.24
|
||||||
github.com/crowdsecurity/crowdsec v1.7.7
|
github.com/crowdsecurity/crowdsec v1.7.7
|
||||||
github.com/crowdsecurity/go-cs-bouncer v0.0.21
|
github.com/crowdsecurity/go-cs-bouncer v0.0.21
|
||||||
github.com/dexidp/dex v2.13.0+incompatible
|
github.com/dexidp/dex v0.0.0-00010101000000-000000000000
|
||||||
github.com/dexidp/dex/api/v2 v2.4.0
|
github.com/dexidp/dex/api/v2 v2.4.0
|
||||||
github.com/ebitengine/purego v0.8.4
|
github.com/ebitengine/purego v0.8.4
|
||||||
github.com/eko/gocache/lib/v4 v4.2.0
|
github.com/eko/gocache/lib/v4 v4.2.0
|
||||||
@@ -54,6 +54,7 @@ require (
|
|||||||
github.com/fsnotify/fsnotify v1.9.0
|
github.com/fsnotify/fsnotify v1.9.0
|
||||||
github.com/gliderlabs/ssh v0.3.8
|
github.com/gliderlabs/ssh v0.3.8
|
||||||
github.com/go-jose/go-jose/v4 v4.1.4
|
github.com/go-jose/go-jose/v4 v4.1.4
|
||||||
|
github.com/gobwas/ws v1.4.0
|
||||||
github.com/godbus/dbus/v5 v5.1.0
|
github.com/godbus/dbus/v5 v5.1.0
|
||||||
github.com/golang-jwt/jwt/v5 v5.3.1
|
github.com/golang-jwt/jwt/v5 v5.3.1
|
||||||
github.com/golang/mock v1.6.0
|
github.com/golang/mock v1.6.0
|
||||||
@@ -72,7 +73,7 @@ require (
|
|||||||
github.com/lrh3321/ipset-go v0.0.0-20250619021614-54a0a98ace81
|
github.com/lrh3321/ipset-go v0.0.0-20250619021614-54a0a98ace81
|
||||||
github.com/mdlayher/socket v0.5.1
|
github.com/mdlayher/socket v0.5.1
|
||||||
github.com/mdp/qrterminal/v3 v3.2.1
|
github.com/mdp/qrterminal/v3 v3.2.1
|
||||||
github.com/miekg/dns v1.1.72
|
github.com/miekg/dns v1.1.59
|
||||||
github.com/mitchellh/hashstructure/v2 v2.0.2
|
github.com/mitchellh/hashstructure/v2 v2.0.2
|
||||||
github.com/netbirdio/management-integrations/integrations v0.0.0-20260416123949-2355d972be42
|
github.com/netbirdio/management-integrations/integrations v0.0.0-20260416123949-2355d972be42
|
||||||
github.com/netbirdio/signal-dispatcher/dispatcher v0.0.0-20250805121659-6b4ac470ca45
|
github.com/netbirdio/signal-dispatcher/dispatcher v0.0.0-20250805121659-6b4ac470ca45
|
||||||
@@ -211,6 +212,8 @@ require (
|
|||||||
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
|
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
|
||||||
github.com/go-webauthn/webauthn v0.16.4 // indirect
|
github.com/go-webauthn/webauthn v0.16.4 // indirect
|
||||||
github.com/go-webauthn/x v0.2.3 // indirect
|
github.com/go-webauthn/x v0.2.3 // indirect
|
||||||
|
github.com/gobwas/httphead v0.1.0 // indirect
|
||||||
|
github.com/gobwas/pool v0.2.1 // indirect
|
||||||
github.com/goccy/go-yaml v1.18.0 // indirect
|
github.com/goccy/go-yaml v1.18.0 // indirect
|
||||||
github.com/gogo/protobuf v1.3.2 // indirect
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
|
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
|
||||||
@@ -337,7 +340,7 @@ replace github.com/getlantern/systray => github.com/netbirdio/systray v0.0.0-202
|
|||||||
|
|
||||||
replace golang.zx2c4.com/wireguard => github.com/netbirdio/wireguard-go v0.0.0-20260107100953-33b7c9d03db0
|
replace golang.zx2c4.com/wireguard => github.com/netbirdio/wireguard-go v0.0.0-20260107100953-33b7c9d03db0
|
||||||
|
|
||||||
replace github.com/cloudflare/circl => codeberg.org/cunicu/circl v0.0.0-20230801113412-fec58fc7b5f6
|
replace github.com/cloudflare/circl => github.com/cunicu/circl v0.0.0-20230801113412-fec58fc7b5f6
|
||||||
|
|
||||||
replace github.com/pion/ice/v4 => github.com/netbirdio/ice/v4 v4.0.0-20250908184934-6202be846b51
|
replace github.com/pion/ice/v4 => github.com/netbirdio/ice/v4 v4.0.0-20250908184934-6202be846b51
|
||||||
|
|
||||||
|
|||||||
15
go.sum
15
go.sum
@@ -5,8 +5,6 @@ cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3R
|
|||||||
cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
|
cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
|
||||||
cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs=
|
cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs=
|
||||||
cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
|
cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
|
||||||
codeberg.org/cunicu/circl v0.0.0-20230801113412-fec58fc7b5f6 h1:b8xUw3004wk+3ipBhu0VU4RtUJsegMIiqjxSK4++lzA=
|
|
||||||
codeberg.org/cunicu/circl v0.0.0-20230801113412-fec58fc7b5f6/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw=
|
|
||||||
cunicu.li/go-rosenpass v0.4.0 h1:LtPtBgFWY/9emfgC4glKLEqS0MJTylzV6+ChRhiZERw=
|
cunicu.li/go-rosenpass v0.4.0 h1:LtPtBgFWY/9emfgC4glKLEqS0MJTylzV6+ChRhiZERw=
|
||||||
cunicu.li/go-rosenpass v0.4.0/go.mod h1:MPbjH9nxV4l3vEagKVdFNwHOketqgS5/To1VYJplf/M=
|
cunicu.li/go-rosenpass v0.4.0/go.mod h1:MPbjH9nxV4l3vEagKVdFNwHOketqgS5/To1VYJplf/M=
|
||||||
dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
|
dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
|
||||||
@@ -134,6 +132,8 @@ github.com/crowdsecurity/go-cs-bouncer v0.0.21 h1:arPz0VtdVSaz+auOSfHythzkZVLyy1
|
|||||||
github.com/crowdsecurity/go-cs-bouncer v0.0.21/go.mod h1:4JiH0XXA4KKnnWThItUpe5+heJHWzsLOSA2IWJqUDBA=
|
github.com/crowdsecurity/go-cs-bouncer v0.0.21/go.mod h1:4JiH0XXA4KKnnWThItUpe5+heJHWzsLOSA2IWJqUDBA=
|
||||||
github.com/crowdsecurity/go-cs-lib v0.0.25 h1:Ov6VPW9yV+OPsbAIQk1iTkEWhwkpaG0v3lrBzeqjzj4=
|
github.com/crowdsecurity/go-cs-lib v0.0.25 h1:Ov6VPW9yV+OPsbAIQk1iTkEWhwkpaG0v3lrBzeqjzj4=
|
||||||
github.com/crowdsecurity/go-cs-lib v0.0.25/go.mod h1:X0GMJY2CxdA1S09SpuqIKaWQsvRGxXmecUp9cP599dE=
|
github.com/crowdsecurity/go-cs-lib v0.0.25/go.mod h1:X0GMJY2CxdA1S09SpuqIKaWQsvRGxXmecUp9cP599dE=
|
||||||
|
github.com/cunicu/circl v0.0.0-20230801113412-fec58fc7b5f6 h1:/DS5cDX3FJdl+XaN2D7XAwFpuanTxnp52DBLZAaJKx0=
|
||||||
|
github.com/cunicu/circl v0.0.0-20230801113412-fec58fc7b5f6/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||||
@@ -247,6 +247,12 @@ github.com/go-webauthn/webauthn v0.16.4 h1:R9jqR/cYZa7hRquFF7Za/8qoH/K/TIs1/Q/4C
|
|||||||
github.com/go-webauthn/webauthn v0.16.4/go.mod h1:SU2ljAgToTV/YLPI0C05QS4qn+e04WpB5g1RMfcZfS4=
|
github.com/go-webauthn/webauthn v0.16.4/go.mod h1:SU2ljAgToTV/YLPI0C05QS4qn+e04WpB5g1RMfcZfS4=
|
||||||
github.com/go-webauthn/x v0.2.3 h1:8oArS+Rc1SWFLXhE17KZNx258Z4kUSyaDgsSncCO5RA=
|
github.com/go-webauthn/x v0.2.3 h1:8oArS+Rc1SWFLXhE17KZNx258Z4kUSyaDgsSncCO5RA=
|
||||||
github.com/go-webauthn/x v0.2.3/go.mod h1:tM04GF3V6VYq79AZMl7vbj4q6pz9r7L2criWRzbWhPk=
|
github.com/go-webauthn/x v0.2.3/go.mod h1:tM04GF3V6VYq79AZMl7vbj4q6pz9r7L2criWRzbWhPk=
|
||||||
|
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
|
||||||
|
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
|
||||||
|
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
|
||||||
|
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||||
|
github.com/gobwas/ws v1.4.0 h1:CTaoG1tojrh4ucGPcoJFiAQUAsEWekEWvLy7GsVNqGs=
|
||||||
|
github.com/gobwas/ws v1.4.0/go.mod h1:G3gNqMNtPppf5XUz7O4shetPpcZ1VJ7zt18dlUeakrc=
|
||||||
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
|
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
|
||||||
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
|
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
|
||||||
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
||||||
@@ -455,8 +461,8 @@ github.com/mdp/qrterminal/v3 v3.2.1 h1:6+yQjiiOsSuXT5n9/m60E54vdgFsw0zhADHhHLrFe
|
|||||||
github.com/mdp/qrterminal/v3 v3.2.1/go.mod h1:jOTmXvnBsMy5xqLniO0R++Jmjs2sTm9dFSuQ5kpz/SU=
|
github.com/mdp/qrterminal/v3 v3.2.1/go.mod h1:jOTmXvnBsMy5xqLniO0R++Jmjs2sTm9dFSuQ5kpz/SU=
|
||||||
github.com/mholt/acmez/v2 v2.0.1 h1:3/3N0u1pLjMK4sNEAFSI+bcvzbPhRpY383sy1kLHJ6k=
|
github.com/mholt/acmez/v2 v2.0.1 h1:3/3N0u1pLjMK4sNEAFSI+bcvzbPhRpY383sy1kLHJ6k=
|
||||||
github.com/mholt/acmez/v2 v2.0.1/go.mod h1:fX4c9r5jYwMyMsC+7tkYRxHibkOTgta5DIFGoe67e1U=
|
github.com/mholt/acmez/v2 v2.0.1/go.mod h1:fX4c9r5jYwMyMsC+7tkYRxHibkOTgta5DIFGoe67e1U=
|
||||||
github.com/miekg/dns v1.1.72 h1:vhmr+TF2A3tuoGNkLDFK9zi36F2LS+hKTRW0Uf8kbzI=
|
github.com/miekg/dns v1.1.59 h1:C9EXc/UToRwKLhK5wKU/I4QVsBUc8kE6MkHBkeypWZs=
|
||||||
github.com/miekg/dns v1.1.72/go.mod h1:+EuEPhdHOsfk6Wk5TT2CzssZdqkmFhf8r+aVyDEToIs=
|
github.com/miekg/dns v1.1.59/go.mod h1:nZpewl5p6IvctfgrckopVx2OlSEHPRO/U4SYkRklrEk=
|
||||||
github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721 h1:RlZweED6sbSArvlE924+mUcZuXKLBHA35U7LN621Bws=
|
github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721 h1:RlZweED6sbSArvlE924+mUcZuXKLBHA35U7LN621Bws=
|
||||||
github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc=
|
github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc=
|
||||||
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
||||||
@@ -840,6 +846,7 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
|||||||
Reference in New Issue
Block a user