Skip to content

Conversation

@matheusfrancisco
Copy link
Contributor

@matheusfrancisco matheusfrancisco commented Dec 18, 2025

📝 Description

Technical Details

  • Server: HTTP server on configurable listen address
  • Protocol: Forwards raw HTTP requests via gRPC to agents
  • Response handling: Parses HTTP responses and forwards headers/body
  • Error handling: Graceful degradation with proper HTTP error codes

This PR introduces the HTTP proxy on the gateway.
Features

  • Token-based authentication
  • Header: Proxy-Token:
  • Cookie: hoop_proxy_token (set via URL path)

URL path: / or //path for initial browser auth

  • Session management
  • Reuses gRPC sessions per token
  • Validates credentials from database
  • Token expiration and user token polling
  • Session cleanup on expiration/shutdown

Browser support

  • Cookie-based auth after initial token visit
  • Automatic redirect handling
  • Works with standard browsers

Concurrency

  • Channel buffering (size 10) to reduce blocking
  • Send/receive timeouts (30s send, 2min receive)
  • Non-blocking response handling
  • Multiple concurrent requests per session

URL rewriting

  • Passes proxy_base_url to agent for redirect rewriting
  • Supports HTTP/HTTPS based on TLS config

🔗 Related Issue

Fixes #

🚀 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/UI update
  • ♻️ Code refactor
  • ⚡ Performance improvement
  • ✅ Test update
  • 🔧 Build configuration change
  • 🧹 Chore

📋 Changes Made

  • add: http proxy on gateway

🧪 Testing

Test Configuration:

  • Browser(s):
  • OS:

Tests performed:

  • Unit tests pass
  • Integration tests pass
  • Manual testing completed

📸 Screenshots (if applicable)

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

📄 Additional Notes


@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-5ea2bb4

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-f9b7ede

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-4a4fe28

@matheusfrancisco matheusfrancisco marked this pull request as ready for review December 19, 2025 11:35
@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-22a7163

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-7060482

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-b2f785f

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-af57fc6

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-ffd4c06

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-cba4922

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-d39d430

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1204.0.0-a410f85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants