GitLab Tunnel
A gRPC-based reverse tunnel implementation, mostly intended
for the GitLab Agent for Kubernetes project.
Overview
This project provides a gRPC-based reverse tunnel system that allows clients
to establish secure connections back to GitLab instances (KAS).
- Routing from server to proper client
- Bidirectional streaming communication
Architecture
The system consists of two main components:
- Tunnel Server (
tunserver/): Handles incoming client connections and
routes requests to appropriate gateways
(the server with the open connection to the client).
- Tunnel Client (
tunclient/): Manages connections from agents to the
tunnel server
Development
Prerequisites
Or use mise to automatically install the correct versions:
mise install
Testing
# Run all tests
make test
Code Generation
The project uses Protocol Buffers and generated mocks:
# Generate protos code and mocks
make generate
# Generate only protos
make protos
# Generate only mocks
make mocks
# Run linters
make lint
# Format code and fix linting issues
make fmt
License
MIT License - see LICENSE for details.