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

Set an own tun/turn server #32

Closed
xundeenergie opened this issue Feb 13, 2023 · 8 comments
Closed

Set an own tun/turn server #32

xundeenergie opened this issue Feb 13, 2023 · 8 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@xundeenergie
Copy link
Contributor

How can i set my own tun/stun/turn/sturn-Server for devices behind NAT?

I can not find any howtow for it...

@schlagmichdoch schlagmichdoch added the documentation Improvements or additions to documentation label Feb 13, 2023
@schlagmichdoch
Copy link
Owner

You will need to edit the source files for now:

Go to the end of /public/scripts/network.js and look for RTCPeer.config and replace the iceServers entries with your own stun/turn server(s)

This could be handled differently. I suggest the client receives the RTCPeer.config on page load from the server. This way we could set the turn servers dynamically with an ENVVAR on start. What do you think?

@schlagmichdoch schlagmichdoch added the enhancement New feature or request label Feb 13, 2023
@xundeenergie
Copy link
Contributor Author

Oh thank you!

Can you please add this to FAQ or README?

@schlagmichdoch
Copy link
Owner

Would you rather leave it as is and add it to the host-your-own.md or implement a way of setting the stun/turn servers dynamically via ENVVAR or a config file?

@xundeenergie
Copy link
Contributor Author

If there is a howto... it's ok for me.

A configfile/envvars are also a cool solution.

😊

@schlagmichdoch
Copy link
Owner

This is now implemented 🎉

@xundeenergie
Copy link
Contributor Author

I tried it in different Situations... all over the internet. From Mobilephone to mobilephone in different provider-nets. From Mobile to Laptop in LAN with different providers...

And it worked with my own stuns/turns-Server. I configured my ejabberd XMPP-Server as such a server (which i need there for voice/video-calls), and configured this one in my pairdrop-container.

@xundeenergie
Copy link
Contributor Author

I setup ejabberd, which can also act as stun/turn-server, without extra service...
Just installed and configured it along the docs.

Sorry, i can not recommend other stun/turn servies.. maybe the nextcloud-stun/turn server can be used...

But setting up a coturn is not that difficult. You can make 2 docker-compose.yml. One with coturn inside, the other one without coturn.

Repository owner deleted a comment from schlagmichdoch Feb 17, 2024
Repository owner deleted a comment from schlagmichdoch Feb 17, 2024
@schlagmichdoch
Copy link
Owner

The following comments were deleted by GitHub (via hubot) as part of mistakenly marking this account as spam on 17th February 2024. The correct thread order and the creation date is unclear. I decided to manually restore them anyway in order to complete the information this issue holds even though the restored information might be outdated:

Comment by @schlagmichdoch:

@xundeenergie I‘m trying to setup my own turn server right now for the official pairdrop.net instance because the free turn server I used was shut down. I would appreciate your help very much!

Can you confirm, that PairDrop works with your own stun/turn servers? Specifically when you have one device behind a NAT and one device e.g. on mobile data a TURN server is needed which fails currently for me me most of the time. Does that work for you without errors? And if so, would you mind giving me your coturn config? :)

Comment by @schlagmichdoch:

Great! Thanks for the feedback! That means it’s just an issue with the turn server configuration and not with PairDrop.
How did you configure your xmpp server? Did you use coturn? Dockerized or native? Any xmpp server provider you can recommend?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants