Giter Site home page Giter Site logo

supersonichub1 / webtorrent-server Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 49 KB

Download junk from torrents over HTTP.

Home Page: https://webtorrent-server.supersonichub1.repl.co/

License: The Unlicense

JavaScript 55.56% EJS 44.44%
bittorrent bittorrent-client webtorrent expressjs nodejs http-range

webtorrent-server's Introduction

webtorrent-server

A simple HTTP client for WebTorrent.

webtorrent-server enables one to access the contents of torrents where one lacks access to JavaScript, WebRTC, or an unmonitored network, such as older browsers, smart TVs, game consoles, school, or work.

The main draw of this server is the ability to seek WebTorrent streams through HTTP range requests via send-seekable. This makes webtorrent-server significantly more reliable for watching video compared to clients that make use of WebTorrent directly.

Other cool things about this app

  • No JavaScript or CSS!
  • 107 (minus deps) lines of code! !
  • Easy-to-understand real-world usage of WebTorrent!
  • Public domain via Unlicense!

Run

npm install
npm start # node index.js

# In another window…
xdg-open http://localhost:4000/

webtorrent-server's People

Contributors

supersonichub1 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

dgbkn

webtorrent-server's Issues

Add search engines for torrents

Keep it simple:

  • take a query q
  • send to API
  • get back {"name": string, "location": string}[]
  • display that to the user using <ul><li><a href="/add?location=<%= result.location %>"><%= result.name %></a></li></ul>
  • Use simple-get for HTTP requests since it's bundled with WebTorrent

Engines

Note to self: always create URLs with URLSearchParams or parseTorrent.toMagnetURI. Templates shown are for demonstration only.

Torrents.csv

API template: https://torrents-csv.ml/service/search?q=${q}
Return type: {name: string, infohash: string}[]
Location template: magnet:?xt=urn:btih:${result.infohash}&dn=${encodeURIComponent(result.name)}

Nyaa

API template: https://nyaa.si/?page=rss&q=${q}
Return type: RSS feed string that can be parsed with /<item>.*?<title>(.+?)<\/title>.*?<link>(.+?)<\/link>.*?<\/item>/g

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.