Skip to content

multiaddr: Support Onion Protocol#396

Merged
driftluo merged 2 commits intonervosnetwork:masterfrom
eval-exec:exec/onion-protocol
Feb 19, 2025
Merged

multiaddr: Support Onion Protocol#396
driftluo merged 2 commits intonervosnetwork:masterfrom
eval-exec:exec/onion-protocol

Conversation

@eval-exec
Copy link
Collaborator

  • Support Onion V3: Onion3 variants for Protocol
  • Support onion address for MultiAddr

The code changes are copied from https://github.com/multiformats/rust-multiaddr/blob/master/src/onion_addr.rs

(No need to support Onion v2, it has been deprecated: https://support.torproject.org/onionservices/v2-deprecation/)

@eval-exec eval-exec requested a review from driftluo as a code owner February 19, 2025 04:47
@driftluo driftluo merged commit aed85ae into nervosnetwork:master Feb 19, 2025
7 checks passed
Ok(input.split_at(n))
}

fn split_at(n: usize, input: &[u8]) -> Result<(&[u8], &[u8]), Error> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fn is same as split_header, why not reuse it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove split_at on next release pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants