英文:
How to use more than one network to get ICE candidates with ion-sfu (pion)
问题
我正在使用一个在AWS实例上运行的ion-sfu(和信令),该实例位于私有网络10.0.0.160上。
该实例还具有弹性IP地址207.61.171.104。
我们通过VPN访问该SFU,该VPN可以访问私有网络,并通过载波网关访问弹性IP地址。
为了使其在弹性IP网络上工作,我们在设置中添加了其IP地址:
nat1to1=["207.61.171.104"]
但是当我们这样做时,其他的10.0.0.x网络就无法建立对等连接了。
当像这样将两者都添加到列表中时:
nat1to1=["10.0.0.160","207.61.171.104"]
那么两者都无法工作。
我想知道是否可能使两个网络对等方都能够连接到sfu。
英文:
I'm using an ion-sfu (and signaling) on a AWS instance running on its private network 10.0.0.160
This instance also have an elastic IP address 207.61.171.104
We access that SFU with a VPN that have access to the private network and also through a carrier gateway the elastic IP address.
To make it work on the elastic IP network, we add its IP in the setting:
nat1to1=["207.61.171.104"]
but when we do this the other network 10.0.0.x are no more able to establish a peer connection.
and when adding both to the list like this:
nat1to1 = ["10.0.0.160","207.61.171.104"]
then both are not working.
I'm wondering if it's possible to have both network peers to be able to connect to the sfu
答案1
得分: 2
这个设置从pion/webrtc中暴露了SetNAT1To1IPs。
SetNAT1To1IPs有两种模式。ICECandidateTypeHost
会用你选择的一个IP替换所有私有IP(目前正在做的事情),或者ICECandidateTypeSrflx
只会追加一个你选择的IP。
我认为我们应该在ion-sfu中添加一个nat1to1_mode
。在这个模式下,你可以选择ICECandidateTypeHost
或者ICECandidateTypeSrflx
。如果你有兴趣,我很愿意帮助你创建这个PR!你可以在这里轻松地更改代码(链接)。
如果你有更多问题,可以在这里或者Pion Slack上交流。
英文:
This setting is exposing SetNAT1To1IPs from pion/webrtc.
SetNAT1To1IPs comes with two modes. ICECandidateTypeHost
which replaces all your private IPs with one of your choosing (what it is doing right now) or ICECandidateTypeSrflx
which just appends an IP of your choosing.
I think we should add a nat1to1_mode
to ion-sfu. Where you can choose ICECandidateTypeHost
or ICECandidateTypeSrflx
. If you are interested would love to help you make that PR! You can try changing the code easily today here
If you have more questions happy to chat here or on Pion Slack
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论