)]}'
{
  "commit": "e84d5c7972cb24586842473e62668ca9c689d6d2",
  "tree": "8ac4a2c314ccf13b0653e34aa5b9376a4f6abdd9",
  "parents": [
    "7871e2fd09acf3790cc292d955cdd8fee86f2fdb"
  ],
  "author": {
    "name": "Philip Zeyliger",
    "email": "philip@bold.dev",
    "time": "Fri May 30 09:32:55 2025 -0700"
  },
  "committer": {
    "name": "Philip Zeyliger",
    "email": "philip@bold.dev",
    "time": "Fri May 30 09:33:30 2025 -0700"
  },
  "message": "loop/server: enable SSH reverse port forwarding\n\n~~~~\n\nvibe-coded but tested manually with\n\n\t$python3 -mhttp.server 8000 \u0026\n\t[1] 25986\n\tServing HTTP on :: port 8000 (http://[::]:8000/) ...\n\n\t$ssh -R 8000:localhost:8000 sketch-241k-9zzx-gcbc-k4fs curl --silent http://localhost:8000/ | head -n 3\n\t::1 - - [30/May/2025 09:32:44] \"GET / HTTP/1.1\" 200 -\n\t\u003c!DOCTYPE HTML\u003e\n\t\u003chtml lang\u003d\"en\"\u003e\n\t\u003chead\u003e\n\n~~~~\n\nImplement ReversePortForwardingCallback in SSH server configuration to\nallow reverse port forwarding connections from clients.\n\nChanges include:\n\n1. SSH Server Configuration Enhancement:\n   - Added ReversePortForwardingCallback to ssh.Server struct\n   - Callback allows all reverse port forwarding requests (returns true)\n   - Consistent with existing LocalPortForwardingCallback behavior\n   - Includes debug logging for reverse forwarding requests\n\nTechnical Implementation:\n\nThe SSH server already had the necessary infrastructure for port forwarding:\n- ForwardedTCPHandler for handling forwarding requests\n- RequestHandlers for \u0027tcpip-forward\u0027 and \u0027cancel-tcpip-forward\u0027\n- LocalPortForwardingCallback for client-to-server forwarding\n\nThis change adds the missing ReversePortForwardingCallback that enables\nserver-to-client port forwarding (reverse tunneling). The callback follows\nthe same permissive pattern as the local forwarding callback, allowing\nall reverse forwarding requests while logging them for debugging.\n\nWithout this callback, the SSH library defaults to denying all reverse\nport forwarding requests, preventing clients from establishing reverse\ntunnels through the SSH connection.\n\nBenefits:\n- Enables full bidirectional port forwarding capabilities\n- Maintains consistent logging and debugging for both forwarding types\n- Follows established patterns in the existing codebase\n- No breaking changes to existing SSH functionality\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: s9bc98f6471e2ec4dk\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "65eb54bb0b5e32b07ad6a9d83e1d783484ce7cd4",
      "old_mode": 33188,
      "old_path": "loop/server/sshserver.go",
      "new_id": "b6c40bf068c69a0e0bc5a902a96d4106b63bd68a",
      "new_mode": 33188,
      "new_path": "loop/server/sshserver.go"
    }
  ]
}
