<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Extensions | UCSC OSPO</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/tag/extensions/</link><atom:link href="https://deploy-preview-1007--ucsc-ospo.netlify.app/tag/extensions/index.xml" rel="self" type="application/rss+xml"/><description>Extensions</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Tue, 23 Sep 2025 00:00:00 +0000</lastBuildDate><image><url>https://deploy-preview-1007--ucsc-ospo.netlify.app/media/logo_hub6795c39d7c5d58c9535d13299c9651f_74810_300x300_fit_lanczos_3.png</url><title>Extensions</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/tag/extensions/</link></image><item><title>[Final] Building PeerSky’s Extensions System</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/ucsc/peersky/2025-09-22-6cobi/</link><pubDate>Tue, 23 Sep 2025 00:00:00 +0000</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/ucsc/peersky/2025-09-22-6cobi/</guid><description>&lt;p>Hi everyone, I’m Hanzhong Liu. Over the summer I worked on building the &lt;code>peersky://extensions&lt;/code> system for &lt;a href="https://github.com/p2plabsxyz/peersky-browser" target="_blank" rel="noopener">PeerSky browser&lt;/a>, a decentralized and privacy-first browser built on Electron.&lt;/p>
&lt;p>This post is my final GSoC 2025 update — covering how the extensions manager was designed, the security model behind IPC, the UI for managing extensions, and what’s next for PeerSky.&lt;/p>
&lt;h2 id="project-overview">Project Overview&lt;/h2>
&lt;p>The new extensions system makes PeerSky behave like a modern browser: you can install extensions from the Chrome Web Store or from local files, enable/disable them, update or uninstall, and interact with their toolbar actions through a puzzle-menu UI.&lt;/p>
&lt;h3 id="key-design-goals">Key Design Goals&lt;/h3>
&lt;ul>
&lt;li>Secure preload-based API exposure via &lt;code>contextBridge&lt;/code>&lt;/li>
&lt;li>Support for preinstalled, Web Store, and local packages&lt;/li>
&lt;li>Toolbar integration with pin/unpin support (up to six)&lt;/li>
&lt;li>Robust validation: MV3-only, size caps, zip-slip prevention&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="./peersky-extensions-management.png" alt="Extensions Management" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="highlights">Highlights&lt;/h2>
&lt;h3 id="preinstalled-mv3s">Preinstalled MV3s&lt;/h3>
&lt;p>PeerSky now ships with three trusted extensions out of the box:&lt;/p>
&lt;ul>
&lt;li>Dark Reader&lt;/li>
&lt;li>Linguist (web page translator)&lt;/li>
&lt;li>uBlock Origin Lite&lt;/li>
&lt;/ul>
&lt;p>They remain installed by default but can be disabled at any time. This ensures users always have a working baseline without needing to browse an extension store.&lt;/p>
&lt;h3 id="electron-integration">Electron Integration&lt;/h3>
&lt;p>Instead of injecting scripts, the system uses &lt;strong>preload + IPC&lt;/strong>. Each operation is routed through validated IPC channels:&lt;/p>
&lt;ul>
&lt;li>&lt;code>listExtensions&lt;/code>, &lt;code>installFromWebStore&lt;/code>, &lt;code>toggleExtension&lt;/code>, etc.&lt;/li>
&lt;li>All methods are scoped to &lt;code>peersky://extensions&lt;/code> only.&lt;/li>
&lt;li>Rate limiting and size caps are enforced per renderer.&lt;/li>
&lt;/ul>
&lt;p>This design makes the surface auditable and prevents privilege leaks.&lt;/p>
&lt;h3 id="toolbar--puzzle-menu">Toolbar &amp;amp; Puzzle Menu&lt;/h3>
&lt;p>Browser actions appear in a puzzle menu and can be pinned for quick access:&lt;/p>
&lt;ul>
&lt;li>Up to six pins are allowed&lt;/li>
&lt;li>Pinned state persists across sessions.&lt;/li>
&lt;li>Popups (e.g., for translators or wallets) open in isolated windows, with OAuth flows preserved via popup guards.&lt;/li>
&lt;/ul>
&lt;h3 id="security-highlights">Security Highlights&lt;/h3>
&lt;ul>
&lt;li>Installs capped at &lt;strong>60 MB&lt;/strong>, with early rejection on oversized payloads&lt;/li>
&lt;li>&lt;strong>5 installs/minute&lt;/strong> per renderer to prevent abuse&lt;/li>
&lt;li>ZIP/CRX extraction hardened against path traversal&lt;/li>
&lt;li>MV3 required; permissions validated at install with warnings for risky hosts&lt;/li>
&lt;li>Web Store installs use Google-signed CRX verification via &lt;code>electron-chrome-web-store&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="example-installing-from-the-web-store">Example: Installing from the Web Store&lt;/h2>
&lt;p>Adding a new extension is simple:&lt;/p>
&lt;ol>
&lt;li>Paste a Chrome Web Store URL or ID into the install bar.&lt;/li>
&lt;li>PeerSky downloads and validates the CRX.&lt;/li>
&lt;li>On success, the extension appears in the grid with toggle, update, and remove options.&lt;/li>
&lt;/ol>
&lt;h2 id="reflection">Reflection&lt;/h2>
&lt;p>This project was both challenging and rewarding. Designing an extension system meant grappling with security, IPC design, and user experience at the same time. I learned to think carefully about security management, UI/UX positioning, and design APIs that are auditable.&lt;/p>
&lt;p>I’m grateful to my mentor Akhilesh Thite and the UC OSPO team for their guidance and feedback. Their support pushed me to make deliberate technical decisions and communicate them clearly.&lt;/p>
&lt;p>You can explore the project here:
&lt;a href="https://github.com/p2plabsxyz/peersky-browser" target="_blank" rel="noopener">https://github.com/p2plabsxyz/peersky-browser&lt;/a>&lt;/p></description></item></channel></rss>