Skip to content

add support for connect from atenet (envoy) to atunnel - #2531

Merged
Bowei Du (bowei) merged 3 commits into
agent-substrate:mainfrom
LiorLieberman:upstream-connect
Oct 13, 2026
Merged

Bowei Du (bowei) merged 3 commits into
agent-substrate:mainfrom
LiorLieberman:upstream-connect

Conversation

@LiorLieberman

@LiorLieberman Lior Lieberman (LiorLieberman) commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator
  • Adds --upstream-connect (default off). The Envoy router sends actor traffic through mTLS CONNECT tunnels to atunnel's 8443 listener. The :443 (non connect) path is unchanged.
  • Tunnels are per worker, actor and port, and reused across requests. gRPC goes over HTTP/2, everything else over HTTP/1.1.
  • atunnel now closes a tunnel when the actor closes its connection, so a reused tunnel can't swallow the next request.
  • With the flag on, atunnel's 421 and 502 reach clients as 503.
  • A follow-up PR will make CONNECT the default.

Fixes #1309

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

  • Tests pass
  • Appropriate changes to documentation are included in the PR

@LiorLieberman Lior Lieberman (LiorLieberman) changed the title Upstream connect add support for connect from atenet (envoy) to atunnel Oct 12, 2026
@bowei Bowei Du (bowei) self-assigned this Oct 12, 2026
@bowei
Bowei Du (bowei) added this pull request to the merge queue Oct 13, 2026
Merged via the queue into agent-substrate:main with commit da35a98 Oct 13, 2026
14 checks passed
Luiz Oliveira (laoj2) pushed a commit to laoj2/substrate that referenced this pull request Oct 14, 2026
…gent-substrate#2618)

- Follow-up to agent-substrate#2531: --upstream-connect now defaults to true, so the
Envoy router reaches atunnel through mTLS CONNECT tunnels on 8443.
--upstream-connect=false goes back to HTTPS on 443.
- An empty --upstream-credential-bundle now needs
--upstream-connect=false, and the startup error says so. The check only
applies to the Envoy ingress router; the egress gateway and agentgateway
don't use the flag (agentgateway always uses CONNECT).
- Split xDS server setup out of startEnvoyDataplane so a new test can
parse real flags and check the built snapshot for both settings.
- The e2e gRPC downgrade test now expects only gRPC Unavailable, so it
fails if the router falls back to the HTTPS path.
- Updated architecture.md, threat-model.md and the router manifest
comment.

Related: agent-substrate#1208 
> It's a good idea to open an issue first for discussion.

- [x] Tests pass
- [x] Appropriate changes to documentation are included in the PR
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.

Add support for CONNECT from atenet ingress to atunnel

2 participants