Package app.ductape.sdk.cloud
Class VpcConnectorTunnelClient
java.lang.Object
app.ductape.sdk.cloud.VpcConnectorTunnelClient
Opens a TCP-over-WebSocket tunnel to a private VPC host via the Ductape VPC connector relay,
then exposes it as a loopback-only local TCP proxy so any plain JDBC driver (which has no
custom-stream hook, unlike
pg's Pool on the TS side) can connect to it as if it
were an ordinary local socket.
Speaks the exact JSON handshake/framing protocol used by
sdk/ts/src/cloud/vpc-connector-tunnel.client.ts so the existing backend relay (shared,
language-agnostic) needs no changes: stream_open → stream_opened/
stream_error, then stream_data/stream_close with base64-encoded payloads
correlated by stream_id.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classLive tunnel handle: astream_id-correlated WebSocket session plus the local loopback TCP proxy that relays bytes to/from it.static final recordTarget VPC-private TCP endpoint to relay to, plus the cloud connection tag authorizing it. -
Method Summary
Modifier and TypeMethodDescriptionopen(VpcConnectorTunnelClient.VpcConnectorTunnelTarget target, EnvType environment, RequestContext auth) Opens the relay WebSocket and performs thestream_open→stream_openedhandshake.open(VpcConnectorTunnelClient.VpcConnectorTunnelTarget target, EnvType environment, RequestContext auth, Duration timeout)
-
Method Details
-
open
public static VpcConnectorTunnelClient.VpcConnectorTunnelHandle open(VpcConnectorTunnelClient.VpcConnectorTunnelTarget target, EnvType environment, RequestContext auth) Opens the relay WebSocket and performs thestream_open→stream_openedhandshake. Mirrors TSopenVpcConnectorTunnelStream. -
open
public static VpcConnectorTunnelClient.VpcConnectorTunnelHandle open(VpcConnectorTunnelClient.VpcConnectorTunnelTarget target, EnvType environment, RequestContext auth, Duration timeout)
-