rough changes for ssh to work with latest envoy-custom from main

This commit is contained in:
Joe Kralicky 2025-06-17 15:44:12 +00:00
parent 4e6aa84ca4
commit b5e70f7a6a
No known key found for this signature in database
GPG key ID: 75C4875F34A9FB79
6 changed files with 40 additions and 46 deletions

View file

@ -4,6 +4,7 @@ import (
"bytes"
"crypto/ed25519"
"errors"
"fmt"
"io"
"net"
"strings"
@ -20,6 +21,7 @@ import (
"github.com/pomerium/pomerium/internal/testenv/scenarios"
"github.com/pomerium/pomerium/internal/testenv/snippets"
"github.com/pomerium/pomerium/internal/testenv/upstreams"
"github.com/pomerium/pomerium/internal/testenv/values"
)
func TestSSH(t *testing.T) {
@ -65,7 +67,9 @@ func TestSSH(t *testing.T) {
)
up.SetServerConnCallback(echoShell{t}.handleConnection)
r := up.Route().
From(env.SubdomainURLWithScheme("example", "ssh")).
From(values.Bind(env.Ports().ProxySSH, func(port int) string {
return fmt.Sprintf("ssh://example:%d", port)
})).
Policy(func(p *config.Policy) { p.AllowAnyAuthenticatedUser = true })
env.AddUpstream(up)
env.Start()
@ -121,7 +125,9 @@ func TestSSH_JumpHostMode(t *testing.T) {
)
up.SetServerConnCallback(echoShell{t}.handleConnection)
r := up.Route().
From(env.SubdomainURLWithScheme("example", "ssh")).
From(values.Bind(env.Ports().ProxySSH, func(port int) string {
return fmt.Sprintf("ssh://example:%d", port)
})).
Policy(func(p *config.Policy) { p.AllowAnyAuthenticatedUser = true })
env.AddUpstream(up)
env.Start()