WireGuard

Goauld agent WireGuard

The agent exposes a virtual WireGuard interface, allowing TCP, UDP, and ICMP (ping) traffic without relying on a SOCKS proxy.

The virtual WireGuard interface uses the gVisor network stack (https://github.com/google/gvisor/tree/go).

The implementation works as follows:

  1. The agent exposes a WireGuard server port on the host.
  2. The agent forwards the WireGuard port to the server using UDP-over-TCP encapsulation to traverse the existing agent tunnel.
  3. The client forwards the WireGuard port exposed on the server to the local machine.
  4. The client decapsulates the UDP-over-TCP traffic to expose the WireGuard port.
  5. The WireGuard client on the operator machine connects to the agent’s virtual WireGuard interface.

Flags

The virtual WireGuard interface is not enabled by default.

  • --wg: Enable the WireGuard interface

See client/WireGuard