菜鸟教程小白 发表于 2022-12-12 23:53:00

ios - 如何使用 IPv6 设置 Restund Turn 服务器


                                            <p><p>我正在为 WebRTC 使用 Restund。我的 Restund 服务器目前使用 IPv4。我正在尝试更新我的 Restund 服务器以同时使用 IPv4 和 IPv6。我遇到了一些麻烦,需要一些帮助。</p>

<p>我的困境是,自 10.2 更新以来,我的 Restund 转向服务器不再适用于 iOS 设备上的 Cell Service(使用 T-Mobile 和 Sprint 时。注意:Verizon 仍在工作)。据我了解,这些运营商现在只在 IPv6 上进行通信。其他运营商已宣布他们将很快切换。</p>

<p>我注意到的一件事是需要使用 ifconfig 中列出的 eth0 网络设备中的“本地”IPv4 地址。因此,我还添加了 [::1] 条目以防 IPv6 案例需要它。我还添加了完整的 IPv6 地址。所以 udp_listen、tcp_listen 和 tls_listen 有 3 个条目。</p>

<p>在下面的示例中,我已将真实地址更改为示例地址。</p>

<p>我在下面包含了我的/etc/restund.conf 文件。</p>

<pre><code>daemon                  yes
debug                   no
realm                   HOST
syncinterval            600
udp_listen            192.168.1.100:3478
udp_listen            [::1]:3478
udp_listen            :3478
udp_sockbuf_size      524288
tcp_listen            192.168.1.100:3478
tcp_listen            [::1]:3478
tcp_listen            :3478
tls_listen            192.168.1.100:3479,/etc/cert.pem
tls_listen            [::1]:3479,/etc/cert.pem
tls_listen            :3479,/etc/cert.pem

# modules
module_path             /usr/local/lib/restund/modules
module                  stat.so
module                  binding.so
module                  auth.so
module                  turn.so
module                  syslog.so
module                  status.so

# auth
auth_nonce_expiry       3600
auth_shared_expiry      86400
# share this with your prosody server
auth_shared yoursecretthing
#auth_shared_rollover incaseyouneedtodokeyrollover

# turn
turn_max_allocations    512
turn_max_lifetime       600
turn_relay_addr         192.168.1.100
#turn_relay_addr6       ::1
turn_relay_addr6      AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA
turn_relay_addr6      ::1

# syslog
syslog_facility         24

# status
# 2/2/2017 Apparently only the first status is used, the second one is ignored.
#          I verified this by going to:
#            http://:8080
#            http://PUBLIC_IPV4_ADDR:8080/
#          Only one would work at a time.
#          So I commented the IPv6 Addresses.
status_udp_addr         192.168.1.100
#status_udp_addr                AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA
status_udp_port         33000
status_http_addr      192.168.1.100
#status_http_addr       AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA
status_http_port      8080
</code></pre>

<p>在验证 Restund 运行无误后,我使用 netstat -nlp 验证了适当的 TCP/UDP 端口正在被监听。</p>

<p>我在 netstat 结果中发现的一个问题是,完整的 IPv6 地址仅显示 8 组中的 4 组(AAAA:AAAA:AAAA:AAAA 而不是 AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA:AAAA) .我想知道这是否是我应该关心的事情。</p>

<pre><code>netstat -nlp
IPv4 &amp;&amp; IPv6
Proto Recv-Q Send-Q Local Address         Foreign Address         State       PID/Program name
tcp      0      0 192.168.1.100:8080       0.0.0.0:*               LISTEN      11442/restund
tcp      0      0 192.168.1.100:3478       0.0.0.0:*               LISTEN      11442/restund
tcp      0      0 0.0.0.0:22            0.0.0.0:*               LISTEN      1321/sshd
tcp      0      0 192.168.1.100:3479       0.0.0.0:*               LISTEN      11442/restund
tcp6       0      0 AAAA:AAAA:AAAA:AAAA:3478 :::*                  LISTEN      11442/restund
tcp6       0      0 ::1:3478                :::*                  LISTEN      11442/restund
tcp6       0      0 :::22                   :::*                  LISTEN      1321/sshd
tcp6       0      0 AAAA:AAAA:AAAA:AAAA:3479 :::*                  LISTEN      11442/restund
tcp6       0      0 ::1:3479                :::*                  LISTEN      11442/restund
udp      0      0 192.168.1.100:33000      0.0.0.0:*                           11442/restund
udp      0      0 192.168.1.100:3478       0.0.0.0:*                           11442/restund
udp      0      0 0.0.0.0:68            0.0.0.0:*                           927/dhclient
udp6       0      0 AAAA:AAAA:AAAA:AAAA:3478 :::*                              11442/restund
udp6       0      0 ::1:3478                :::*                              11442/restund
</code></pre>

<p>在我的/etc/restund.conf 文件中添加了所有这些 IPv6 之后,我仍然无法通过 IPv6 进行通信。提前感谢您的任何意见!</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>这不会解决您的 IPv6 问题,但它应该使您的代码现在可以工作。</p>

<p>1 月 27 日,T-Mobile 发布了适用于 iOS 10.2.1 运营商 27.2 的运营商更新:
<a href="https://support.t-mobile.com/docs/DOC-32574" rel="noreferrer noopener nofollow">https://support.t-mobile.com/docs/DOC-32574</a> </p>

<p>尝试更新您的运营商设置,它可能会解决 T-Mobile 问题。</p>

<ol>
<li>在主屏幕中,点按设置。</li>
<li>点按常规</li>
<li>点击关于,然后查看运营商更新字段。</li>
</ol>

<p>如果您还没有更新,它应该会在此时提示您更新。看看这是否能解决您使用 T-Mobile 的问题。他们添加了“添加双栈以改善与 iOS 10.2 的应用兼容性问题”的更新。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何使用 IPv6 设置 Restund Turn 服务器,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/42007579/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/42007579/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何使用 IPv6 设置 Restund Turn 服务器