pico

created pr with pico/pgs-ssh-proxy.1 on 2026-11-27T14:17:47Z · by c8ef7d19
added pico/pgs-ssh-proxy.2 on 2026-11-27T14:20:09Z · by c8ef7d19
1: b200a43 = 1: b200a43 feat(pgs): ability to proxy ssh conns to a separate service
-: ------- > 2: 667f0fc refactor(pssh): remove the handled bool
cmds
checkout latest patchset:
ssh pr.pico.sh pull pico:pgs-ssh-proxy | git am -3
checkout specific patchset revision:
ssh pr.pico.sh pull pico:pgs-ssh-proxy [rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pico:pgs-ssh-proxy
add comment to patch request:
ssh pr.pico.sh comment pico:pgs-ssh-proxy "lgtm!"

Patchset pico/pgs-ssh-proxy.2 on 2026-11-27T14:20:09Z · commit 667f0fc

refactor(pssh): remove the handled bool
Eric Bower 2026-11-27T14:19:23Z
We can extend the RawConnHandler to support a fallthrough mechanism later when
we actually need it.
Diff stat
pkg/apps/pgs/ssh.go | 10 +++++-----
pkg/pssh/server.go | 5 +----
2 files changed, 6 insertions(+), 9 deletions(-)
Semantic diff summary
0 added, 1 modified, 1 signature changed, 0 removed across 2 analyzed files
+5 -5 pkg/apps/pgs/ssh.go #
......@@ -121,12 +121,12 @@ func StartSshServer(cfg *Config, killCh chan error) {
121121 }
122122 }
123123
124-func createRawProxyHandler(targetAddr string) func(context.Context, net.Conn) (bool, error) {
125- return func(ctx context.Context, client net.Conn) (bool, error) {
124+func createRawProxyHandler(targetAddr string) func(context.Context, net.Conn) error {
125+ return func(ctx context.Context, client net.Conn) error {
126126 dialer := &net.Dialer{Timeout: 10 * time.Second}
127127 upstream, err := dialer.DialContext(ctx, "tcp", targetAddr)
128128 if err != nil {
129- return true, err
129+ return err
130130 }
131131
132132 defer func() {
......@@ -145,8 +145,8 @@ func createRawProxyHandler(targetAddr string) func(context.Context, net.Conn) (b
145145
146146 err = <-errCh
147147 if errors.Is(err, io.EOF) {
148- return true, nil
148+ return nil
149149 }
150- return true, err
150+ return err
151151 }
152152 }
+1 -4 pkg/pssh/server.go #
......@@ -723,10 +723,7 @@ func (s *SSHServer) HandleConn(conn net.Conn) error {
723723 }()
724724
725725 if s.Config.RawConnHandler != nil {
726- handled, err := s.Config.RawConnHandler(s.Ctx, conn)
727- if handled {
728- return err
729- }
726+ return s.Config.RawConnHandler(s.Ctx, conn)
730727 }
731728
732729 timeout := s.Config.HandshakeTimeout
Back to top