Skip to content

Add Custom Clients and Servers#175

Merged
aler9 merged 8 commits intobluenviron:mainfrom
Phillezi:custom-client-server
Oct 16, 2025
Merged

Add Custom Clients and Servers#175
aler9 merged 8 commits intobluenviron:mainfrom
Phillezi:custom-client-server

Conversation

@Phillezi
Copy link
Copy Markdown
Contributor

@Phillezi Phillezi commented Apr 6, 2025

Add Custom Clients and Servers making TCP/TLS and UDP/DTLS possible

Added the ability to create custom clients and servers that conform to returning net.Listener and net.Conn. This is a useful feature for implementing custom TLS and DTLS communication without requiring external dependencies in this library.

Why would someone want this:

  • Customizability: By allowing the creation of custom clients and servers, users of the library can implement custom protocols and are not limited to the TCP and UDP client and server implementations.
  • TLS with TCP: This feature allows implementing TLS on top of TCP without the library getting bloated by relying on external dependencies.
  • DTLS with UDP: It also makes it possible to implement TLS for UDP by using DTLS, tested using the Pion DTLS library.

Example Usage:

I added an example implementation of a server and client that uses TCP/TLS in the examples/ dir,

Let me know if you would like any changes made : )

@aler9 aler9 force-pushed the custom-client-server branch from 3c0b600 to f896d87 Compare October 16, 2025 12:36
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 25.75758% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.95%. Comparing base (6c20857) to head (bdd40a8).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
endpoint_client.go 27.77% 25 Missing and 1 partial ⚠️
endpoint_server.go 23.33% 23 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
- Coverage   81.46%   80.95%   -0.52%     
==========================================
  Files         705      705              
  Lines        8266     8312      +46     
==========================================
- Hits         6734     6729       -5     
- Misses        917      967      +50     
- Partials      615      616       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aler9
Copy link
Copy Markdown
Member

aler9 commented Oct 16, 2025

This looks good, furthermore i think it can entirely replace the former EndpointCustom and be used as parent for serial and broadcast endpoints. Merged, thanks!

@aler9 aler9 merged commit 69942f0 into bluenviron:main Oct 16, 2025
4 of 6 checks passed
@bluenviron bluenviron locked and limited conversation to collaborators Apr 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants