Skip to content

Conversation

lixmal
Copy link
Collaborator

@lixmal lixmal commented Oct 6, 2025

Describe your changes

This eliminates TLS, TCP and any server name mismatches

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 14:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the WebSocket proxy implementation to handle gRPC connections internally through HTTP/2 instead of proxying to external TCP endpoints. This eliminates the need for TLS, TCP connections, and server name mismatches by using in-memory pipes and direct gRPC handler integration.

  • Replaced TCP connection handling with in-memory pipe connections
  • Updated the proxy to accept gRPC handlers directly instead of TCP addresses
  • Simplified connection management and error handling logic

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
util/wsproxy/server/proxy.go Core refactor replacing TCP-based proxying with direct gRPC handler integration via HTTP/2
signal/cmd/run.go Updated to pass gRPC server instance instead of TCP address to websocket proxy
management/internals/server/server.go Updated to pass gRPC handler instead of TCP address to websocket proxy
client/grpc/dialer.go Simplified TLS handling for JavaScript runtime by removing InsecureSkipVerify option

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lixmal lixmal requested a review from Copilot October 6, 2025 14:56
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

sonarqubecloud bot commented Oct 6, 2025

@lixmal lixmal merged commit 954f409 into main Oct 6, 2025
59 of 60 checks passed
@lixmal lixmal deleted the ws-proxy-internal-grpc branch October 6, 2025 19:22
lixmal added a commit that referenced this pull request Oct 7, 2025
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.

2 participants