首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我想测试turn服务器-使用傀儡和https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/

我想测试turn服务器-使用傀儡和https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
EN

Stack Overflow用户
提问于 2019-11-29 16:56:20
回答 1查看 307关注 0票数 1

我想做的是:我想通过使用puppeteer自动使用google webrtc示例实现来测试我的stun和turn服务器。

问题:使用puppeteer返回不同的本地地址,并且没有IPv6。

代码语言:javascript
复制
    const puppeteer = require('puppeteer-core');

    (async () => {
      const browser = await puppeteer.launch({
        headless: false,
        defaultViewport: null,
        executablePath:
          'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe',
        args: [
          "--no-sandbox"
        ]
      });

      const pages = await browser.pages();
      const page = pages[0];
      await page.goto('https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/');
    })();

使用Puppeteer:

代码语言:javascript
复制
0.010   rtp host    3103129966  udp d5f4bf78-64bb-4f9c-9ae4-ee0a4c3892de.local  58262   126 | 30 | 255
0.011   rtp host    2094226564  udp e657b779-3563-4753-aa3f-a533494f02aa.local  58263   126 | 40 | 255
0.070   rtp srflx   842163049   udp 80.142.xxx.xxx  58262   100 | 30 | 255

如果没有木偶剧演员:

代码语言:javascript
复制
0.003   rtp host    3103129966  udp 192.168.2.111   59612   126 | 30 | 255
0.003   rtp host    2094226564  udp [2003:f0:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx] 59613   126 | 40 | 255
0.062   rtp srflx   842163049   udp 80.142.xxx.xxxx 59612   100 | 30 | 255

我是否遗漏了配置参数到目前为止找不到任何东西。

https://peter.sh/experiments/chromium-command-line-switches/

尝试/错误不同的参数

代码语言:javascript
复制
      "--enforce-webrtc-ip-permission-check",
      "--force-webrtc-ip-handling-policy",
      "--webrtc-stun-probe-trial",
      "--enable-webrtc-stun-origin

thx

代码语言:javascript
复制
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-11-29 17:46:27

你遇到了类似于here描述的问题。在pupeeter中,您从未调用过getUserMedia,因此主机候选人将使用mdns进行混淆。在浏览器中,您在某一时刻执行了该操作,并且该信息将被持久保存。

-- disable -features=WebRtcHideLocalIpsWithMdns将禁用mdns,但请注意,您获得的候选主机与回答TURN服务器是否工作的问题无关(在您的情况下不会,因为没有中继候选)

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59101606

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档