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

port range #129

Closed
ddbxyrj opened this issue Mar 16, 2020 · 5 comments
Closed

port range #129

ddbxyrj opened this issue Mar 16, 2020 · 5 comments

Comments

@ddbxyrj
Copy link

ddbxyrj commented Mar 16, 2020

port range feature will be so nice if consider server is behand firwall. Do you will consider add this fearture? thank you
Ps the project is so good. By mixing variable technology tools, golang can finnaly bulid an webrtc engine, and mybe do extruct some ideas to build another net streamming commication structure.

@Sean-Der
Copy link
Member

Hey @ddbxyrj thanks for the kind words :)

This is possible today!

Copy this file. Then in AllocatePacketConn pick a random port in the range you have chosen.

This could also be something we should add to the examples folder! Or maybe we should add a dedicated RelayAddressGeneratorPortRange that allows people to just use one in-tree.

@ddbxyrj
Copy link
Author

ddbxyrj commented Mar 17, 2020

thank you!

@ddbxyrj ddbxyrj closed this as completed Mar 17, 2020
@ddbxyrj ddbxyrj reopened this Mar 17, 2020
@ddbxyrj
Copy link
Author

ddbxyrj commented Mar 17, 2020

I hanv an question. Turn server Allocate replay port can be reused for other client? or juset one port for an allocation at survival time window. If I relay a random there, I guess the port can't be recycle:)

@ddbxyrj
Copy link
Author

ddbxyrj commented Mar 18, 2020

maybe just now we can give a ramdon port and if the port is using we ramdon again. nice try but not precise enough

@Sean-Der
Copy link
Member

Closed by 73942c3

RelayAddressGenerator is a new generator that handles all the port handling for you :)

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 a pull request may close this issue.

2 participants