Skip to content

Commit 2aaa7af

Browse files
hhfrancoisclaude
andcommitted
docs(e2e): update client/compose comments for the TUN architecture
The e2e client headers and compose comments still described the removed SOCKS/HTTP proxies + LD_PRELOAD hook + seccomp supervisor. Rewrite them: plug captures at the IP layer via its userspace TUN, so each client reaches the cluster service by name through its natural driver, no proxy or hook. Comments only — no code or compose directive changed (obsolete PLUG_HOOK_DEBUG / seccomp:unconfined / SYS_PTRACE left in place, to drop separately once the e2e is re-run without them). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8c2f2a3 commit 2aaa7af

5 files changed

Lines changed: 25 additions & 19 deletions

File tree

e2e/clients/go/main.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// The Go e2e client: reach a cluster service BY NAME, by protocol, using the
22
// language's NATURAL driver. Invoked (under plug) as: eclient <proto> <host:port>
33
//
4-
// http goes through Go's net/http (honors HTTP_PROXY → exercises the proxy path);
5-
// every other protocol is a raw-TCP driver (no proxy honoring) → it exercises the
6-
// seccomp supervisor. Prints "E2E-OK <proto> — …" and exits 0 on success.
4+
// Every protocol just connects to <host:port> by name and lets the driver do its
5+
// thing: no proxy, no hook, no config. plug captures at the IP layer through its
6+
// userspace TUN, so the app's socket is never touched and each driver reaches the
7+
// cluster service by name uniformly. Prints "E2E-OK <proto> — …" and exits 0 on
8+
// success.
79
package main
810

911
import (
@@ -244,7 +246,8 @@ func doMQTT(target string) {
244246
}
245247

246248
func doGRPC(target string) {
247-
// WithNoProxy → raw TCP (HTTP/2), so this exercises the seccomp supervisor.
249+
// Plain HTTP/2 to <host:port> by name — plug captures it at the IP layer, no
250+
// proxy involved.
248251
conn, err := grpc.NewClient(target,
249252
grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithNoProxy())
250253
if err != nil {

e2e/clients/java/src/main/java/io/plug/e2e/Client.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// language's NATURAL driver. Invoked (under plug) as:
33
// java -jar /app/client.jar <proto> <host:port>
44
//
5-
// http goes through java.net.http.HttpClient; every other protocol is a raw-TCP
6-
// driver. plug sets JAVA_TOOL_OPTIONS=-DsocksProxyHost=... -DsocksProxyPort=...
7-
// so the JVM routes all TCP through plug's SOCKS proxy automatically — this code
8-
// does NOT configure any proxy, it just connects to <host:port> by name.
5+
// Every protocol just connects to <host:port> by name and lets the driver do its
6+
// thing: no proxy, no hook, no config. plug captures at the IP layer through its
7+
// userspace TUN, so the JVM's socket is never touched and each driver reaches the
8+
// cluster service by name uniformly.
99
//
1010
// Prints "E2E-OK <proto> — …" and exits 0 on success, or
1111
// "E2E-FAIL <proto> <error>" and exits 1 on failure. A bash harness greps these.

e2e/clients/node/client.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// the language's NATURAL driver. Invoked (under plug) as:
33
// node /app/client.js <proto> <host:port>
44
//
5-
// http goes through Node's built-in `http` module (http.get resolves through
6-
// libc, which plug's hook covers — do NOT use fetch/undici, it ignores proxy
7-
// env); every other protocol is a raw-TCP driver → it exercises the seccomp
8-
// supervisor. Prints "E2E-OK <proto> — …" and exits 0 on success, otherwise
9-
// prints "E2E-FAIL <proto> <error>" and exits non-zero.
5+
// Every protocol just connects to <host:port> by name and lets the driver do its
6+
// thing: no proxy, no hook, no config. plug captures at the IP layer through its
7+
// userspace TUN, so the app's socket is never touched and each driver reaches the
8+
// cluster service by name uniformly. Prints "E2E-OK <proto> — …" and exits 0 on
9+
// success, otherwise prints "E2E-FAIL <proto> <error>" and exits non-zero.
1010

1111
'use strict';
1212

e2e/clients/python/client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
# The Python e2e client: reach a cluster service BY NAME, by protocol, using the
33
# language's NATURAL driver. Invoked (under plug) as: python client.py <proto> <host:port>
44
#
5-
# http goes through requests / urllib3 (honors HTTP_PROXY -> exercises the proxy
6-
# path); every other protocol is a raw-TCP driver (no proxy honoring) -> it
7-
# exercises the seccomp supervisor. Prints "E2E-OK <proto> - ..." and exits 0 on
5+
# Every protocol just connects to <host:port> by name and lets the driver do its
6+
# thing: no proxy, no hook, no config. plug captures at the IP layer through its
7+
# userspace TUN, so the app's socket is never touched and each driver reaches the
8+
# cluster service by name uniformly. Prints "E2E-OK <proto> - ..." and exits 0 on
89
# success, "E2E-FAIL <proto> <error>" and exits 1 on failure.
910
import sys
1011
import time

e2e/compose.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ services:
7474
networks: [internal]
7575

7676
# ---- language clients (run on demand: `<proto> <host:port>` as args) ----
77-
# Each runs its command UNDER plug against the cluster service by name. The
78-
# seccomp flags are only needed INSIDE a container (a real host needs neither);
79-
# they let plug's Go-coverage supervisor install a user-notifier + read its child.
77+
# Each runs its command UNDER plug against the cluster service by name. plug
78+
# captures at the IP layer through its userspace TUN, so the client reaches the
79+
# service by its natural driver — no proxy, no hook. The caps/devices below are
80+
# only needed INSIDE a container (a real host needs none): NET_ADMIN + SYS_ADMIN
81+
# + /dev/net/tun let plug create the TUN, set routes, and repoint DNS.
8082
client-go:
8183
build: { context: ., dockerfile: clients/go/Dockerfile }
8284
networks: [edge]

0 commit comments

Comments
 (0)