Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-aware relay address generator #421

Closed
wants to merge 1 commit into from
Closed

User-aware relay address generator #421

wants to merge 1 commit into from

Conversation

enobufs
Copy link
Member

@enobufs enobufs commented Nov 18, 2024

Resolves #420

Description

Details of this feature are described in #420.
This PR make following changes:

  • Adds AllocatePacketConnForUser and AllocateConnForUser methods to RelayAddressGenerator interfaces
    • These methods deprecates AllocatePacketConn and AllocateConn respectively.
  • Changes to internal packages:
    • NewAllocation
    • ManagerConfig
    • CreateAllocation
    • authenticateRequest - to pass "username" to CreateAllocation method

Reference issue

Fixes #420

@enobufs enobufs self-assigned this Nov 18, 2024
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 36.63366% with 64 lines in your changes missing coverage. Please review.

Project coverage is 65.64%. Comparing base (3ff9392) to head (6e85c3f).

Files with missing lines Patch % Lines
relay_address_generator_range.go 0.00% 26 Missing ⚠️
relay_address_generator_static.go 0.00% 14 Missing ⚠️
relay_address_generator_none.go 0.00% 8 Missing ⚠️
internal/server/util.go 45.45% 6 Missing ⚠️
internal/allocation/allocation_manager.go 82.75% 4 Missing and 1 partial ⚠️
server.go 0.00% 4 Missing ⚠️
internal/server/turn.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #421      +/-   ##
==========================================
- Coverage   66.63%   65.64%   -0.99%     
==========================================
  Files          43       43              
  Lines        2919     2995      +76     
==========================================
+ Hits         1945     1966      +21     
- Misses        807      861      +54     
- Partials      167      168       +1     
Flag Coverage Δ
go 65.64% <36.63%> (-0.99%) ⬇️
wasm 26.47% <1.98%> (-0.66%) ⬇️

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.

@enobufs
Copy link
Member Author

enobufs commented Nov 18, 2024

I hoped not to make breaking change but I have to touch the public interface, a breaking change is unavoidable. I will make the change simpler.

@enobufs enobufs closed this Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow per-user TURN relay allocation
1 participant