Instance Method
newIdentity()
Ask Tor to rotate circuits (SIGNAL NEWNYM).
func newIdentity() async throws
Mentioned In
Discussion
Tor builds fresh circuits for new streams going forward; already-established streams remain on their existing circuits until closed. Useful for rotating exits between anonymised request batches.
Throws
TorError.controlProtocolError(code:message:) if the signal is rejected.
Note
NEWNYM is rate-limited by Tor (default 10 seconds between signals). Rapid re-invocation is silently coalesced; observe TorEvent.log(level:message:) at TorLogLevel.notice for the coalesce notice.