我想做的是:我想通过使用puppeteer自动使用google webrtc示例实现来测试我的stun和turn服务器。
问题:使用puppeteer返回不同的本地地址,并且没有IPv6。
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:
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如果没有木偶剧演员:
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/
尝试/错误不同的参数
"--enforce-webrtc-ip-permission-check",
"--force-webrtc-ip-handling-policy",
"--webrtc-stun-probe-trial",
"--enable-webrtc-stun-originthx
发布于 2019-11-29 17:46:27
你遇到了类似于here描述的问题。在pupeeter中,您从未调用过getUserMedia,因此主机候选人将使用mdns进行混淆。在浏览器中,您在某一时刻执行了该操作,并且该信息将被持久保存。
-- disable -features=WebRtcHideLocalIpsWithMdns将禁用mdns,但请注意,您获得的候选主机与回答TURN服务器是否工作的问题无关(在您的情况下不会,因为没有中继候选)
https://stackoverflow.com/questions/59101606
复制相似问题