feat: Multi-target LAN routing (Cloudflare Tunnel-style)#15
Open
feat: Multi-target LAN routing (Cloudflare Tunnel-style)#15
Conversation
Design for evolving GiraffeCloud from one-CLI-one-tunnel to Cloudflare Tunnel-style multi-target LAN routing. One CLI instance serves all user tunnels, each mapping a domain to a target_host:port in the local network. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20-task plan across 5 chunks: DB/API layer, Protocol/gRPC server, CLI changes, Frontend changes, and Documentation. Covers all changes from the approved design spec. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Authentication now uses only the user's API token from the tokens table. The per-tunnel token field has been removed from the Ent schema, repository, service, interface, DTO, mapper, and the Ent-generated code was regenerated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…error handling - Replace parallel Domains/TunnelIDs slices with single DomainMappings slice of structs to prevent index desynchronization bugs (C1/C2/C3) - Use net.SplitHostPort for IPv6-safe port stripping in resolveTargetAddr (I2) - Add warning log for hardcoded localhost:8080 fallback in resolveTargetAddr (I1) - Add error handling for GetByUserID calls in config push paths (I6) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
target_host:target_portin the local network (e.g.,app.example.com → 192.168.1.5:8080)giraffecloud connect— no--domainflag needed, serves everythingChanges
Database & API
target_hostfield to Tunnel schema (default:localhost) with composite unique index on(user_id, target_host, target_port)tokenfield (auth uses API tokens only now)Protocol & gRPC Server
TunnelRouteConfig,ConfigUpdate,ConfigUpdateReasonEstablishTunnelregisters one gRPC stream for ALL user domainsControlChanneluses token-based lookup viauserStreamsmapPushConfigUpdatepushes live config changes when tunnels are created/updated/deletedCLI
RouteTablemaps domains to LAN targetsConnect()simplified — just token, no domain/port--domainflag removedFrontend
host:porttargetDocs
Test plan
giraffecloud connect— verify all tunnels served🤖 Generated with Claude Code