Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
246017c
chore: remove legacy files
pavelpikta Jun 4, 2026
19c58b9
feat(ci): migrate CI configuration to GoReleaser
pavelpikta Jun 4, 2026
7cab1fa
Merge branch 'torrserver'
pavelpikta Jun 9, 2026
55e2b85
Merge branch 'YouROK:master' into master
pavelpikta Jun 26, 2026
07ef802
Merge branch 'YouROK:master' into master
pavelpikta Jun 28, 2026
fe1210f
Merge branch 'torrserver'
pavelpikta Jun 29, 2026
d17a11f
Merge branch 'upstream-master'
pavelpikta Jun 30, 2026
c7bb37f
Merge branch 'YouROK:master' into master
pavelpikta Jul 1, 2026
3e9d729
Merge branch 'YouROK:master' into master
pavelpikta Jul 1, 2026
093bca5
feat(build): add GStreamer build configuration and Makefile targets
pavelpikta Jul 1, 2026
5cdcdc8
feat(ci): add verification for static Linux binary in CI workflow
pavelpikta Jul 1, 2026
7949259
chore(patches): remove obsolete responsive reader and no UDP panic pa…
pavelpikta Jul 1, 2026
902927b
feat(docker): add Docker Compose configuration files for TorrServer
pavelpikta Jul 1, 2026
45a624b
Merge branch 'YouROK:master' into master
pavelpikta Jul 2, 2026
e638e41
Merge branch 'upstream-master'
pavelpikta Jul 3, 2026
355d5f1
Merge branch 'upstream-master'
pavelpikta Jul 5, 2026
1858008
refactor: simplify URL generation for ffprobe by removing SSL handling
pavelpikta Jul 5, 2026
9e6a42c
refactor: update web app manifest and meta tags (#3)
pavelpikta Jul 6, 2026
67ad989
refactor: static web (#4)
pavelpikta Jul 6, 2026
a7c6fb9
chore: update static pages template
pavelpikta Jul 6, 2026
daeb4a5
feat(settings): introduce StreamWA feature flag (#2)
pavelpikta Jul 6, 2026
4b9f8bd
feat: add PWA launch handling for magnet links and torrent files
pavelpikta Jul 6, 2026
aa35a22
Merge branch 'upstream-master'
pavelpikta Jul 6, 2026
2c2ffea
refactor(build): unify GoReleaser-based build and release pipeline (#5)
pavelpikta Jul 8, 2026
b6b503c
fix(release): update Docker image ID to use lowercase registry name
pavelpikta Jul 8, 2026
b24930c
fix(release): restore flat GitHub release asset names
pavelpikta Jul 8, 2026
7997a52
Merge branch 'upstream-master'
pavelpikta Jul 13, 2026
b23cb06
Merge branch 'upstream'
pavelpikta Jul 16, 2026
15a0d27
chore: update .gitignore
pavelpikta Jul 16, 2026
6f89e49
chore(web): update static web
pavelpikta Jul 16, 2026
ef64aca
chore(web): remove Firebase Analytics
pavelpikta Jul 16, 2026
62c154d
chore(web): update static web
pavelpikta Jul 16, 2026
1e982ba
ci: build Windows binary with embedded gst lib
pavelpikta Jul 16, 2026
5a7dfbb
chore(ci): bump go version to `1.26.5`
pavelpikta Jul 16, 2026
03a0b05
feat: add Bonjour/mDNS support for TorrServer advertisement (#6)
pavelpikta Jul 16, 2026
104eb9a
refactor: clean up code formatting and improve readability (#7)
pavelpikta Jul 16, 2026
6880e78
Merge branch 'upstream'
pavelpikta Jul 17, 2026
e98eda6
feat(web): greenfield HeroUI client with cinema player and library im…
pavelpikta Jul 19, 2026
9b68d72
refactor(web): remove Telegram Mini App SDK script and update related…
pavelpikta Jul 19, 2026
2bccfbe
feat(web): enhance Swagger UI routing
pavelpikta Jul 19, 2026
aa1d3ee
fix(web): update TorrentCard component to improve UI and speed display
pavelpikta Jul 19, 2026
c25e9d5
feat(web): enhance VideoPlayer with torrent statistics and remove Med…
pavelpikta Jul 19, 2026
72109c4
refactor(web): update progress calculation in TorrentCard component
pavelpikta Jul 19, 2026
7cfe7d9
fix(web): keep torrent card chip status-only and share cache fill label
pavelpikta Jul 19, 2026
8fad054
ci: add dependabot configuration
pavelpikta Jul 20, 2026
f7059a5
chore(deps): bump the github-actions group with 4 updates (#9)
dependabot[bot] Jul 20, 2026
fa1985d
refactor(web): enhance layout and responsiveness across components
pavelpikta Jul 20, 2026
fe8ae41
fix(web): improve Sidebar padding and viewport height calculation
pavelpikta Jul 20, 2026
f104338
refactor(web): format import statements in DetailsDialog component
pavelpikta Jul 20, 2026
8e21d8f
fix(web): update protocol references for torrent links
pavelpikta Jul 20, 2026
e6cc232
chore(deps): bump the web-deps group across 1 directory with 10 updat…
dependabot[bot] Jul 20, 2026
cfe7dad
fix(web): update torrent link handling and improve localization
pavelpikta Jul 20, 2026
7c37432
refactor(web): update parse-torrent module interface and imports
pavelpikta Jul 20, 2026
b8ff31a
fix(web): enhance file handling in AddDialog for better torrent file …
pavelpikta Jul 20, 2026
59846dc
chore(deps): update dependabot configuration for npm and GitHub Actions
pavelpikta Aug 10, 2026
b2c4290
deps(web): bump react-dropzone from 19.1.1 to 20.0.0 in /web (#20)
dependabot[bot] Aug 10, 2026
524eeb4
deps(web): bump the web-minor-patch group across 1 directory with 20 …
dependabot[bot] Aug 10, 2026
21dc0bf
feat(web): implement findCaptionSrc function for subtitle handling
pavelpikta Aug 10, 2026
6597a80
feat(web): improvements and enhancement (#21)
pavelpikta Aug 10, 2026
c3bfa08
feat(web): improve details/cache UX, dialogs, and accurate reader/buf…
pavelpikta Aug 11, 2026
bfd5c45
fix: eliminate data races on shared maps and flags (#795)
Fikirsiz Jul 19, 2026
5be355d
update static wev and format with gofumpt -w
tsynik Jul 19, 2026
f32ff03
fix: trim whitespace/CR when reading trackers.txt
kirill-782 Jul 20, 2026
0bd94c5
feat: enhance installation script (#800)
pavelpikta Jul 20, 2026
78bfc8b
feat(docker): actualize environment variables with server args
nikitenich Jul 25, 2026
7d12f3a
bump torrent v1.2.26 and web
tsynik Aug 16, 2026
ba4b636
Fix TrackTimecode API reset when marking files as viewed
Aug 11, 2026
77137bb
fix(torznab): populate Tracker field from <jackettindexer>
nicuvam Aug 6, 2026
1c90814
Add support for M3U file index by ID
Jul 24, 2026
b921f99
fix: avoid curl|sudo bash hang by documenting safe install methods
pavelpikta Jul 28, 2026
564583c
fix(torrstor): serialize priority updates instead of sleeping in clea…
letov404-ai Jul 29, 2026
347a52f
fix(torrstor): re-arm piece priorities while readers are active
letov404-ai Jul 29, 2026
a9812f9
bump torrent v1.2.27
tsynik Aug 17, 2026
e38e222
fix: correct indentation in Stream function and handle return values …
pavelpikta Aug 17, 2026
b7a299e
remove: delete obsolete web upgrade session and prompt files for Torr…
pavelpikta Aug 17, 2026
a4a133e
fix: complete torrstor watchdog and torznab tracker merge
pavelpikta Aug 17, 2026
8a8b370
chore: update Go version to 1.26.6
pavelpikta Aug 17, 2026
773e227
Merge branch 'upstream-master'
pavelpikta Aug 17, 2026
29d97dc
deps(web): bump the web-minor-patch group in /web with 10 updates (#23)
dependabot[bot] Aug 17, 2026
3ffb1ec
bump torrent v1.2.28
tsynik Aug 17, 2026
26b027d
chore: update static web
pavelpikta Aug 17, 2026
c5e553a
fix: add nil checks and improve cache management in torrent handling
pavelpikta Aug 17, 2026
2a8f38f
chore: bump Go version to 1.27.0
pavelpikta Aug 24, 2026
5f79abc
refactor: remove nil checks for readers in Preload function
pavelpikta Aug 24, 2026
ca31d4e
deps(web): bump the web-minor-patch group in /web with 8 updates (#24)
dependabot[bot] Aug 24, 2026
6202fa9
chore(web): update static assets
pavelpikta Aug 24, 2026
f535c0f
deps(web): bump the web-minor-patch group in /web with 8 updates (#25)
dependabot[bot] Aug 31, 2026
2d29bd9
deps(web): bump lucide-react from 1.35.0 to 1.38.0 in /web in the web…
dependabot[bot] Sep 3, 2026
6477d39
fix: improve media size formatting and localization updates
pavelpikta Sep 3, 2026
c572722
chore: update static web
pavelpikta Sep 3, 2026
115301a
chore: bump Go version to 1.27.1
pavelpikta Sep 3, 2026
285e5f9
Merge remote-tracking branch 'upstream/master' into merge/upstream-ma…
pavelpikta Sep 3, 2026
9bfc936
feat(appimage): add support for building Linux AppImages
pavelpikta Sep 3, 2026
ab9043f
feat: enhance TorrServer integration and add MCP support
pavelpikta Sep 3, 2026
3494f0b
chore: update static web
pavelpikta Sep 3, 2026
5d9f1da
feat: add live torrent checks and enhance CI workflow
pavelpikta Sep 3, 2026
d232ac2
feat: integrate JacRed indexer and enhance live torrent testing
pavelpikta Sep 3, 2026
c239596
feat: enhance HTTP client with custom User-Agent support
pavelpikta Sep 3, 2026
dd2f026
feat: update search queries for JacRed indexer and tests
pavelpikta Sep 3, 2026
970ade4
Merge pull request #27 from lampac-nextgen/upstream-master
pavelpikta Sep 3, 2026
3fb1cc3
revert: remove StreamWA feature and update related configurations
pavelpikta Sep 4, 2026
bbdc5e3
Merge pull request #860 from lampac-nextgen/master
tsynik Sep 4, 2026
4f8ea88
feat(web): compact library chrome, centered dialogs, and phone PWA la…
pavelpikta Sep 5, 2026
0df8f44
Merge pull request #28 from lampac-nextgen/feature/web-update
pavelpikta Sep 5, 2026
d425d00
feat(mcp): enhance support for reverse proxies and update documentation
pavelpikta Sep 5, 2026
81ccdce
feat(tgbot): library hub, copy-to-clipboard streams, inline search (#29)
pavelpikta Sep 6, 2026
b1ad414
deps(web): bump the web-minor-patch group in /web with 10 updates (#30)
dependabot[bot] Sep 7, 2026
7cea332
deps(web): bump vitest from 4.1.11 to 5.0.0 in /web (#31)
dependabot[bot] Sep 7, 2026
c172a0f
refactor(dialogs): remove redundant footer buttons (#32)
pavelpikta Sep 8, 2026
5b7b504
Merge pull request #864 from lampac-nextgen/master
tsynik Sep 10, 2026
cc16dd0
Merge branch 'master' into nextgen
tsynik Sep 10, 2026
7244411
update docs
tsynik Sep 10, 2026
4b1af74
update about and donate
tsynik Sep 11, 2026
0e87c16
update static web
tsynik Sep 11, 2026
8c1dfc2
update translations
tsynik Sep 11, 2026
b746a23
fix translation
tsynik Sep 11, 2026
b1f9c0d
reorder cache views, hide playlistall from details actions and update…
tsynik Sep 11, 2026
7bebda9
update static web
tsynik Sep 11, 2026
a361161
Merge branch 'master' into nextgen
tsynik Sep 11, 2026
a99f305
feat: enhance torrent statistics display
pavelpikta Sep 11, 2026
3432e7a
chore: update static web
pavelpikta Sep 11, 2026
d442b29
check ffprobe binary before requests
tsynik Sep 12, 2026
de6a81a
add json reply to ffprobe on error
tsynik Sep 12, 2026
7330b2e
add stream api json errors
tsynik Sep 12, 2026
efbc868
fix snake color on dark and adjust params
tsynik Sep 12, 2026
1847480
fix snake legend
tsynik Sep 12, 2026
095ddea
Merge branch 'master' into nextgen
tsynik Sep 12, 2026
c0f77c1
Merge branch 'master' into nextgen
tsynik Sep 12, 2026
d7fcc97
update locales
tsynik Sep 12, 2026
5b8dda4
Merge branch 'nextgen' into feature/metrics
pavelpikta Sep 12, 2026
f7739bb
Merge pull request #866 from lampac-nextgen/feature/metrics
tsynik Sep 12, 2026
808a21b
update locales
tsynik Sep 12, 2026
139de16
Merge branch 'upstream'
pavelpikta Sep 14, 2026
d3e5a57
feat(web): add MergeAllM3U setting
pavelpikta Sep 14, 2026
a542572
chore: static web update
pavelpikta Sep 14, 2026
58c92a2
fix(torrent): update InfoBytes handling in TorrentSpec
pavelpikta Sep 14, 2026
0b5a436
feat(torrent): enhance M3U handling
pavelpikta Sep 14, 2026
6c3ccee
deps(web): bump the web-minor-patch group in /web with 14 updates (#33)
dependabot[bot] Sep 14, 2026
f089871
deps(web): bump lucide-react from 1.44.0 to 1.45.0 in /web in the web…
dependabot[bot] Sep 14, 2026
a8623e3
deps(web): bump the web-minor-patch group in /web with 4 updates (#35)
dependabot[bot] Sep 18, 2026
0a7ad25
deps(web): bump the web-minor-patch group in /web with 7 updates (#36)
dependabot[bot] Sep 21, 2026
5e72438
deps(web): bump the web-minor-patch group in /web with 9 updates (#37)
dependabot[bot] Sep 28, 2026
0f25b44
Merge upstream/master into merge/upstream-master
pavelpikta Oct 5, 2026
8c661ac
fix: handle errors from os functions
pavelpikta Oct 5, 2026
26adde5
refactor: remove unused import for playlistAllUrl
pavelpikta Oct 5, 2026
b7c6d15
docs(api): add `mediabase` endpoint for external player links
pavelpikta Oct 5, 2026
d9af2ae
deps(web): bump the web-minor-patch group in /web with 8 updates (#38)
dependabot[bot] Oct 5, 2026
af3f74c
chore: update static web
pavelpikta Oct 5, 2026
2a45d06
fix(web): remove iOS 27 PWA top blur (#41)
pavelpikta Oct 5, 2026
bb7bfb9
deps(web): bump the web-minor-patch group in /web with 2 updates (#42)
dependabot[bot] Oct 5, 2026
0a07dd3
deps(web): bump eslint from 10.11.0 to 10.12.0 in /web (#43)
dependabot[bot] Oct 5, 2026
d57bc05
Merge upstream/master into merge/upstream-master
pavelpikta Oct 9, 2026
6c801a9
Merge upstream/master into master
pavelpikta Oct 9, 2026
340fd1d
chore: bump Go version from 1.27.1 to 1.27.2 in versions.env
pavelpikta Oct 9, 2026
926cad3
feat(i18n): add HTTPS settings translations for Bulgarian, French, Ro…
pavelpikta Oct 9, 2026
1cffe63
chore: update static web
pavelpikta Oct 9, 2026
f772b5b
test: enhance SSL and stream buffer tests with error handling and con…
pavelpikta Oct 9, 2026
4a87786
deps(web): bump the web-minor-patch group in /web with 5 updates (#44)
dependabot[bot] Oct 9, 2026
51dbcac
deps(web): bump vite-plugin-pwa from 1.3.0 to 2.0.0 in /web (#45)
dependabot[bot] Oct 9, 2026
fe723b0
Merge upstream/master into merge/upstream-master
pavelpikta Oct 9, 2026
91d76a4
Merge upstream/master into master
pavelpikta Oct 9, 2026
27d7f3a
fix(web): locale keys — CommandPalette, prune unused, translate lefto…
pavelpikta Oct 9, 2026
045e328
chore: update static web
pavelpikta Oct 9, 2026
f8524b1
Merge upstream/master: stream race fix, docker flags, ETag 304
pavelpikta Oct 12, 2026
1c49ec3
Merge branch 'merge/upstream-master'
pavelpikta Oct 12, 2026
82912a2
fix(web): keep PWA bottom nav visible and overhaul torrent details mo…
pavelpikta Oct 13, 2026
bf5d3a8
deps(web): bump the web-minor-patch group in /web with 8 updates (#47)
dependabot[bot] Oct 13, 2026
58d9d2c
chore: update static web
pavelpikta Oct 13, 2026
9226948
fix(web): drop duplicate SSL path fields from Network settings (#48)
pavelpikta Oct 13, 2026
77496e9
deps(web): bump prettier from 3.9.9 to 3.9.10 in /web in the web-mino…
dependabot[bot] Oct 13, 2026
be2009f
fix(web): keep details usable in the mobile PWA (#50)
pavelpikta Oct 13, 2026
82f9a8f
Update preload.go
tsynik Oct 14, 2026
40f485a
feat(gst): add VAAPI hardware encoder backend
Whishp Oct 13, 2026
f05be3a
Update preload.go
tsynik Oct 14, 2026
0dadd1f
Merge upstream/master: external subtitles, migrate skip, MatriX.147
pavelpikta Oct 15, 2026
bd9784d
Merge branch 'merge/upstream-master'
pavelpikta Oct 15, 2026
c622856
feat(web): use /subs API for progressive captions
pavelpikta Oct 15, 2026
e0d7e8b
chore: update static web
pavelpikta Oct 15, 2026
3787c49
refactor: clean up code formatting and improve readability in various…
pavelpikta Oct 15, 2026
d572676
refactor: restructure HTTPSSettingsPanel for improved organization
pavelpikta Oct 15, 2026
d76034b
chore: update static web
pavelpikta Oct 15, 2026
8a462a0
Merge upstream/master: natural sort, m3u ids, Torznab docs
pavelpikta Oct 16, 2026
19606ac
Merge branch 'merge/upstream-master'
pavelpikta Oct 16, 2026
15697a6
refactor: update Torznab settings panel and localization hints
pavelpikta Oct 16, 2026
0d842d6
feat(localization): enhance translations across multiple languages
pavelpikta Oct 16, 2026
de38128
chore: update static web
pavelpikta Oct 16, 2026
8fa8c86
fix: keep the snake on the real playhead and make torrs library impor…
pavelpikta Oct 17, 2026
8837bca
refactor: remove unused buildCacheDrawModel function and related tests
pavelpikta Oct 17, 2026
2c63b86
chore: update static web
pavelpikta Oct 17, 2026
cddb60e
deps(web): bump the web-minor-patch group in /web with 9 updates (#52)
dependabot[bot] Oct 17, 2026
a2883c5
chore: update static web
pavelpikta Oct 17, 2026
b7a9786
Merge branch 'upstream-master'
pavelpikta Oct 18, 2026
6abfdf4
deps(web): bump the web-minor-patch group in /web with 5 updates (#53)
dependabot[bot] Oct 19, 2026
7503401
deps(web): bump the web-minor-patch group in /web with 2 updates (#54)
dependabot[bot] Oct 19, 2026
23cb29b
deps(web): bump the web-minor-patch group in /web with 2 updates (#55)
dependabot[bot] Oct 20, 2026
a8b4f4c
Merge upstream/master: WaitInfo race, unescapeQuery, CP1251, follow-r…
pavelpikta Oct 22, 2026
7b37ef3
Merge branch 'merge/upstream-master'
pavelpikta Oct 22, 2026
66f11ae
ci: update Go version from `1.27.2` to `1.27.3`
pavelpikta Oct 22, 2026
9b416e3
ci: update CI workflows to use ubuntu-26.04
pavelpikta Oct 22, 2026
ee00830
deps(web): bump the web-minor-patch group in /web with 3 updates (#56)
dependabot[bot] Oct 22, 2026
c5d0b60
deps(web): update package dependencies in /web (#57)
pavelpikta Oct 22, 2026
63078a5
chore: update static web
pavelpikta Oct 22, 2026
cd35164
Merge branch 'upstream'
pavelpikta Oct 23, 2026
fa38173
fix(torrstor): stop piece-cache RAM leak (#58)
pavelpikta Oct 23, 2026
202922d
fix: stop DNS cache races, ffprobe timer leak, and MSX param races
pavelpikta Oct 23, 2026
a9620be
test: add unit and race tests across server packages
pavelpikta Oct 23, 2026
70adbc8
fix: correct closed-DB reuse and JSON equality, and expose startup seams
pavelpikta Oct 23, 2026
fcd90c5
test: cover DLNA, settings, FUSE, and web lifecycle under race
pavelpikta Oct 23, 2026
0f78c2c
fix: stop reader and upload races and expose startup seams
pavelpikta Oct 23, 2026
20c1419
test: cover torr, API, MCP, and Telegram flows offline
pavelpikta Oct 23, 2026
31c9f3a
fix: stop cache, tracker, and bot goroutine leaks on shutdown
pavelpikta Oct 23, 2026
a77b732
test: add heap ceilings, goroutine audits, and allocation benches
pavelpikta Oct 23, 2026
401deb4
feat: reuse piece buffers and stream copy buffers
pavelpikta Oct 23, 2026
2bbcae6
test: cover piece-buffer reuse and stream range benches
pavelpikta Oct 23, 2026
c92fb5d
feat: add test and benchmark support in CI
pavelpikta Oct 23, 2026
cdfc374
refactor: update DHT and torrent dependencies, enhance tracker manage…
pavelpikta Oct 23, 2026
84aef53
feat: add agent instructions for TorrServer
pavelpikta Oct 24, 2026
ba0ec5c
feat: add principal Go TorrServer architect documentation
pavelpikta Oct 24, 2026
8667df1
docs: refine AGENTS.md and enhance UI boundary section
pavelpikta Oct 24, 2026
215fb57
refactor: streamline AddTorrentDB function for improved clarity and p…
pavelpikta Oct 24, 2026
f64abf8
refactor: enhance mDNS registration and testing structure
pavelpikta Oct 24, 2026
980e1a4
chore: initialize benchmark data file if absent in CI workflow
pavelpikta Oct 24, 2026
7d90e8b
chore: update CI workflow for benchmark actions
pavelpikta Oct 24, 2026
b9ca721
refactor: simplify piece buffer test by removing unnecessary pointer …
pavelpikta Oct 24, 2026
66c58e4
ci: add coverage and benchmark summaries
pavelpikta Oct 24, 2026
ec25073
refactor: update tracker fetching logic to include generation parameter
pavelpikta Oct 24, 2026
988d758
Merge pull request #59 from lampac-nextgen/fix/server-races-leaks-off…
pavelpikta Oct 24, 2026
1b00abd
fix: keep settings posts and stream links from failing closed
pavelpikta Oct 24, 2026
a74e55b
chore: update static web
pavelpikta Oct 24, 2026
4a2f867
fix: keep the piece map and player links working on large remuxes
pavelpikta Oct 24, 2026
b636883
chore: update static web
pavelpikta Oct 24, 2026
a8d4727
test: cover stream URLs, settings posts, and cache polling
pavelpikta Oct 24, 2026
213125d
test: cover rejected web handlers and auth setup
pavelpikta Oct 24, 2026
9436511
chore: update static web
pavelpikta Oct 24, 2026
53049d5
style: indent the Infuse playlist assertion
pavelpikta Oct 24, 2026
4969339
ci: stop scoring Go MB/s as a slowdown
pavelpikta Oct 24, 2026
6f562a8
ci: do not fail the job on a flaky benchmark
pavelpikta Oct 24, 2026
8e0f28e
Merge pull request #60 from lampac-nextgen/fix/web-settings-stream-cache
pavelpikta Oct 24, 2026
b400fcd
ci: adjust comment behavior for pull requests
pavelpikta Oct 24, 2026
aa65b55
fix: bound ffprobe and release the play reader when the client leaves…
pavelpikta Oct 24, 2026
e2151f6
fix: load the first and last pieces during preload (#62)
pavelpikta Oct 24, 2026
b5d39c9
fix: snapshot search flags before the Telegram search goroutine
pavelpikta Oct 24, 2026
aaaef0e
fix: update torrent dependency to v1.2.36 and enhance reader window m…
pavelpikta Oct 24, 2026
9aab220
refactor: remove unused priority handling from Cache and related tests
pavelpikta Oct 24, 2026
31ba677
docs: drop the deleted cache priority lock from the engine map
pavelpikta Oct 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
134 changes: 134 additions & 0 deletions .cursor/skills/principal-frontend-torrserver-architect/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
name: principal-frontend-torrserver-architect
description: Principal Frontend, Web UI & Smart TV (PWA/MSX) Architect for TorrServer (`web/`, `gen_web.go`, `server/web/pages`, `server/web/msx`). Use for all frontend development, React/JS state debugging, API polling optimization, XSS/URL encoding fixes, and embedded asset generation.
---

# Role & Persona

You are a **Principal Frontend & Web Systems Architect** specializing in lightweight, high-performance single-page applications (SPA), media streaming dashboards, Smart TV / Apple TV / Media Station X (MSX) interfaces, and Go-embedded static asset pipelines (`gen_web.go`).

## Communication & Output Rules

- **No Fluff or Basic Theory:** Skip introductory explanations. Provide immediate root-cause analysis and production-ready code.
- **Zero-Bloat Philosophy:** TorrServer's web UI runs on everything from desktop browsers to memory-constrained Smart TV WebViews and mobile devices. Avoid heavy dependencies, unnecessary re-renders, and memory leaks.

---

# Repository Web Architecture & Asset Pipeline

1. **Frontend Source (`web/`):**
- Contains the SPA source code, components, hooks/services for interacting with TorrServer's HTTP API (`/torrents`, `/stream`, `/play`, `/cache`, `/settings`, `/viewed`, `/playlistall/all.m3u`, `/echo`), i18n dictionaries, and static assets.
2. **Go Asset Embedding (`gen_web.go` -> `server/web/pages/template/`):**
- Production builds embed the compiled frontend assets into Go source files via `gen_web.go`.
- **CRITICAL INVARIANT:** Any change to `web/` build output MUST be synchronized with `server/web/pages/template` (via `go run gen_web.go` or the `Makefile` web target) so the Go binary serves the updated UI.
3. **Backend Web Integration (`server/web/`):**
- `server/web/pages`: Serves embedded HTML/JS/CSS/PWA manifests and handles cache-control headers.
- `server/web/msx`: Serves Media Station X (MSX) JSON/start configurations for Smart TVs.
- `server/web/api`: REST endpoints consumed by the frontend.
- `server/web/auth` & `server/web/waf`: Basic Auth and WAF protections that the frontend must handle gracefully (401/403 responses).

---

# Engineering Standards & Frontend Patterns

## 1. Network Polling, Concurrency & Memory Discipline

- **Single-Flight Polling with `AbortController`:**
- Status and cache polling (`/torrents`, `/cache`) must NEVER use blind `setInterval` that stacks concurrent requests when the network or VPS is slow.
- Always use recursive `setTimeout` after request completion OR `AbortController` to cancel in-flight requests on component unmount, modal close, or tab hidden (`document.visibilityState === 'hidden'`).
- **Unmount & Listener Cleanup:**
- Every `useEffect` / event listener (`resize`, `keydown`, `visibilitychange`, `popstate`) and timer MUST have a deterministic cleanup function to prevent detached DOM trees and memory leaks during long sessions.

## 2. Streaming URLs, Encoding & Security (XSS / Injection)

- **Strict Stream & Playlist URL Construction:**
- Torrent file names frequently contain spaces, brackets `[1080p]`, Cyrillic/Unicode characters, `#`, `?`, and `&`.
- Always encode path segments with `encodeURIComponent(fileName)` and construct query parameters (`link`, `index`, `play`, `save`, `m3u`, `fromlast`) using `URLSearchParams` to prevent broken links in VLC, Infuse, IINA, and PotPlayer.
- **XSS & DOM Sanitization:**
- Torrent titles, tracker messages, and file paths come from untrusted P2P metainfo. Never inject raw torrent names or magnet metadata via `innerHTML` or unescaped `dangerouslySetInnerHTML`.

## 3. State Management, Settings & Error Handling

- **Settings Synchronization (`/settings`):**
- Validate numeric inputs (cache size, preload percentage, reader read-ahead, connection limits, ports) on the client before `POST /settings` to prevent sending `NaN`, negative numbers, or string-typed numbers that break Go JSON unmarshaling.
- Provide clear visual feedback (toast/status indicator) on save success, network timeout, or `readonly` mode (`403`/`400` from server).
- **Optimistic UI vs. Ground Truth:**
- When adding, dropping, or wiping torrents, disable action buttons during the in-flight request to prevent duplicate submissions, and reconcile local state with the server response.

## 4. Smart TV, Mobile & Accessibility UX

- **Keyboard & D-Pad Navigation:** Ensure modals, file lists, and action buttons support `Escape`, `Enter`, `Tab`, and arrow-key focus for TV browsers and desktop keyboard users.
- **Large Torrent File Trees:** Torrents with 100–1,000+ files (e.g., full TV series packs or audio discographies) must render smoothly without freezing the main thread (use memoization, pagination, or virtualized/lazy rendering).

---

# This repository

Edit `web/src`. The Go binary serves `server/web/pages/template/pages`, produced by `make webgen` (`go run gen_web.go` from the repo root) or `make webgen-clean`. Do not hand-edit that tree. `web/` is Yarn. Node `>=22`.

Checks, from `web/`:

```bash
yarn typecheck
yarn lint
yarn test
yarn i18n:check
yarn test:e2e
```

`yarn build` refuses `VITE_SERVER_HOST` that contains `localhost` or `127.0.0.1` when `mode` is production. After a `web/src` change that ships in the binary, run `make webgen` and `cd server && go test -race ./web/...`.

A new string goes in `web/src/locales/{en,ru,ua,bg,fr,ro,zh}/translation.json` under the same flattened key. `yarn i18n:check` fails if one locale is missing it.

## Polling

| Hook | Endpoint | Cadence |
| --- | --- | --- |
| `useTorrentsQuery` | `POST /torrents` `action: list` | 500ms while any row is `GETTING_INFO`, else 1s |
| `useTorrentDetail` | `POST /torrents` `action: get` | 500ms `GETTING_INFO`, 1s `PRELOAD`, else 2s |
| `useUpdateCache` | `POST /cache` `action: get` | 100ms while the snake changes, else 1s. Timer is `setTimeout` after the response. AbortController on unmount. Stops while `document.hidden`. Details dialog polls on the Cache tab, the cache-map modal, and the Stats tab (idle, for the progress strip). The Files tab does not poll. |
| `ServerStatusDialog` | `GET /runtime/status` | 2.5s while the dialog is open |

`web/src/index.tsx` sets `refetchOnWindowFocus: false`. TanStack Query's `refetchInterval` is a `setInterval`, but `query.fetch` joins an in-flight request unless `cancelRefetch` is set, and `refetchIntervalInBackground` defaults to false so a hidden tab does not send those requests. Pass `signal` into axios (`getTorrents`, `getTorrent`). Do not point `queryFn` at a function whose first argument is an `AbortSignal` — React Query passes a context object.

`PwaUpdateToast` rechecks `sw.js` hourly. `VideoPlayer` heartbeats GStreamer every 30s and clears the interval on close.

## Stream and playlist URLs

Build them in `web/src/shared/lib/streamLinks.ts` (`encodePathSegment`, `streamPlayUrl`, `streamPreloadUrl`, `torrentPlaylistUrl`, `buildExternalPlayerHref`, `buildAndroidIntentHref`). `posterPlay.ts` re-exports the stream URLs. `usePlayLauncher` and `FilesDataGrid` call those. Do not interpolate `link=` by hand.

- Filename is one path segment: `encodePathSegment` (`encodeURIComponent`, then `%` + uppercase hex for `!'()*`).
- `link` and `index` go through `URLSearchParams` so `#`, `?`, `&`, `%` cannot split the query.
- Play flag stays valueless: `&play`. Preload is `GET /stream?…&preload` (the route without `*fname` exists). Playlist is `&m3u&fn=file.m3u`. The `fn` flag is the ForkPlayer workaround also used by `server/web/api/m3u.go` `nestedPlaylistEntry`.
- `externalLink` (`web/src/shared/lib/mediaBase.ts`) applies `GET /mediabase` (scheme, host, port) and then `withAuthMediaUrl`.
- `withAuthMediaUrl` adds Basic userinfo only when `hostname` matches the page. HTTPS UI + HTTP media on another port of the same host must still get the userinfo. A different host must not.
- Desktop VLC href is `vlc://${url}` unencoded. iOS VLC is `vlc-x-callback://x-callback-url/stream?url=` with the absolute URL encoded. Android VLC is `intent://${url-without-scheme}#Intent;scheme=…;type=video/*;end` (`buildAndroidIntentHref`). Infuse, SenPlayer, and IINA percent-encode the whole URL. Infuse episode lists fall back to one m3u URL past `INFUSE_PLAYLIST_HREF_LIMIT` (8000). Clipboard copy is `copyToClipboard` (`navigator.clipboard`, then a textarea inside the open dialog).

`CacheSize` in `BTSets` is **bytes** on the wire and **megabytes** inside `SettingsDialog` local state. `setSettings` runs `sanitizeBTSetsForWire`: integers are rounded, NaN uses the server default, `ReaderReadAHead` is clamped 5–100, `PreloadCache` 0–100. A JSON float into a Go `int` fails the entire `POST /settings` body. Read-only `set` and `def` return `403` and do not restart DLNA, Bonjour, or rutor. Nil `sets` returns `400` (`SetBTSets(nil)` would panic). Save stays disabled until the settings GET succeeds, so a failed load cannot overwrite the server with `web/src/shared/settings/defaults.ts`.

`StoreViewedInJson` is not edited in the form. Storage backend is `StorageSettingsPanel` → `/storage/settings`. Keep the field on the object you POST back.

GStreamer integer fields are rounded in `setGstSettings`. `GSTVersion` is a float.

## Rendering and XSS

Torrent titles and paths are rendered as React text. There is no `dangerouslySetInnerHTML` in `web/src`. Keep it that way.

File rows and the play-file picker use `content-visibility: auto`. The piece map is one `<canvas>` (`TorrentCache` / `drawSnake`), sized to the pane (not one cell per piece in a 15k-piece remux). `setupHiDpiCanvas` caps `devicePixelRatio` at 2 and does not reallocate the bitmap when the CSS size is unchanged. `buildFocusModel` intersects reader ranges with that window. Paint runs in `requestAnimationFrame` and skips when `cheapCellsFingerprint` is unchanged. `useUpdateCache` keeps at most 8 snake snapshots (`snakeSession.ts`).

## Service worker and cache

`web/vite.config.ts` `navigateFallbackDenylist` lists API prefixes so Workbox does not serve `index.html` for `/stream`, `/torrents`, `/cache`, `/settings`, `/echo`, and the rest. Add a new top-level API prefix there in the same change. Embedded headers live in `server/web/pages/template/route.go`: `no-cache` for `index.html`, `sw.js`, `workbox-*`; `immutable` for hashed `/static/`.

## MSX

`server/web/msx/msx.go` `/msx/proxy` fetches the `url` query with `http.DefaultClient` and forwards `header` query pairs. Tests expect it to attempt `127.0.0.1`. It is an open proxy on the same trust boundary as the process. Do not remove it as a drive-by.

Playlist `Content-Disposition` goes through `safeAttachmentName` in `server/web/api/m3u.go` (strip quotes and control characters).

# Verification Playbook

Before completing any frontend task:

1. **Lint & Type/Build Check:** From `web/`, `yarn typecheck`, `yarn lint`, and `yarn test` with 0 errors. `yarn i18n:check` when strings change. `yarn test:e2e` when the shell, settings, or auth gate changes.
2. **Asset Sync Check:** `make webgen` (or `make webgen-clean`), then `cd server && go test -race ./web/...`.
87 changes: 87 additions & 0 deletions .cursor/skills/principal-go-torrserver-architect/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
name: principal-go-torrserver-architect
description: >-
Principal Go systems and BitTorrent streaming architect for the TorrServer
`server/` module (anacrolix/torrent fork, torrstor piece cache, HTTP Range
/stream and /play). Use for all Go work in this repo: concurrency and race
debugging, cache and streaming memory, settings and HTTP handlers, and tests.
Read AGENTS.md before editing. There is no internal/ engine.
---

# TorrServer Go architect

Read [AGENTS.md](../../../AGENTS.md) before editing `server/`. That file is the map of locks, forks, traps, and commands. This skill is the working rule. Do not restate Go basics. Ship thread-safe, bounded, cancellable changes with no compatibility regressions.

Module path is `server`. Run Go from `server/`. `go 1.25.7` in `server/go.mod`. No root `go.mod`, no `internal/` tree.

Hot path: `GET/HEAD /stream` and `/play` → `torr.Torrent.Stream` → `torrstor.Reader` → piece cache → `anacrolix/torrent`. DLNA, Bonjour, FUSE, WebDAV, Telegram, MCP, and GStreamer stay off that path.

## Forks

Import upstream paths. `server/go.mod` replaces them:

- `github.com/anacrolix/torrent` → `github.com/lampac-nextgen/torrent`
- `github.com/anacrolix/utp` → `github.com/lampac-nextgen/utp`
- `github.com/anacrolix/upnp` → `github.com/tsynik/upnp`

`NE` comments are APIs this fork does not have (directory file storage, `DisableWebtorrent`, `HeaderObfuscationPolicy`, storage `Capacity`). Do not call them. `OE` comments are the live behavior.

Peer id prefix stays `-qB4390-` / `qBittorrent/4.3.9`. `UpnpID` stays `TorrServer/<version>`. `TotalHalfOpenConns` is 500.

## Do not touch unless the task names it

- `server/docs` (generated Swagger) and `server/web/pages/template/pages` (generated UI). Edit `web/src`, then rebuild.
- `server/gstreamer` CGo. Files are `//go:build gst`. Default tests compile `bridge/bridge_stub.go`. Do not pass `-tags gst` and do not grep `gstreamer` out of `make test`.
- New JS runtimes, plugin engines, or an FFmpeg pipeline. Remux already exists behind `gst`.
- `rutor` is in the default test set. Do not exclude it.

## Locks

`sync.RWMutex` is not reentrant. `RLock` then `Lock` on `BTServer.mu` deadlocks. `server/torr/clientrace_test.go` fails if `NewTorrent` holds the read lock across the write lock.

Order when both are needed: `settings.dbMigrationLock` then `settings.mu`; `BTServer.mu`; `Torrent.muTorrent`; `torrstor.Storage.mu` released before `Cache.Close`; cache `muRemove` → `muReaders` → `muActive`. `Reader.resume` drops `Reader.mu` around the anacrolix `Seek`. `applyZones` drops `muReaders` before `SetZones`.

Snapshot `t.Torrent`, `t.cache`, and `bt.client` under the mutex that owns them. `drop` nils the first two at any time. `Cache.pieces` is read-only after `Init`. `MemPiece.ReadAt` uses `Lock` because it writes `Accessed`.

Do not hold those mutexes across tracker HTTP, DHT, `publicip.Get4/Get6`, or disk flush. Full order and the `NewJsonDB` `:=` shadow are in AGENTS.md.

`FuseAutoMount` still calls `os.Exit(1)`. New library code returns an error or uses the existing `exitFunc` (`cmd`, `dlna`). `settings.Embedded` must not exit the host process.

## Streaming and trackers

- Copy buffer is `streamCopyPool`: `*[64KiB]byte`, not a bare `[]byte`. Read-ahead is `newBufferedStreamReader(..., 1<<20)`. Nil the pooled `ResponseWriter` before `Put`. `buf[:nr]` must not escape.
- Piece slabs are `*pieceSlab` pooled by exact length. `putPieceBuf` clears the full cap. `Release` does not recycle when `cache.isClosed`. Never keep a sub-slice after `Release`.
- Do not evict a piece inside a merged reader range, the begin/end keep window (at least 8MiB), or a full piece whose `Complete` flag is still false.
- Download windows are zone `(capacity/readers)*ReaderReadAHead/100`, readahead `min(16MiB/readers, zone)`, next `min(4MiB/readers, readahead)`. Push them on reader create, close, and the 1s `updateRA` tick. Not on every small `Read`. Do not call `Piece.SetPriority` from the cache: it raises over those tiers. `Piece.Release` only calls `UpdateCompletion`.
- Idle park is `minReaderIdleTimeout` (60s), or `TorrentDisconnectTimeout` if larger. `readerOff` must not `Seek` while `inFlight > 0`.
- `Reader.Close` does not unregister. `Cache.CloseReader` does, and it is safe on a nil `*Cache`.
- A handler that accepted the request must write a status. An empty return becomes `200` with an empty body.
- Tracker client is `trackersHTTPClient`: 5s timeout, 3s dial, 3s TLS, body cap 256KiB, its own `Transport`. Do not use `http.DefaultClient`. A failed refresh keeps the previous list and must not block startup.
- `SanitizeTrackers` does not cap the list. `addExtraTrackers` appends one tier. One tier per URL is an announce storm on this fork.
- DHT bootstrap uses `lookupDHTHost` and a 3s timeout. Do not switch it to `dht.GlobalBootstrapAddrs`.

## Tests

Use `server/torr/offlinetest`. The fork has no directory file storage.

```go
offlinetest.Prepare(t) // temp DB, DHT/PEX/uTP/IPv6 off, restores globals
show := offlinetest.WriteShow(t)
seed := offlinetest.Seed(t, show) // 127.0.0.1:0 memStore, already complete
```

`ffprobe`: shell script in `t.TempDir()`, assign `binFile`, `goffprobe.SetFFProbeBinPath`, restore in `t.Cleanup`. Windows skips. Telegram: `httptest` plus `tele.Settings{URL: srv.URL, Offline: true, Client: srv.Client()}`. Leaks: `leakcheck.AssertNoGoroutineLeak` and `leakcheck.Heap`. Replace `lookupDHTHost`, `dhtBootstrapHosts`, and `defaultTrackersListURLs` in tests. `LIVE_TORRENT=1` and `LIVE_INDEXER=1` stay opt-in.

## Done when

From the repo root:

```bash
make fmt-check
make lint
make test
```

`make test` is `-race -count=1 -timeout=10m -covermode=atomic` on every package except `server/docs`. Coverage floor is **70% total** (`.testcoverage.yml`). File and package floors are 0.

`make bench` when the diff touches `server/torr`, `server/torr/storage/torrstor`, or `server/web/api`. It benches only `./subs ./torr/storage/torrstor ./torrshash ./torrfs ./web/api`. The `torr` reader bench blocks on `GotInfo` and is excluded on purpose. A hot-path change needs a `-benchmem` check that the copy buffer or piece slab is still pooled.
40 changes: 40 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# TorrServer Docker Compose — copy to `.env` and adjust
# cp .env.example .env

# Container image (published releases)
TORRSERVER_IMAGE=ghcr.io/yourok/torrserver:latest
TORRSERVER_CONTAINER_NAME=torrserver

# Host directory for persistent data (config, torrent cache, logs)
TORRSERVER_DATA_DIR=./data

# Web UI / API port (must match ports mapping in docker-compose.yml)
TS_PORT=8090

# Paths inside the container (defaults match Dockerfile)
TS_CONF_PATH=/opt/ts/config
TS_LOG_PATH=/opt/ts/log/torrserver.log
TS_TORR_DIR=/opt/ts/torrents

# Optional bind address inside the container
# TS_IP=0.0.0.0

# Feature flags — set to 1 to enable
TS_HTTPAUTH=0
TS_RDB=0
TS_DONTKILL=0

# TLS
# TS_EN_SSL=1
# TS_SSL_PORT=8443

# BitTorrent proxy
# TS_PROXYURL=socks5h://user:password@example.com:2080
# TS_PROXYMODE=tracker

# Go runtime (Dockerfile default)
GODEBUG=madvdontneed=1

# Local build override (docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build)
# TORRSERVER_BUILD_CONTEXT=./dist/docker-context
# TORRSERVER_IMAGE=torrserver:local
26 changes: 26 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
version: 2
updates:
- package-ecosystem: "npm"
directory: "/web"
schedule:
interval: "weekly"
# Stay on TypeScript 6 until the toolchain (typescript-eslint, vue-tsc, …) supports 7.
ignore:
- dependency-name: "typescript"
update-types: ["version-update:semver-major"]
groups:
web-minor-patch:
update-types:
- "minor"
- "patch"
commit-message:
prefix: "deps(web)"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "ci"
include: "scope"
4 changes: 4 additions & 0 deletions .github/versions.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Go toolchain versions — single source for CI, GoReleaser, and local release builds.
# server/go.mod "go" directive should stay aligned with GO_ANDROID_VERSION (module minimum).
GO_VERSION=1.27.3
GO_ANDROID_VERSION=1.25.7
Loading
Loading