Skip to content

Swift, Dart, Kotlin/Native (C3) ​

Ready

The hub recognises the services this package fits and proposes the compose part of the change, if any; the source change stays by hand, with the steps and examples in the proposal's review. Nothing changes until a player approves it (Hook proposals). The cheat sheets have the steps by hand.

For services written in Swift (SwiftNIO, Vapor 4, Hummingbird 2), Dart (shelf, dart_frog, anything on dart:io's HttpServer) and Kotlin/Native (Ktor with the CIO engine). They all serve many requests on a few event-loop or dispatcher threads, so the kernel cannot tell which request a child process, file or outgoing connection belongs to. None of them can load code from outside, so the hook is a source change: a small binding is vendored into the service, a middleware or plugin is added, and a few calls are swapped for helpers. The service also gets the hook directory as a read-only mount, so the binding can load the core at run time.

  • Swift and Kotlin/Native call C1's guarded C binding vbxhook through their C FFI. Swift compiles it as a SwiftPM C target; Kotlin/Native compiles it into its cinterop library.
  • Dart cannot compile C, so its binding loads the core itself through dart:ffi and applies the same guards in Dart.

Covers ​

Versions
Swift5.10 or later on Linux with glibc (tested: 6.1.3, swift:6.1-noble)
SwiftNIO2.x, NIOHTTP1 servers (tested 2.104)
Vapor4.x (tested 4.122.2)
Hummingbird2.x (tested 2.26.0)
Dart3.0 or later (tested 3.8, dart:3.8), JIT (dart run) and AOT (dart compile exe)
shelf1.1 or later (tested 1.4.2), including shelf_router
dart_frog1.x (tested 1.2.6)
Kotlin/Native2.1 or later, linuxX64 / linuxArm64 (tested 2.1.21, Gradle 8.14)
Ktor3.x server with the CIO engine (tested 3.1.3)

Kotlin/JVM, Ktor on the JVM, and Swift or Dart on platforms other than Linux are not covered here. Kotlin on the JVM uses the JVM packages J1 to J4.

What the kernel already links without this hook. Nothing per request, for all three runtimes:

RuntimeServer modelKernel links
SwiftNIO / Vapor / Hummingbirda few event-loop threads, each serving many connections; Swift concurrency tasks on a shared poolthe process only
Dart (dart:io)one isolate (one mutator thread) serves every connection; file and socket I/O runs on a VM thread poolthe process only
Ktor CIO (Kotlin/Native)coroutines on a dispatcher pool (Dispatchers.IO)the process only

A Dart service that runs one isolate per connection is still not linked by the kernel: isolates share the process and the VM's I/O threads.

How it gets in ​

From a registry (local development, or a build with network; the same release as the hook directory): Swift: .package(url: "https://gitlab.com/nirvati-ug/ctf-garden/vbxtrace-swift.git", exact: "1.0.0"); Dart: dart pub add vbxtrace:1.0.0; see Local development.

Source change plus a compose mount, for all three languages. The hub proposes the full diff. Everything that gets vendored is self-contained: the service's build needs no network access for the hook.

The mount is the same for every language. The bindings load /opt/vbxtrace/libvbxtrace-$(uname -m).so at the first call. Without the mount they stay off and the service runs unchanged. In full, the Swift and Kotlin/Native bindings (through vbxhook.c) and the Dart binding look for the core in this order: the file named by VBXTRACE_LIB, then /opt/vbxtrace/libvbxtrace-<arch>.so (the mount), then, only with VBXTRACE_DEV=1 and only when the directory and the library belong to root or the user and nobody else can write them, ~/.local/share/vulnboxd/trace (or $XDG_DATA_HOME/vulnboxd/trace) for local development. A setuid or file-capability binary ignores VBXTRACE_LIB and VBXTRACE_DEV.

diff
 services:
   <service>:
+    volumes:
+      - /usr/local/lib/vulnboxd/trace:/opt/vbxtrace:ro

The hub proposes this when it detects:

  • Swift: Package.swift / Package.resolved listing vapor, hummingbird or swift-nio; a swift: / swiftlang/swift: base image.
  • Dart: pubspec.yaml / pubspec.lock listing shelf, shelf_router or dart_frog; a dart: base image.
  • Kotlin/Native: build.gradle.kts with a linuxX64/linuxArm64 target and io.ktor:ktor-server-cio; a gradle: build image; .kexe entrypoints.

The templates are in hooks/native/c3/proposals/ (swift.toml, dart.toml, kotlin-native.toml), with example diffs.

Swift ​

  1. Vendor the package:

    sh
    /usr/local/lib/vulnboxd/trace/native/swift/vendor.sh <service-dir>

    This copies the VBXTrace SwiftPM package to vendor/VBXTrace and puts C1's vbxhook.c/vbxhook.h and vbxtrace.h into its C target, CVBXHook. The package has no dependencies.

  2. Add it to Package.swift and to the executable target.

  3. Copy the framework's integration file from native/swift/integrations/ into the executable target itself (for example Sources/App/):

    • VBXTraceVapor.swift for Vapor,
    • VBXTraceHummingbird.swift for Hummingbird,
    • VBXTraceNIO.swift for plain SwiftNIO, and for ClientBootstrap.vbxConnect with any framework.

    The integrations are files rather than package targets, so the hook never adds Vapor, Hummingbird or NIO versions to your dependency graph. They use the ones you already have.

  4. Install the middleware:

    • Vapor: app.middleware.use(VBXTraceMiddleware(), at: .beginning).
    • Hummingbird: Router(context: VBXRequestContext.self) and router.add(middleware: VBXTraceMiddleware()) as the first middleware. If you already have your own context, see Request index per framework below.
    • SwiftNIO: VBXHTTPServerHandler() right after configureHTTPServerPipeline(withPipeliningAssistance: true).
  5. Use the helpers where effects should be linked (see What it records).

  6. Make sure the Dockerfile copies vendor/ before swift package resolve / swift build.

diff
--- a/Package.swift
+++ b/Package.swift
         .package(url: "https://github.com/vapor/vapor.git", from: "4.110.0"),
+        .package(path: "vendor/VBXTrace"),
     ],
 ...
                 .product(name: "Vapor", package: "vapor"),
+                .product(name: "VBXTrace", package: "VBXTrace"),
--- a/Sources/App/configure.swift
+++ b/Sources/App/configure.swift
 import Vapor
+import VBXTrace

 public func configure(_ app: Application) async throws {
+    app.middleware.use(VBXTraceMiddleware(), at: .beginning)
--- a/Sources/App/routes.swift
+++ b/Sources/App/routes.swift
-        try p.run()
+        try VBXTrace.run(p)
--- a/Dockerfile
+++ b/Dockerfile
 COPY ./Package.* ./
+COPY ./vendor ./vendor
 RUN swift package resolve
diff
--- a/Sources/App/Application+build.swift
+++ b/Sources/App/Application+build.swift
-    let router = Router()
+    let router = Router(context: VBXRequestContext.self)
+    router.add(middleware: VBXTraceMiddleware())

The default build links -ldl and loads the core with dlopen, so it needs a dynamically linked glibc image (the official swift: images and their -slim runtime images). Fully static Swift binaries (--static-swift-stdlib with musl) are not covered yet; see Known gaps.

Dart ​

  1. Copy /usr/local/lib/vulnboxd/trace/native/dart/vbxtrace to <service>/vendor/vbxtrace. It is pure Dart and depends only on shelf, which the service already has.
  2. In pubspec.yaml, add vbxtrace: { path: vendor/vbxtrace }. Make sure the Dockerfile copies vendor/ before dart pub get.
  3. First line of main(): vbxInstallServerSockets();. With dart_frog, put it in run() in main.dart, and create that file if the project has none.
  4. shelf: add .addMiddleware(vbxMiddleware()) to the pipeline, outermost. dart_frog: in routes/_middleware.dart, add handler.use(fromShelfMiddleware(vbxMiddleware())).
  5. Swap the calls whose effects should be linked: Process.start → VbxTrace.startProcess, Process.run → VbxTrace.runProcess, Socket.connect → VbxTrace.connect, Isolate.run → VbxTrace.isolateRun.
diff
--- a/pubspec.yaml
+++ b/pubspec.yaml
 dependencies:
   shelf: ^1.4.0
+  vbxtrace:
+    path: vendor/vbxtrace
--- a/bin/server.dart
+++ b/bin/server.dart
+import 'package:vbxtrace/shelf.dart';
 ...
-  final result = await Process.run('ping', ['-c', '1', host]);
+  final result = await VbxTrace.runProcess('ping', ['-c', '1', host]);
 ...
 Future<void> main() async {
+  vbxInstallServerSockets();
   final router = Router()..get('/ping', _ping);
-  final handler = const Pipeline().addMiddleware(logRequests()).addHandler(router.call);
+  final handler = const Pipeline().addMiddleware(vbxMiddleware()).addMiddleware(logRequests()).addHandler(router.call);
   await shelf_io.serve(handler, InternetAddress.anyIPv4, 8080);

dart_frog:

diff
--- /dev/null
+++ b/main.dart
+import 'dart:io';
+
+import 'package:dart_frog/dart_frog.dart';
+import 'package:vbxtrace/vbxtrace.dart';
+
+Future<HttpServer> run(Handler handler, InternetAddress ip, int port) {
+  vbxInstallServerSockets();
+  return serve(handler, ip, port);
+}
--- a/routes/_middleware.dart
+++ b/routes/_middleware.dart
+import 'package:vbxtrace/shelf.dart';
 Handler middleware(Handler handler) {
-  return handler.use(requestLogger());
+  return handler.use(requestLogger()).use(fromShelfMiddleware(vbxMiddleware()));
 }

vbxInstallServerSockets() installs a process-wide IOOverrides (IOOverrides.global) whose ServerSocket.bind returns the real server socket wrapped in a VbxServerSocket. That gives HttpServer.bind, shelf_io.serve and dart_frog's serve exact request indexes without touching how the server is started.

If the service already installs its own global IOOverrides, the function changes nothing and returns false. In that case, serve with vbxServe(handler, address, port), which has the same arguments as shelf_io.serve, or use HttpServer.listenOn(await VbxServerSocket.bind(...)).

Kotlin/Native ​

  1. Vendor:

    sh
    /usr/local/lib/vulnboxd/trace/native/kotlin/vendor.sh <service-dir>

    This copies vbxhook.def, vbxhook.c/.h, vbxtrace.h and kotlin/VbxTrace.kt, kotlin/VbxTraceKtor.kt to vendor/vbxtrace.

  2. In build.gradle.kts, add the cinterop and the source directory to the native target. The .def file compiles vbxhook.c into the interop library itself (the code after its --- line), so no separate C build step is needed. It links -ldl.

  3. install(VbxTracePlugin) before any other plugin.

  4. Report what handlers do through VbxTrace (see What it records).

  5. Make sure the Dockerfile copies vendor/ before the Gradle build.

diff
--- a/build.gradle.kts
+++ b/build.gradle.kts
     linuxX64 {
+        compilations.getByName("main") {
+            cinterops {
+                create("vbxhook") {
+                    defFile(project.file("vendor/vbxtrace/vbxhook.def"))
+                    includeDirs(project.file("vendor/vbxtrace"))
+                }
+            }
+        }
 ...
         val linuxX64Main by getting {
+            kotlin.srcDir("vendor/vbxtrace/kotlin")
--- a/src/linuxX64Main/kotlin/Main.kt
+++ b/src/linuxX64Main/kotlin/Main.kt
+import vbxtrace.VbxTrace
+import vbxtrace.VbxTracePlugin
 ...
     embeddedServer(CIO, port = 8080) {
+        install(VbxTracePlugin)
 ...
-                val fd = open("/data/" + id, O_RDONLY)
+                val fd = VbxTrace.open(VbxTrace.current(), "/data/" + id, O_RDONLY)

Applying it by hand. Do the same steps, then rebuild and redeploy the service. The vendored files can be removed again at any time; see Turning it off.

What it records ​

EventEmitted fromJoin key
request_begin / request_endthe middleware or plugin (Swift: Vapor AsyncMiddleware, Hummingbird RouterMiddleware, NIO ChannelDuplexHandler; Dart: shelf Middleware; Kotlin: Ktor application plugin)peer address and port, local port, request index (exact or unknown, per framework below)
spawnedSwift VBXTrace.run(process); Dart VbxTrace.startProcess / runProcess; Kotlin VbxTrace.spawned(ctx, pid) after posix_spawn/forkchild pid
connectedSwift ClientBootstrap.vbxConnect / VBXTrace.connected(channel:) / connected(fd:); Dart VbxTrace.connect / socketConnected; Kotlin VbxTrace.connect(selector, host, port) / connected(socket)local port
openedSwift VBXTrace.open(path, flags, mode) (flags exact), VBXTrace.opened(FileHandle) (flags unknown); Kotlin VbxTrace.open(ctx, path, flags); Dart: never (see Known gaps)pid + fd
handoff, context_enter / context_exitSwift VBXTrace.detached, VBXTrace.dispatch(on:), run(handedOff:); Dart VbxTrace.isolateRun; Kotlin VbxTrace.handoff + runHandedOffcontext ids

request_end carries the response's HTTP status. If the handler throws, it carries the error's status where the framework defines one (Hummingbird HTTPResponseError, Vapor AbortError), else 0.

Request index per framework ​

FrameworkIndexHow
SwiftNIO (VBXHTTPServerHandler)exactone handler instance per channel (= connection) counts request heads; the pipelining handler in front makes pipelined requests arrive one at a time
Hummingbird 2exact with VBXRequestContext (or any context conforming to VBXTraceRequestContext)the context is built from ApplicationRequestContextSource.channel; VBXConnection.of(channel) keeps one counter per channel, dropped when the channel closes. Hummingbird serves a connection's requests one at a time
Hummingbird 2, other contextsunknownonly if the context is a RemoteAddressRequestContext and VBXTraceMiddleware(localPort:) is given; otherwise nothing is reported
Vapor 4unknownVapor gives middleware no access to the connection: Request has no channel, and its server pipeline has no public hook
shelf / dart_frog / dart:ioexact after vbxInstallServerSockets() or vbxServesee below
shelf over TLS (securityContext)unknownSecureServerSocket cannot be wrapped the same way
Ktor CIO (Kotlin/Native)unknownKtor exposes no connection object, and CIO launches the handlers of pipelined requests on one connection concurrently on Dispatchers.IO, so no counter could be exact

"Unknown" means request_index is VBX_REQUEST_INDEX_UNKNOWN (0xFFFFFFFF). The peer address, peer port and local port are still exact. The sensor then links the request only through other exact facts, or not at all; it never guesses.

How Dart gets an exact index. dart:io's HttpServer exposes no connection object, only each request's HttpConnectionInfo (peer address, peer port, local port).

  • VbxServerSocket hands every accepted socket to the server inside a wrapper that forwards every member unchanged. This is the same pattern as dart:io's own detached-socket wrapper.
  • At accept time it starts a counter for the socket's 4-tuple, which is unique while the connection lives.
  • The counter is dropped when the server destroys or closes the socket, or the socket's input ends.
  • dart:io handles a connection's requests strictly one after another: _HttpConnection pauses the parser until the response is done.
  • So taking the next number in the middleware is exact.

Where the keys come from ​

RuntimePeer and local port
SwiftNIO / Hummingbirdchannel.remoteAddress / channel.localAddress, which NIO caches when the socket is accepted
Vaporrequest.remoteAddress: the socket's peer, not X-Forwarded-For like peerAddress. The local port is the HTTP server's configured port, which Vapor overwrites with the serve command's --port/--bind, or VBXTraceMiddleware(localPort:)
Dartrequest.context['shelf.io.connection_info'] (an HttpConnectionInfo)
Ktorcall.request.local (the socket, not forwarded headers; origin is not used)

Context following ​

Swift: task-locals and the event loop ​

The request's context is a task-local, @TaskLocal static var VBXTrace.current. The Vapor and Hummingbird middleware run the rest of the chain inside VBXTrace.$current.withValue(ctx).

It follows automatically:

  • await;
  • child tasks (async let, withTaskGroup);
  • Task { } created inside the request (unstructured tasks inherit task-locals);
  • Vapor's async route handlers. Vapor bridges through EventLoopFuture, but it creates the handler's task while still inside the middleware's task, so the value is inherited.

It does not follow:

  • Task.detached: use VBXTrace.detached { }. It emits handoff, then context_enter/context_exit around the detached work.
  • DispatchQueue blocks and threads: use VBXTrace.dispatch(on: queue) { } or VBXTrace.run(handedOff: VBXTrace.handoff()) { }.
  • EventLoop / EventLoopFuture callbacks. Those run on the event-loop thread outside any task. A callback that runs later sees neither the task-local nor the thread slot of the request. Capture let ctx = VBXTrace.effective before scheduling and pass it on: the helpers take an explicit context argument, and VBXTrace.withContext(ctx) { } wraps a block.

Plain SwiftNIO handlers have no task at all. VBXHTTPServerHandler therefore sets the event-loop thread's current slot (VBXTrace.threadCurrent, which is C1's vbxh_set_current) while it forwards a request's parts down the pipeline.

  • The next handler's channelRead sees the request through VBXTrace.effective: the task-local if set, else the thread slot.
  • Anything that continues later must capture it.
  • The helpers default to VBXTrace.effective.

For Vapor there is also req.vbxContext, stored on the request, for code that runs outside the request's task.

Dart: zones and isolates ​

The context is a zone value: runZoned(zoneValues: ...), read with VbxTrace.current.

  • Follows: everything the zone covers: await, Future/then, Stream listeners, Timers and microtasks created inside the request.
  • Does not follow: other isolates. Isolate.run / Isolate.spawn start with fresh zones and separate statics. VbxTrace.isolateRun(fn) emits handoff and runs fn in the new isolate between context_enter/context_exit of the child context.
  • The binding's state (loaded core, error count) is per isolate: each isolate opens the core on its first call. The operating system maps the library once, so context ids stay unique in the process.

Kotlin/Native: coroutine context ​

The plugin runs the call pipeline in withContext(VbxContext(ctx)). VbxContext is a plain coroutine context element, read with VbxTrace.current().

  • Follows: launch, async and withContext, including the dispatcher switches CIO does itself (Dispatchers.IO).
  • Does not follow: Workers, raw pthreads and C callbacks. Use val child = VbxTrace.handoff(ctx) and VbxTrace.runHandedOff(child) { ... } on the other thread. runHandedOff also sets C1's thread-current slot for code there.
  • Non-suspending helpers take the context explicitly, because they cannot read the coroutine context.

Known gaps ​

  • Vapor and Ktor: no exact request index. Neither exposes the connection; see the table above. Requests are still reported, with an unknown index.
  • Dart: no opened. dart:io never exposes a file descriptor (RandomAccessFile has none), and scanning /proc/self/fd would be a guess. The kernel still sees the openat, but cannot attribute it to a request. Most of Dart's async file I/O runs on the VM's I/O thread pool anyway.
  • Dart TLS servers: unknown index (above).
  • Dart, a pre-existing global IOOverrides: use vbxServe.
  • Dart, Process.run: gives no pid until the process has finished, so use VbxTrace.runProcess. It is built on Process.start, as Process.run itself is.
  • Swift, fully static binaries (--static-swift-stdlib / the static Linux SDK on musl): the default dlopen build needs a dynamic libc. C1's -DVBXHOOK_STATIC variant links the core's static archive instead. That works in principle (add the archive as a linker flag of the C target), but is not packaged or sampled yet.
  • Swift, Foundation APIs that open files or connections internally (URLSession, String(contentsOfFile:), Data.write(to:)): they expose no descriptor at the right moment, so they are not reported. Use VBXTrace.open / opened(FileHandle) and vbxConnect, where an exact link matters. Outgoing HTTP through AsyncHTTPClient is not reported either, because its connection pool belongs to no request.
  • Streamed response bodies: request_end fires when the handler returns its response, not when a streamed body has been written (all three runtimes). The kernel still sees the socket writes; only the end boundary is early.
  • HTTP/2 and WebSockets: not handled specially. HTTP/2 streams on Hummingbird or Vapor go through the middleware with an unknown index (Hummingbird, VBXRequestContext: the channel is the stream channel). A WebSocket upgrade is reported as one request.
  • Kotlin/Native, process creation: Kotlin/Native has no process API. Services use posix_spawn, fork/exec or popen through platform.posix. Report the pid with VbxTrace.spawned after posix_spawn/fork. popen returns no pid, so there is nothing to report and the kernel's lineage still shows the shell as a child of the service.
  • Kotlin/Native, connected: Ktor 3.1 on native exposes neither a raw address nor the descriptor of a ktor-network socket, so the peer comes from the socket's InetSocketAddress.hostname. If that is not an IP literal, the event is reported without a peer address (the local port, the join key, is still exact).

Safety ​

  • Swift and Kotlin/Native use C1's vbxhook.c unchanged: C1's safety rules apply as they are. Every function is a guarded call, the binding does nothing until a tracer is attached (vbx_v1_enabled() first), VBXTRACE=0 switches it off at the first call, and internal errors are counted (off after 5). The Swift and Kotlin layers add no failure modes of their own: no allocation beyond converting an address to a C string, no throwing, no locks on the hot path. The exception is Hummingbird's per-connection registry, a dictionary lookup under a lock per request.
  • Dart applies the same rules in Dart:
    • VBXTRACE=0 is read at the first call.
    • enabled() is checked first on every call.
    • Every core call is inside try/catch; errors are counted and the binding turns off after 5.
    • VBXTRACE_CHAOS=1 makes every call fail inside the guard.
    • No binding function ever throws into the service. A handler's own exceptions are rethrown unchanged after request_end.
  • Request counting runs whether or not a tracer is attached, so indexes stay right when the sensor attaches mid-connection. In Dart this is one map lookup per request; in NIO and Hummingbird, one increment.
  • What the integrations wrap:
    • Dart's socket wrapper forwards every member of the accepted Socket unchanged.
    • The middleware and plugins return the handler's response or error unchanged.
    • The helpers return exactly what the API they replace returns, and report only after it succeeded.
  • Chaos tests: every sample also runs with the core forced to fail (chaos) and without the hook (baseline). Its responses must be byte-identical to the normal run.

The samples (hooks/native/c3/samples/) run the standard native script: a keep-alive connection with two requests, then one request each that spawns /bin/true, opens a file, connects to a TCP port, and hands work off (Swift: Task.detached or a DispatchQueue; Dart: Isolate.run; Kotlin: a Worker). Overhead (p99 with the hook loaded and the sensor detached, and attached) has not been measured yet. It is planned for a later phase.

SampleEventsChaosBaseline
dart-shelf (shelf 1.4.2)17 events match (exact indexes; no opened)byte-identicalbyte-identical
dart-frog (dart_frog 1.2.6)17 events match (exact indexes; no opened)byte-identicalbyte-identical
swift-nio (SwiftNIO 2.104, VBXHTTPServerHandler)18 events match (exact indexes)byte-identicalbyte-identical
swift-hummingbird (Hummingbird 2.26, VBXRequestContext)18 events match (exact indexes)byte-identicalbyte-identical
swift-vapor (Vapor 4.122)18 events match (index unknown)byte-identicalbyte-identical
kotlin-native-ktor (Kotlin 2.1.21, Ktor 3.1.3 CIO, linuxX64)18 events match (index unknown)byte-identicalbyte-identical

Turning it off ​

Set VBXTRACE=0 in the service's environment and restart it, or revert the change that added the hook; vulnboxd's rollback covers a hook that breaks a service.

Removing the read-only mount also turns the hook off: the bindings find no core and stay off.

To remove the hook completely:

  • Swift: delete vendor/VBXTrace, the copied VBXTrace*.swift integration file and the middleware line. Remove the package from Package.swift. The helper calls (VBXTrace.run(p) and so on) must go back to the plain calls.
  • Dart: delete vendor/vbxtrace and the vbxtrace entry in pubspec.yaml, then remove the vbxInstallServerSockets() / vbxMiddleware() lines and the VbxTrace.* helper calls.
  • Kotlin/Native: delete vendor/vbxtrace, then remove the cinterop block and srcDir, install(VbxTracePlugin) and the VbxTrace.* calls.

Troubleshooting ​

  • Are the probes there? readelf -n /usr/local/lib/vulnboxd/trace/libvbxtrace-x86_64.so lists them; sudo bpftrace -l 'usdt:/usr/local/lib/vulnboxd/trace/libvbxtrace-x86_64.so:*' too.
  • Is the hook loaded? Once the service has served a request, grep vbxtrace /proc/<pid>/maps shows /opt/vbxtrace/libvbxtrace-x86_64.so. All three bindings load it lazily, at the first call. If it is not there:
    • Check that the mount is present: ls /opt/vbxtrace inside the container.
    • Check that VBXTRACE=0 is not set.
  • Swift: nm <binary> | grep vbxh_ shows the vendored binding. If vendor/VBXTrace/Sources/CVBXHook is empty, vendor.sh was not run (the build then fails on the missing vbxhook.h).
  • Dart: VbxTrace.errors (> 0: internal errors; ≥ 5: off) and VbxConnections.live (connections being counted) can be logged for diagnosis. If vbxInstallServerSockets() returned false, the process already had its own IOOverrides, or the binding is off. The index is then unknown unless you serve with vbxServe.
  • Kotlin/Native: link errors about dlopen mean -ldl is missing. The shipped .def sets linkerOpts.linux = -ldl; keep it if you copy the definition elsewhere. includeDirs must point at the directory with vbxhook.c, vbxhook.h and vbxtrace.h.
  • Which links did a flow get? The hub shows each link's method; this package's are hook:C3.
  • Requests appear with request_index=unknown:
    • Expected for Vapor, Ktor and Dart TLS servers.
    • For Hummingbird, the router's context is not a VBXTraceRequestContext.
    • For shelf, vbxInstallServerSockets() was called after the server bound, or not at all.