Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix multiaddr protocol usage #2

Closed
wants to merge 1 commit into from

Conversation

shawwn
Copy link

@shawwn shawwn commented Aug 10, 2018

Hi, regarding #1

These are the changes that seemed to work for me.

Note that this line is commented out:

			//ma.ProtocolsByName[onionProto.Name] = onionProto

When I uncomment it, I get a build error. I'm not sure why. (But on the other hand, the POC seems to work without it...)

@cretz
Copy link
Owner

cretz commented Aug 11, 2018

Yeah, unfortunately multiformats/go-multiaddr#73 changed the struct format and no longer allows the name map to be changed. They changed it from ProtocolsByName to protocolsByName which means it cannot be accessed outside the package. If I were doing this again, I'd go over the protocol list until I found the onion one and change each of the struct values instead of creating a new one (of course I'd still leave it for onionListen). Maybe I will soon.

cretz added a commit that referenced this pull request Aug 22, 2018
@cretz
Copy link
Owner

cretz commented Aug 22, 2018

@shawwn - Ok, I basically did what you did here in 1404cd9 but I just changed the protocol object in place instead of skipping the name part.

@cretz cretz closed this Aug 22, 2018
@shawwn
Copy link
Author

shawwn commented Aug 22, 2018

Cool :) Thanks!

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.

None yet

2 participants