-
Notifications
You must be signed in to change notification settings - Fork 862
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: IPFS extension #425
WIP: IPFS extension #425
Conversation
@emerick follow up on brave/brave-core-crx-packager#23 |
|
||
#if defined(OS_WIN) | ||
const std::string kIpfsClientComponentName("Brave Ipfs Client Updater (Windows)"); | ||
const std::string kIpfsClientComponentId("client-component"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The should be the actual component ID, as listed in chrome://extensions.
|
||
#elif defined(OS_MACOSX) | ||
const std::string kIpfsClientComponentName("Brave Ipfs Client Updater (Mac)"); | ||
const std::string kIpfsClientComponentId("client-component"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above.
|
||
#elif defined(OS_LINUX) | ||
const std::string kIpfsClientComponentName("Brave Ipfs Client Updater (Linux)"); | ||
const std::string kIpfsClientComponentId("client-component"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above.
@@ -0,0 +1,28 @@ | |||
-----BEGIN PRIVATE KEY----- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just double-checking: the PEM files used for tests should be unique and not used in any production code. Can you confirm? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the private key I used is a copy of the private key used in the Tor test implementation at https://github.com/brave/brave-core/blob/master/test/data/tor-client-updater/tor-client-updater-mac.pem
|
||
using extensions::ExtensionBrowserTest; | ||
|
||
const std::string kIpfsClientUpdaterComponentTestId(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test extension's component ID should be here, as listed in chrome://extensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not include any component ID since I wasn't sure if I built them from a private key that I generated (not the official one) they would resolve to a different id...
the private key I used is a copy of the private key used in the Tor test implementation at https://github.com/brave/brave-core/blob/master/test/data/tor-client-updater/tor-client-updater-mac.pem
// Brave Ipfs Client Updater (Mac) | ||
" - - - - - - - - - - - - - - - - - - ", | ||
"ngicbhhaldfdgmjhilmnleppfpmkgbbk", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same ID as the Tor Client Updater. Typo?
@@ -98,7 +98,7 @@ bool BraveExtensionProvider::IsVetted(const Extension* extension) { | |||
// Test ID: Brave Tor Client Updater | |||
"ngicbhhaldfdgmjhilmnleppfpmkgbbk" | |||
// Test ID: Brave Ipfs Client Updater | |||
" - - - - - - - - - - - - - - - - - - " | |||
"ngicbhhaldfdgmjhilmnleppfpmkgbbk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same ID as the Tor Client Updater. Typo?
bump. Is there still interest in integrating IPFS natively into Brave - if there is more dev work I can help with for this PR please let me know. |
Thanks for your patience, we need to decide how we want to offer the feature, but we will re-use this work. We'll take a look soon. I think we want to package a daemon like we do with Tor but not have it enabled by default. We could prompt to enable it if the user does a certain action like trying to load ipfs:// for example. |
We also want to manage the daemon process like we do for Tor. |
@bbondy as to packaging the daemon there is already CRX support in the crx packager repo here: https://github.com/brave/brave-core-crx-packager/tree/master/scripts How do we go about managing the daemon process like Tor? Is the process managed solely by the files located here: I agree we should not enable IPFS by default but only when a user requests it's service with |
@darkdh would you mind sharing some wisdom / guidance? |
as we discussed in slack DM, see |
@drbh is this something you'd be interested in working on? |
@bbondy yes I would love to! I undoubtedly will need help down the line, but I can for sure get this started! 😄 |
Closing this since I think this is handled by feature detection within the Chrome extension now. |
Context for drive-by readers: We are parking work on embedding go-ipfs binary for now, and focus on shipping embedded js-ipfs as noted in brave/brave-browser#819 (comment) Details about chrome.sockets feature-detection can be tracked in ipfs/ipfs-companion#664 |
Fixes brave/brave-browser#1042
PR based on work done on Tor like: #316
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Extension download and
Start with a clean profile
--disable-ipfs-client-updater-extension
Reviewer Checklist: