Cannot create quic http/3 connection using URL
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 122k
- 派生
- 37.4k
- 平均合并
- 4 天 3 小时
- 30 天内合并 PR
- 272
描述
@jasnell
@nodejs
NodeJS versions: I did this in v27.0.0-pre, but it happens on any version that supports quic.
I noticed here this block of code, which was used as part of an example for an http/3 client:
const session = await connect('example.com:443', {
// ALPN defaults to 'h3'.
servername: 'example.com',
});
await session.opened;
If I try to call quic.connect(), whether I have the intention to use http/3 or raw quic, if I set the address parameter of the function to a URL instead of an IP address, it throws an error. But in the block of code I showed, it just uses 'example.com:443'. This can be a problem because some websites change the IP every few minutes, so then it would be mandatory to perform a DNS lookup.
Thank you
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 doc/api/quic.md 中的最小 HTTP/3 客户端示例开始,复现传递给 quic.connect() 的 IP 地址和 URL 之间的差异。跟踪 connect 入口点及相关测试,以确定是否支持 URL 输入,或者示例是否不正确。如果计划进行代码更改,则需要为报告的输入添加覆盖;当行为与文档一致时即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, node.js
- 领域
- networking
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100