File tree Expand file tree Collapse file tree
java/src/main/java/io/plug/e2e Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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.
79package main
810
911import (
@@ -244,7 +246,8 @@ func doMQTT(target string) {
244246}
245247
246248func 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 {
Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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.
910import sys
1011import time
Original file line number Diff line number Diff 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]
You can’t perform that action at this time.
0 commit comments