Skip to content

Draft ICE#23

Merged
xinze-zheng merged 8 commits intomainfrom
feat/stun
Nov 14, 2025
Merged

Draft ICE#23
xinze-zheng merged 8 commits intomainfrom
feat/stun

Conversation

@xinze-zheng
Copy link
Copy Markdown
Member

Description

This is a draft for TURN STUN sidecar for ION. I'm hoping to have some feedbacks before proceeding.

  • Implements STUN-only (not TCP support) and STUN-TURN service
  • ice/config.go implements logic to parse an endoint to one of (stun|turn|stun-turn). This allows sidecar to run corresponding services.
  • Lots of unit tests and integration tests with clients.

TODO

  • TURN-only service using allocaiton callback.
  • Metrics
  • Quota
  • Dockerfile
  • More integration test

Reference issue

Fixes #20 #21

@xinze-zheng xinze-zheng requested a review from JoTurk November 2, 2025 22:07
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 2, 2025

Codecov Report

❌ Patch coverage is 82.17213% with 87 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@12fdb27). Learn more about missing BASE report.

Files with missing lines Patch % Lines
cmd/ice/main.go 65.71% 61 Missing and 11 partials ⚠️
internal/ice/config.go 92.57% 8 Missing and 7 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #23   +/-   ##
=======================================
  Coverage        ?   84.69%           
=======================================
  Files           ?       11           
  Lines           ?      882           
  Branches        ?        0           
=======================================
  Hits            ?      747           
  Misses          ?      114           
  Partials        ?       21           
Flag Coverage Δ
go 84.69% <82.17%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Copy link
Copy Markdown
Member

@JoTurk JoTurk left a comment

Choose a reason for hiding this comment

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

Overall great draft that we can work on. I would like to see / add:

  1. RFC 7064/7065 addresses for turn / stun settings.
  2. /healthz + metrics.
  3. clear IPv6 support.
  4. more coverage.
    But this is a good base that we can work on, after you merge our PR i'm going to add few PRs to add some features on top of it.
    Really great work, thank you..

Comment thread cmd/ice/main.go Outdated

tlsLn := tls.NewListener(baseLn, &tls.Config{
Certificates: []tls.Certificate{cert},
MinVersion: tls.VersionTLS12,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: I would like to be able to configure TLS versions.

Comment thread cmd/ice/main.go Outdated
// makeRelay returns the RelayAddressGenerator for configuration.
func makeRelay(cfg ionICE.TURNConfig) turn.RelayAddressGenerator {
return &turn.RelayAddressGeneratorPortRange{
Address: "0.0.0.0",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should be able to configure the relay address.

@xinze-zheng xinze-zheng marked this pull request as ready for review November 13, 2025 06:15
@xinze-zheng
Copy link
Copy Markdown
Member Author

Configs now calls a validation check for valid fields, endpoint, non empty fields, etc. during load.

@xinze-zheng xinze-zheng merged commit 7f7f7f2 into main Nov 14, 2025
17 checks passed
@xinze-zheng xinze-zheng deleted the feat/stun branch November 14, 2025 05:31
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.

Add TURN sidecar service

2 participants