@@ -304,6 +304,24 @@ When a `QuicError` is passed to [`stream.destroy()`][] or
304304` STOP_SENDING ` frame sent to the peer. Any other error type falls back to
305305the negotiated protocol's generic internal error code.
306306
307+ ### Permission model
308+
309+ When using the [ Permission Model] [ ] , the ` --allow-net ` flag must be passed to
310+ allow QUIC network operations. Without it, calling [ ` quic.connect() ` ] [ ] or
311+ [ ` quic.listen() ` ] [ ] will throw an ` ERR_ACCESS_DENIED ` error.
312+
313+ ``` console
314+ $ node --permission --allow-fs-read=* --experimental-quic index.mjs
315+ Error: Access to this API has been restricted. Use --allow-net to manage permissions.
316+ code: 'ERR_ACCESS_DENIED',
317+ permission: 'Net',
318+ }
319+ ```
320+
321+ Creating a [ ` QuicEndpoint ` ] [ ] instance without connecting or listening
322+ is permitted even without ` --allow-net ` , since no network I/O occurs until
323+ [ ` quic.connect() ` ] [ ] or [ ` quic.listen() ` ] [ ] is called.
324+
307325## ` quic.connect(address[, options]) `
308326
309327<!-- YAML
@@ -3853,6 +3871,7 @@ throughput issues caused by flow control.
38533871[Callback error handling]: #callback-error-handling
38543872[JSON-SEQ]: https://www.rfc-editor.org/rfc/rfc7464
38553873[NSS Key Log Format]: https://udn.realityripple.com/docs/Mozilla/Projects/NSS/Key_Log_Format
3874+ [Permission Model]: permissions.md#permission-model
38563875[RFC 8999]: https://www.rfc-editor.org/rfc/rfc8999
38573876[RFC 9000]: https://www.rfc-editor.org/rfc/rfc9000
38583877[RFC 9001]: https://www.rfc-editor.org/rfc/rfc9001
@@ -3872,6 +3891,7 @@ throughput issues caused by flow control.
38723891[RFC 9443]: https://www.rfc-editor.org/rfc/rfc9443
38733892[`PerformanceEntry`]: perf_hooks.md#class-performanceentry
38743893[`PerformanceObserver`]: perf_hooks.md#class-performanceobserver
3894+ [`QuicEndpoint`]: #class-quicendpoint
38753895[`QuicError`]: #class-quicerror
38763896[`application.enableConnectProtocol`]: #sessionoptionsapplication
38773897[`application.enableDatagrams`]: #sessionoptionsapplication
0 commit comments