如何使用多个网络来使用 ion-sfu(pion)获取 ICE 候选者?

huangapple go评论91阅读模式
英文:

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

huangapple
  • 本文由 发表于 2022年3月24日 03:49:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/71593220.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定