Skip to content

e2e: cover egress for non-HTTP traffic, in both speaking orders - #1024

Open
haiyanmeng wants to merge 1 commit into
agent-substrate:mainfrom
haiyanmeng:e2e-test-non-http
Open

e2e: cover egress for non-HTTP traffic, in both speaking orders#1024
haiyanmeng wants to merge 1 commit into
agent-substrate:mainfrom
haiyanmeng:e2e-test-non-http

Conversation

@haiyanmeng

@haiyanmeng haiyanmeng commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

This PR adds e2e test coverage for non-HTTP traffic, in both speaking orders. It adds the following:

  • /tcp on the egress demo opens a raw TCP connection and reads before it writes,
    so an empty banner really does mean the peer stayed silent rather than that the
    probe got the ordering wrong.
  • bannerserver is an in-cluster TCP origin that greets on accept and then echoes.
  • bannerserver is an in-cluster TCP origin that echoes on two ports:
    on one it greets on accept, on the other it stays silent until
    spoken to. Two ports, because the server has to decide whether to
    greet before it has read anything, so nothing in the request could
    select the behavior -- only the address dialed can.
  • TestActorEgressRawTCP dials both ports through one Actor and
    requires, per port, both the CONNECT record and the byte counters on
    the gateway's close-time access log, which is what shows the gateway
    relayed the payload rather than the Actor having reached the origin
    some other way.
  • TestActorEgressSSH is the same probe against github.com:22.

Addresses #1017

It's a good idea to open an issue first for discussion.

  • Tests pass

@haiyanmeng
haiyanmeng marked this pull request as draft August 17, 2026 21:58
@haiyanmeng
haiyanmeng force-pushed the e2e-test-non-http branch 2 times, most recently from 7c94ebc to 8a30696 Compare August 17, 2026 23:32
@haiyanmeng
haiyanmeng marked this pull request as ready for review August 17, 2026 23:48
@bowei

Copy link
Copy Markdown
Collaborator

This is great, do we also need "client speaks first" non-HTTP protocol test case (do we have that already?).
You could do it in the same test -- have server bind two ports, one where client is sending request first, the other port where server sends first...

@haiyanmeng haiyanmeng changed the title e2e: cover egress for non-HTTP, server-speaks-first traffic e2e: cover egress for non-HTTP traffic, in both speaking orders Aug 18, 2026
TestActorEgress and TestActorEgressHTTPS both have the client send the
first bytes, so neither notices an egress path that waits for downstream
data before dialing upstream, or that inspects those first bytes to
route. SSH does not work that way: the server announces itself on
accept.

Add that shape to the egress demo and the networking suite:

  - /tcp on the egress demo opens a raw TCP connection and reads before
    it writes, so an empty banner really does mean the peer stayed
    silent rather than that the probe got the ordering wrong.
  - bannerserver is an in-cluster TCP origin that echoes on two ports:
    on one it greets on accept, on the other it stays silent until
    spoken to. Two ports, because the server has to decide whether to
    greet before it has read anything, so nothing in the request could
    select the behavior -- only the address dialed can.
  - TestActorEgressRawTCP dials both ports through one Actor and
    requires, per port, both the CONNECT record and the byte counters on
    the gateway's close-time access log, which is what shows the gateway
    relayed the payload rather than the Actor having reached the origin
    some other way.
  - TestActorEgressSSH is the same probe against github.com:22.
@haiyanmeng

Copy link
Copy Markdown
Collaborator Author

do we also need "client speaks first" non-HTTP protocol test case (do we have that already?).
You could do it in the same test -- have server bind two ports, one where client is sending request first, the other port where server sends first...

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants