Code Monkey home page Code Monkey logo

datpart's Introduction

DatPart

Proof of concept Dat site viewer extension [and app] for Chrome.

Sites can be loaded via the .dat_site. top-level domain.

For example you can load the Acrylic Style Dat site at http://1c7639eedaf8f7533f92e7c34f5a6d2b43645347836ab5e9f2489e89d3b08306.dat_site/

Oh also, Chrome's Omnibar treats all non-standard TLDs as searches, so you'll have to type the inital HTTP:// or put a slash at the end of the URL for it to load the site.

(BitTorrent/WebTorrent support coming soon, it's already coded into the extension just not the server app. Also it'll load the same torrent sites as PeerCloud)

Try it

Get the Chrome extension here

Get the Desktop app here

Note: You need both for this to work.

How this works

Basically all this does is use the Chrome Extension WebRequest API and Proxy API to intercept any requests to the top level domain .dat_site. When that TLD is requested, Chrome uses the Proxy API to redirect the request to the local Electron server at http://127.0.0.1:9989/ and from there the server loads the Dat (using sparse mode) and returns the page or file that was requested.

To-Do

  • Firefox support (this is trouble as the Firefox WebExtension Proxy API is different).
    • Firefox for Android support.
  • Opera support.
  • Mac OS support.
  • Linux support.
  • Chrome OS support.
  • dat:// link support.
    • This'll require coming up with a way to simply parse Dat URLs in a regular web browser, as parse-dat-url doesn't work very well on the web (there's likely a fix that can be done with regular expressions but I suck at them so... yeah).
  • Provide the dat:// URL to the current site via the extension popup.
  • Have the extension automatically open the app in the background when a .dat_site is requested via the Native Messaging API.
  • Polyfill the Beaker Browser APIs (don't necessarily need all of them, just the ones to make sure the sites are viewable, e.g. Rotonde sites).
  • Notifications! For everything possible (optional of course).
  • Options! (A real options page)
  • Use the omnibox API to let users just type the dat:// URL or the hash itself as a search to load the site.
    • Come up with a fallback for when the dat can't be found (Maybe a "Did you mean?" page or something).
  • Optional background functionality.
  • WebRTC support (for Chrome OS and providing a web proxy).
  • UDP support on Chrome OS.
  • Maybe support regular domain names the way Beaker Browser does, I don't know how this would be done via a browser extension but I feel like it might be possible (if well executed this could be useful for easing bandwidth/data use on certain sites).
  • Edge support? (Not possible yet, needs the Proxy API, if it ever gets it)
  • Safari support? (I'm unsure if this is possible)
  • Internet Explorer support? (I'm being ridiculous here, but again unsure if this is possible)

To-Do [Short term + more specific list]

  • Dat URL for current tab in the extension pop up.
  • Support for 404 pages by reading “fallback_page” in dat.json.
  • An button in the extension pop up to tell the app to download the entire Dat.
  • A button in the extension pop up to tell the app to delete the entire Dat.
  • A landing page for introducing users to the extension/app.
  • A page for deleting torrents/dats and other information.
  • The ability to submit dat links or hashes as searches in the extension (needs Dat parse for web).
  • Grey out extension icon when not on a Dat site.

datpart's People

Contributors

hughisaacs2 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.