Closed
Bug 830476
Opened 11 years ago
Closed 11 years ago
patch stun-server to accept public ip addresses on the command line
Categories
(Core :: WebRTC: Networking, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: rillian, Unassigned)
References
Details
(Whiteboard: [WebRTC][qa-])
Attachments
(1 file)
5.12 KB,
patch
|
Details | Diff | Splinter Review |
We're using the stun-server package to run our public stun servers for WebRTC. Since these are running on AWS, then are behind a NAT, and return the internal addresses as candidates. These are on the 10.x.x.x subnet and will usually be culled as unrouted by the ice engine, but we shouldn't advertise them to avoid confusion. This involves patching the stun-server code to accept the public addresses as additional command-line switches and list only those for the Source address entries.
Comment 1•11 years ago
|
||
Hi. A cursory check of the internet yields this: http://www.voip-info.org/wiki/view/Vovida.org+STUN+server http://www.powerpbx.ru/blog/wp-content/uploads/stund.patch I will attempt to patch an epel rpm and see how it goes.
Comment 2•11 years ago
|
||
RPM with patch at: https://people.mozilla.com/~wdawson/stun-server-0.96-4.amzn1.x86_64.rpm I am setting up a box to test this on.
Reporter | ||
Comment 3•11 years ago
|
||
Thanks. Can you please attach the patch? NB :ekr says we don't need the second NAT-characterization IP address for ICE, so you can just map a single public IP to the vm, Avoiding the complexity of a private subnet.
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Ok, getting this from my test box: $ stun-client -v 1 ec2-54-245-6-22.us-west-2.compute.amazonaws.com 1 STUN client version 0.96 running test number 1 running test number 1 Opened port 22814 with fd 3 Encoding stun message: Encoding ChangeRequest: 0 About to send msg of len 28 to 54.245.6.22:3478 Got a response Received stun message: 88 bytes MappedAddress = 63.245.220.240:41305 SourceAddress = 54.245.6.22:3478 ChangedAddress = 0.0.0.0:3479 XorMappedAddress = 63.245.220.240:41305 ServerName = Vovida.org 0.96 ok=1 id=1:160:51:124:166:55:26:0:236:214:243:57:11:68:97:108 mappedAddr=63.245.220.240:41305 changedAddr=0.0.0.0:3479 Return value is 0x000000 :rillian can you confirm that looks right?
Reporter | ||
Comment 6•11 years ago
|
||
Looks good. Thanks!
> ServerName = Vovida.org 0.96
We should patch the servername to indicate it's our custom build. Append "Mozilla" and a git commit id?
Comment 7•11 years ago
|
||
Currently our provisioning scripts, spec files and patches all live here: https://github.com/whd/stun-aws-svc/ (aside: perhaps this should merge with https://github.com/mozilla/stun-vm/ ?) If I understand correctly, you want to dynamically insert into the source at build time the current git commit id of the spec file repository. If we do this, we should put the rpm spec file and patch into its own repository, and we should use a Makefile to build the rpm within a build subdirectory of the repository so that the spec can use "git log --pretty=format:'%h' -n 1" in a sed call or similar to insert the commit id. Does this sound correct, or did you have something else in mind? Another possibility is to use the rpm version number as the identifier (e.g. Mozilla 5svc.amz1) for which an rpm macro already exists, since every new build of the rpm will require bumping this number in the spec file.
Comment 8•11 years ago
|
||
+1 on "mozilla.org 5svc.amz1" format.
Reporter | ||
Comment 9•11 years ago
|
||
(In reply to Wesley Dawson [:whd] from comment #7) > https://github.com/whd/stun-aws-svc/ > > (aside: perhaps this should merge with https://github.com/mozilla/stun-vm/ ?) Yes please. Send me a pull request, or push it yourself. > Another > possibility is to use the rpm version number as the identifier (e.g. Mozilla > 5svc.amz1) for which an rpm macro already exists, since every new build of > the rpm will require bumping this number in the spec file. That's fine. I just wanted to make sure there there was some kind of version identifier there.
Reporter | ||
Comment 10•11 years ago
|
||
I merged it myself. https://github.com/mozilla/stun-vm/commit/f55c3270c2a4b90b97b3fea7b2d30f1bee8202ba https://github.com/mozilla/stun-vm/commit/acfdac9e940ecc6e5150262e0465f7dfeb6662b6
Comment 11•11 years ago
|
||
Ok, I updated the rpm spec with the version identifier insertion stuff. I'm sending a pull request with the changes.
Reporter | ||
Comment 12•11 years ago
|
||
Merged. I think we're done here. Thanks for the quick turn-around!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Whiteboard: [WebRTC] → [WebRTC][qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•