diff --git a/doc/api/quic.md b/doc/api/quic.md index ddeafdc8d3edd1..ecd0d73803888a 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -304,6 +304,24 @@ When a `QuicError` is passed to [`stream.destroy()`][] or `STOP_SENDING` frame sent to the peer. Any other error type falls back to the negotiated protocol's generic internal error code. +### Permission model + +When using the [Permission Model][], the `--allow-net` flag must be passed to +allow QUIC network operations. Without it, calling [`quic.connect()`][] or +[`quic.listen()`][] will throw an `ERR_ACCESS_DENIED` error. + +```console +$ node --permission --allow-fs-read=* --experimental-quic index.mjs +Error: Access to this API has been restricted. Use --allow-net to manage permissions. + code: 'ERR_ACCESS_DENIED', + permission: 'Net', +} +``` + +Creating a [`QuicEndpoint`][] instance without connecting or listening +is permitted even without `--allow-net`, since no network I/O occurs until +[`quic.connect()`][] or [`quic.listen()`][] is called. + ## `quic.connect(address[, options])`