All posts

The Simplest Way to Make Cloud Run TCP Proxies Work Like It Should

Your container starts fine, traffic flows, but everything breaks when you need to expose a non-HTTP port. Cloud Run looks at you like, “Sorry, we only speak HTTP and HTTPS.” That’s when the question hits: how do you proxy raw TCP to a Cloud Run service without turning your network into spaghetti? Cloud Run TCP Proxies let you route arbitrary TCP connections—think databases, game servers, SSH bridges—through Cloud Run without hacking around the platform’s HTTP-centric design. Instead of duct-tap

Free White Paper

End-to-End Encryption + Sarbanes-Oxley (SOX) IT Controls: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

Your container starts fine, traffic flows, but everything breaks when you need to expose a non-HTTP port. Cloud Run looks at you like, “Sorry, we only speak HTTP and HTTPS.” That’s when the question hits: how do you proxy raw TCP to a Cloud Run service without turning your network into spaghetti?

Cloud Run TCP Proxies let you route arbitrary TCP connections—think databases, game servers, SSH bridges—through Cloud Run without hacking around the platform’s HTTP-centric design. Instead of duct-taping a VM or fiddling with reverse tunnels, you place a TCP proxy in front of your service. It receives connections, wraps them with identity-aware access, and forwards them to the right container instance. Elegant. Controlled. SOC 2-approved if you do it right.

The proxy pattern here matters because Cloud Run scales containers based on HTTP requests. For protocols that maintain persistent connections, you need a middle agent to translate behavior. The TCP proxy holds that line. It uses Envoy-style listeners to accept traffic and routes packets through secure tunnels managed by your identity layer—OIDC, Okta, or AWS IAM—so users never see naked ports again. You get ephemeral compute, encrypted sessions, and zero trust automatically applied.

Picture the flow:

  1. A developer connects from an internal tool or CLI.
  2. The connection hits a Cloud Run TCP Proxy.
  3. Authentication validates identity and roles before any packet reaches a container.
  4. The proxy streams data bi-directionally through Cloud Run’s runtime to your target service.
  5. Logs, metrics, and access rules get captured per session.

Featured Answer: You can use Cloud Run TCP Proxies to securely expose non-HTTP workloads by deploying a lightweight proxy service that handles authentication and tunnels TCP traffic to your container, providing audit-ready access without custom infrastructure.

Best practices keep this sane: limit concurrent sessions, rotate service accounts often, and treat proxy definitions like infrastructure code. Avoid long-lived credentials; use short-lived tokens from your identity provider. If you cache anything, cache decisions, not secrets.

Continue reading? Get the full guide.

End-to-End Encryption + Sarbanes-Oxley (SOX) IT Controls: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

Benefits show up fast:

  • Instant scale-out for single-port apps without VM maintenance.
  • Unified authentication across HTTP and TCP endpoints.
  • Clean audit trails built into Cloud Run logging.
  • Reduced attack surface, no direct port exposure.
  • Easier policy enforcement and rollback.

For developers, this means fewer context switches. You connect through one logical endpoint, develop faster, and waste less time juggling firewalls. Debugging feels sane. Authentication flows are predictable. More work happens in minutes rather than approvals that linger for hours.

Platforms like hoop.dev turn those access rules into guardrails that enforce policy automatically. Instead of manually wiring identity-aware TCP proxies, you define who can reach what, and hoop.dev builds the secure channel. It’s cloud-native zero trust that actually respects your weekend.

As AI-assisted ops tools join the mix, Cloud Run TCP Proxies give them structured access control. Agents can be granted scoped, ephemeral sessions to inspect metrics or apply patches, all without violating least privilege. The proxy becomes a gatekeeper for machine and human alike.

How do I connect Cloud Run TCP Proxies to my identity provider?
Use OIDC or OAuth-based identity verification. Configure your proxy with a client ID and secret from your provider, so sessions automatically inherit user roles. That bridges Cloud Run services with your existing corporate identity model.

What are safer alternatives to self-hosted TCP forwarding?
Managed proxy layers like Cloud Run TCP Proxies reduce risk by abstracting away port management and encryption. You keep full control of identity without exposing underlying VMs or persistent sockets.

Cloud Run TCP Proxies make your stack cleaner, safer, and easier to explain during audits. Replace the makeshift port-forwarding scripts with a policy-driven gateway built for the real cloud.

See an Environment Agnostic Identity-Aware Proxy in action with hoop.dev. Deploy it, connect your identity provider, and watch it protect your endpoints everywhere—live in minutes.

Get started

See hoop.dev in action

One gateway for every database, container, and AI agent. Deploy in minutes.

Get a demoMore posts