概要
The second version of webtor.io frontend
Web・アプリ開発計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- +1
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルweb-ui
Some features to mention:
- Lightweight - less JavaScript code, no frontend frameworks, fewer bytes sent to the client.
- Based on webtor REST-API.
Roadmap
- Torrent/magnet upload
- Torrent listing
- Direct file download
- Direct folder download as ZIP-archive
- Picture preview
- Audio streaming
- Video streaming
- Base player
- Subtitles support
- OpenSubtitles support
- Chromecast support
- Embed control
- Subtitle uploading support
- Subtitle size control
- Authentication
- Passwordless authentication
- Patreon account linking
- Google authentication
- Patreon authentication
- Ads and statistic integration support
- Misc
- Feedback form
- Allow magnet-url as query string
- Add dark/light theme switch
- Chrome extension integration
- Embed support
- Base version
- Extended version
- Library
- Torrents
- Movies
- Series
- Watched/Rate
- Content enrichment
- OMDB
- Kinopoisk Unofficial
- TMDB
- Vault
- Discover
- AI Recommendations
- Integrations
- Stremio
- Stremio Addons
- WebDAV
- S3
- RealDebrid
- TorBox
- i18n
Setting up connection to Webtor RestAPI
You have to set up connection to Webtor RestAPI before using WebUI.
If you have already installed backend part, then you have to proxy rest-api from your k8s instance to your local machine with kubefwd:
sudo kubefwd svc -f metadata.name=rest-api -n webtor
or with kubectl:
kubectl port-forward svc/rest-api 9090:80 -n webtor
# you have to setup additional environment variables before starting application
export REST_API_SERVICE_PORT=9090
export REST_API_SERVICE_HOST=localhost
If you have RapidAPI subscription you can just do the following:
export RAPIDAPI_KEY={YOUR_RAPIDAPI_KEY}
export RAPIDAPI_HOST={YOUR_RAPIDAPI_HOST}
SESSION_SECRET (required)
The application refuses to start without it:
export SESSION_SECRET=$(openssl rand -hex 32)
There is deliberately no default. This one value is the HMAC key for session
cookies, CSRF tokens, Stremio playback links, one-click unsubscribe links,
and — unless S3_SIGNING_SECRET is set separately — the derivation of every
user's S3 secret access key. A shared or guessable value therefore makes all
of those forgeable by anyone who knows it, which is why a working default was
removed rather than kept for convenience.
Keep it stable: changing it invalidates every existing session and every issued S3 credential at once.
Who may open a resource page or follow a magnet link
A resource page (/<infohash>) opens for anyone holding the link by default,
and a magnet link loads for anyone. Four independent switches narrow that;
with several on, the strictest wins:
| Variable | Default | Effect |
|---|---|---|
ONLY_AUTHORIZED |
off | on: every page of the web interface requires signing in |
RESOURCE_LINKS_REQUIRE_SIGN_IN |
off | on: an anonymous visitor opens only the torrents they added themselves and the demo torrent (DEMO_MAGNET, by infohash). Any other resource link sends them to /login?from=resource and back to the same page, language and query kept; scripts get an empty 401. The file actions (download, stream, preview, file info) and the player's track choices answer such a visitor 401 too. Signed-in users open every link. A link to a torrent that does not exist is still a 404 |
MAGNET_LINKS_REQUIRE_SIGN_IN |
off | on: an anonymous visitor following a magnet link in a URL someone else built (a site, an app, the browser extension) is sent to /login?from=magnet and back to the same link afterwards; scripts get an empty 401. Nothing is loaded and nothing counts as their own add. The demo torrent and a torrent they added themselves through the form still load; signed-in users follow every link |
USE_DIRECT_LINKS |
on | off: a resource page opens only if it was added in this session or is in the signed-in user's library; everyone else is sent to the home page |
"Added themselves" means through this site in this browser: the form, and a
/magnet:?… or /share link that MAGNET_LINKS_REQUIRE_SIGN_IN lets
through. The list lives in the session cookie, which lasts 30 days from the
session's last write, and keeps the last 50 adds. It is kept only where
something reads it: for anonymous visitors under
RESOURCE_LINKS_REQUIRE_SIGN_IN or MAGNET_LINKS_REQUIRE_SIGN_IN, and for
everyone with USE_DIRECT_LINKS off.
What RESOURCE_LINKS_REQUIRE_SIGN_IN does not cover:
- with
MAGNET_LINKS_REQUIRE_SIGN_INoff, a/magnet:?…or/sharelink is an add, so anyone holding a torrent's magnet opens it without an account: the flag asks for one, it does not hide a torrent; /embedstays open while embeds are on (USE_EMBED); with both on, the embedded player's track choices are answered401and not saved;- the JSON API, the Stremio addon, WebDAV and S3 have their own authentication.
What MAGNET_LINKS_REQUIRE_SIGN_IN covers: GET /magnet:?…, its
percent-encoded form GET /magnet%3A%3F… (the installed app's magnet:
handler, see docs/pwa.md), both also under a language prefix, and
GET /ext/magnet?url=… (the browser extension); GET /show?magnet=… and
GET /share redirect to these and are covered with them. What it does not
cover:
- the form (
POST /): a pasted magnet, an uploaded.torrent, the home page's demo button and the extension's.torrenthand-off (/ext/download) all load without an account. The flag asks for one, it does not hide a torrent; - a magnet without a readable infohash, which gets the same error as before;
/embedwhile embeds are on (USE_EMBED): a site embedding the player hands it the magnet in the request body, and it loads without an account;- the JSON API, the Stremio addon, WebDAV and S3 have their own authentication.
After signing in, the visitor comes back to the URL they were sent from. It
is kept in the session, which is bounded, so a return URL over 1024 bytes is
shortened: a magnet drops its trackers, then everything but its infohash, and
comes back as /magnet:?…; any other URL drops its query.
An empty DEMO_MAGNET exempts nothing; one without a readable infohash exempts
nothing either and is logged once at start. Each refusal is logged at info as
user error shown with err_key=error.unauthorized, the flag as reason
(resource_links_require_sign_in with surface=page|action,
magnet_links_require_sign_in with surface=magnet for the /magnet: route
or surface=ext for /ext/magnet) and the status answered. Nothing of the
torrent is logged.
Usage
./web-ui help
NAME:
web-ui - runs webtor web ui v2
USAGE:
web-ui [global options] command [command options] [arguments...]
VERSION:
0.0.1
COMMANDS:
serve, s Serves web server
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
Development
npm install
npm start
Building
make build
関連プロジェクトを探す
読み込み中…