Files
netbird/client/iface/wgproxy/proxy.go
aliamerj ba7793ae7b Revert "Merge branch 'main' into feature/remote-debug"
This reverts commit 6d6333058c, reversing
changes made to 446aded1f7.
2025-10-06 12:24:48 +03:00

17 lines
585 B
Go

package wgproxy
import (
"context"
"net"
)
// Proxy is a transfer layer between the relayed connection and the WireGuard
type Proxy interface {
AddTurnConn(ctx context.Context, endpoint *net.UDPAddr, remoteConn net.Conn) error
EndpointAddr() *net.UDPAddr // EndpointAddr returns the address of the WireGuard peer endpoint
Work() // Work start or resume the proxy
Pause() // Pause to forward the packages from remote connection to WireGuard. The opposite way still works.
CloseConn() error
SetDisconnectListener(disconnected func())
}