Compare commits

...

3675 commits

Author SHA1 Message Date
ed e7f2c6d806 update pkgs to 1.19.2 2025-08-17 11:51:56 +00:00
ed a113d3b925 v1.19.2 2025-08-17 11:21:25 +00:00
ed 96cb5abf53 extend vips heif formats 2025-08-17 11:07:02 +00:00
ed 55c85d0984 docker: add rawpy to iv/dj 2025-08-17 11:06:38 +00:00
ed 782e2f1de3 bbox: stay fullscreen 2025-08-17 10:42:45 +00:00
ed f4727f8ea3 fix config expansion order; closes #556 2025-08-17 10:05:25 +00:00
ed d4cf42e760 show severity in logs with no-ansi; #616 2025-08-17 09:06:23 +00:00
ed 98d117b8ad music-thumbs: use embedded art as default (closes #252);
previous behavior can be restored with --th-spec-p 2

thumbnails cache (.hist/th/) must be deleted to take effect
2025-08-16 23:00:15 +00:00
ed d9046f7e01 fix xvol false-positive;
given the following config:

* volume /a mapped to /srv/nas/
* volume /b mapped to /srv/nas/foo/
* anyone can read volume /a but not /b

accessing /a/foo/ would incorrectly fail because the xvol-check
would select /b based on its abspath being physically closer,
not considering that the same abspath is reachable from /a
2025-08-16 21:55:51 +00:00
ed dcc6b1b4ef fix download-selection in old firefox; closes #618 2025-08-16 21:54:45 +00:00
ed 274c074775 hide --rp-loc in tree; closes #306 2025-08-16 20:45:46 +00:00
Toast 187cae25bf
Build nix packages from source (#253)
* nix: get source tarball with update.py

* nix: build from source

nix: remove u2c and partyfuse packages
The main copyparty package has u2c and partyfuse, so these packages are
redundant now

nix: add fusepy dependency

fix: nix:  use replace pyfuse with fusepy

* nix: fix extra python packages

* nix: add optional dependencies

* nix: add partftpy package

* nix: add tftp parameter to package

* nix: enable pyproject for partftpy package

* nix: replace partftpy overlay with real package

* nix: add updater for partftpy

* nix: bring back local release pin to update.py

nix: update local release pin function in update.py

---------

Signed-off-by: Toast <39011842+toast003@users.noreply.github.com>
2025-08-16 06:29:03 +02:00
ed 43a19779c1 ftp: fix potential utime issue; closes #539 2025-08-15 21:36:02 +00:00
ed 23ea1c8a14 better dropdown color 2025-08-15 21:35:10 +00:00
ed e3c7d6776e fix test 2025-08-15 21:34:56 +00:00
ed 4df033ecc3 [DB-V6]: store usernames; closes #530 2025-08-15 21:33:13 +00:00
ed 1228b5510b option -ss requires webdav login; closes #613 2025-08-15 20:14:35 +00:00
ed 62e072a2ed restrict account to ip/subnet; closes #397 2025-08-15 20:12:17 +00:00
ed a4649d1e71 generic header auth (closes #504);
extends idp-auth to also accept a collection of headers (and
expected values of those headers) and map those to certain users

useful for Tailscale-User-Login and similar
2025-08-15 19:19:21 +00:00
ed f4a3fba29c add global-logout button 2025-08-14 21:53:57 +00:00
ed 3aa8b7aa2d ftp: reject uploads nicely; closes #573
if a client tries to upload where it does not have write-access,
rather than kicking the client with an exception, reply properly
2025-08-14 20:31:58 +00:00
ed d56230573d separate audio-transcode timeout (#598) 2025-08-14 20:02:32 +00:00
ed af8620da92 fix --lang helptext; closes #594 2025-08-14 19:50:50 +00:00
ed 2961dea5bb tl cleanup 2025-08-14 19:36:20 +00:00
nyqui 4e878d2f1e
initial Korean translation (#583)
Signed-off-by: nyqui <67160376+nyqui@users.noreply.github.com>
2025-08-14 19:30:41 +00:00
ed 7f44875061 autogen pw for blank-pw users (closes #596);
if a user is defined with a blank password,
generate a strong password for that user
2025-08-14 19:22:04 +00:00
ed 68907eaf48 add "@acct", a group with all authed users; closes #604 2025-08-14 19:11:57 +00:00
ed c4a4fddd27 translations: OK/Cancel; closes #599 2025-08-14 18:36:31 +00:00
ed 5b62742512 run from src with py3.9 2025-08-14 18:10:55 +00:00
ed 554cc2f3ee support xdev/xvol in rootless vfs; closes #603 2025-08-14 18:09:23 +00:00
ed 6303effe59 configurable max num cookies 2025-08-14 17:49:48 +00:00
ed 659f351c65 support pillow-heif; closes #607 2025-08-14 16:42:48 +00:00
Bevinsky d676a86f3f
Add Swedish translation (#551) 2025-08-13 22:50:15 +00:00
ed 715d374ee4 button to abort copy/move; closes #572 2025-08-12 21:46:42 +00:00
Danny Piper c9fd608732 feat: added cr3 to raw formats list
Signed-off-by: Danny Piper <djpiper28@gmail.com>
2025-08-12 22:19:54 +02:00
ed c32a672a68 fix transcoding tooltips; closes #580 2025-08-12 19:34:44 +00:00
ed 69d9878acd use the good name 2025-08-12 19:03:34 +00:00
varphi d8662aeb0e
add win95 light and dark themes (#581) 2025-08-12 19:01:41 +00:00
mat a407eb9269 warn if failed to import pyvips
pyvips uses `ffi.callback()`, which fails on on some systems
2025-08-12 20:15:26 +02:00
ed 1ebe06f51e sticky qr-code; #533 2025-08-11 20:49:09 +00:00
ed 88243ac8d6 make-rpm: small tweaks;
* fail fast on error
* ensure all deps

Signed-off-by: ed <s@ocv.me>
2025-08-11 20:36:14 +02:00
Kamalei Zestri 6ccc9224f3 make rpm 2025-08-11 20:36:14 +02:00
Adam R. Nelson 0177a9b402
Add RAW file thumbnailing support via rawpy (#567)
* add RAW image file types to mimetype list
* add RAW thumbnailer via rawpy

---------

Signed-off-by: Adam R. Nelson <adam@nels.onl>
Signed-off-by: ed <s@ocv.me>
2025-08-11 17:28:01 +00:00
AppleTheGolden 9435e6b2e2
EPUB Thumbnailing support (#561)
* EPUB Thumbnailing support

---------

Signed-off-by: ed <s@ocv.me>
Co-authored-by: ed <s@ocv.me>
2025-08-10 20:30:37 +00:00
Bevinsky 0da93659a4 Add missing translated string in up2k. 2025-08-10 22:04:09 +02:00
ed db2a03409c update pkgs to 1.19.1 2025-08-10 12:44:51 +00:00
ed c2cee222bd v1.19.1 2025-08-10 12:26:12 +00:00
ed b87f8f1b01 french improvements by @Equinoxs #553 2025-08-10 12:10:54 +00:00
ed a01870b744 avoid macos bug (finder hangs on connect) 2025-08-10 13:55:52 +02:00
ed 3560eeb10e better with sessions 2025-08-10 13:55:29 +02:00
ed 03acd65e96 avoid ios bug (keystore spam) 2025-08-10 11:45:20 +00:00
ed e5e822951d fix filter case-sensitivity 2025-08-10 11:31:12 +00:00
ed 347cf6a546 fix dropdown color 2025-08-10 11:28:22 +00:00
ed 8ba98877ee patch pyftpdlib, fixes #539
upgrading pyftpdlib brings only pain and no benefits
so grafting a patch for this instead
2025-08-10 11:23:22 +00:00
ed 3c78c6a880 custom mdns domain, closes #549 2025-08-10 10:07:41 +00:00
Andrew Lee 7aa21483c5
French translation part 2: splash.js #553 2025-08-10 10:06:23 +00:00
icxes 074e106e24 fix PRTY_CONFIG not reading global flags from the config 2025-08-10 12:02:44 +02:00
Tr3yWay996 e9ddfccfb6
Add French translation (#486)
Add French translation (#486)

---------

Signed-off-by: ed <s@ocv.me>
Co-authored-by: Packingdustry <alois.mc@hotmail.com>
Co-authored-by: Andrew Lee <andrew@alee14.me>
Co-authored-by: A. Jakubiak <contact@jakubiak.fr>
2025-08-09 20:26:52 +00:00
Chloe Surett 91ce7a29aa
Add .idea to .gitignore (#547) 2025-08-09 20:17:20 +00:00
Artur Borecki 392a4db55b
Add Polish translation (#463)
Add Polish translation

---------

Signed-off-by: Artur Borecki <me@pufereq.pl>
Signed-off-by: ed <s@ocv.me>
Co-authored-by: dai <contact@daimond113.com>
Co-authored-by: ed <s@ocv.me>
2025-08-08 22:55:57 +00:00
Kent Daleng 3931bc2779
legg åt nynorskoversetjing (#537)
* legg åt nynorskoversetjing, og fikser et par typos på bokmål også :)
* add nno to splash, fix a few more stray typos
* more til -> åt

---------

Signed-off-by: Kent D <lolexplode@gmail.com>
2025-08-08 22:54:24 +02:00
chamdim bd514f0666
Greek: fix typos (#529)
Signed-off-by: chamdim <94919340+chamdim@users.noreply.github.com>
2025-08-08 09:54:27 +02:00
chamdim f8a7c02f23
Greek: fix typo (#528)
Signed-off-by: chamdim <94919340+chamdim@users.noreply.github.com>
2025-08-08 09:54:11 +02:00
Vlad 0dd5987250
add Ukrainian translations for control panel (#525) 2025-08-08 09:53:50 +02:00
ed 4eca4885f3 update pkgs to 1.19.0 2025-08-07 22:43:08 +00:00
ed e9ecb2edc5 v1.19.0 2025-08-07 22:13:52 +00:00
ed f0b1c82b44 i18n: support czech declensions 2025-08-07 22:09:11 +00:00
Jakub Pelc c955658332
Czech translation (#471)
* added czech translation
* add czech translations to splash

---------

Signed-off-by: Jakub Pelc <jakub.pelc@seznam.cz>
Signed-off-by: ed <s@ocv.me>
Co-authored-by: ed <s@ocv.me>
2025-08-07 21:48:32 +00:00
ed a98360f213 copyparty.exe: update to python 3.13.6 2025-08-07 21:30:55 +00:00
ed 33497e6b11 sfx: add english-only 2025-08-07 21:28:56 +00:00
ed 36ab323d08 sfx: simplify (remove bruteforce packing) 2025-08-07 21:26:59 +00:00
ed 1bf23fabc6 unames: fix shares 2025-08-07 20:59:41 +00:00
ed d9e3f998d1 fix zipmaxu (it did nothing) 2025-08-07 20:53:25 +00:00
ed 1b71294aab close #387 2025-08-07 20:30:09 +00:00
ed 346515ccf1 add optional username login; closes #511 2025-08-07 20:29:44 +00:00
icxes 3c42a34f7b update PKGBUILD; remove prisonparty user service 2025-08-07 19:59:42 +00:00
icxes 13499d2846 remove prisonparty-user.service
there is no real point to a prisonparty user service, as chroot requires root
2025-08-07 19:59:42 +00:00
ed 8b31ed8816 text-editor: optional EOL conversion; closes #513 2025-08-07 19:11:28 +00:00
ed bcc3b1568e add qrcode to connectpage; closes #523 2025-08-07 18:39:22 +00:00
ed 2943c7f2d5 move the docker config smoketest over here 2025-08-07 18:30:40 +00:00
exci 34d98e9980
add systemd user services and templated services (#502)
* move service files from contrib/package/arch/ to /contrib/systemd/
* add simpler default copyparty.conf that puts users in jail
* remove warning about .conf files in ~/.config/copyparty/
* update PKGBUILD with changes
* add links to configuration examples in index.md
* fix link to the example config
* update README.md arch instructions

---------

Co-authored-by: icxes <icxes@dev.null@need.moe>
Co-authored-by: ed <s@ocv.me>
2025-08-07 18:10:26 +00:00
ed 9e980bb552 try to detect proxies with misbehaving caches (#488) 2025-08-07 17:57:10 +00:00
ed 3f8cb7e877 xff: require explicit configuration of --rproxy;
try to avoid dangerous misconfiguration of how to determine the
client's IP by more aggressively asking for the correct config;

if the --xff-hdr (default: x-forwarded-for) appears in a request
then it will now be ignored unless --rproxy says which IP to use
2025-08-07 17:00:42 +00:00
ed 4a04356814 fix non-e2d dupe finalizing;
when the up2k database is not enabled, only the
38400 most recent uploads are kept in memory serverside

the webui did not anticipate this, expecting the server to
finalize all dupes with just a single pass of brief handshakes

fix this by doing as many passes as necessary, only stopping if
a pass does not make any progress (filesystem-issues or some such)
2025-08-07 15:57:51 +00:00
ed 8a0746c6af fix viewing .MD files 2025-08-07 15:24:15 +00:00
ed 54caf63f6a optimize 2025-08-07 15:18:59 +00:00
mati1210 9b9d2a92ca
support systemd socket activation (fd passing) (#515)
* add support for socket passing
* slight tweaks before merge

---------

Signed-off-by: mat <matheuz1210@gmail.com>
Signed-off-by: ed <s@ocv.me>
Co-authored-by: ed <s@ocv.me>
2025-08-07 15:00:53 +00:00
ed a9ee4f24d5 dropdowns for languages, themes, key-notation 2025-08-06 21:53:20 +00:00
ed 29a4e54799 tl cleanup 2025-08-06 21:10:15 +00:00
ed 3b26884c69 tl cleanup 2025-08-06 21:08:11 +00:00
ed 392abd0675 add greek splash tl; closes #493 2025-08-06 21:02:25 +00:00
chamdim 50f46187f1
Greek translation (#468)
* Greek translation
* Update browser.js
* greek: fixes before merge

---------

Signed-off-by: chamdim <94919340+chamdim@users.noreply.github.com>
Signed-off-by: ed <s@ocv.me>
Co-authored-by: ed <s@ocv.me>
2025-08-06 21:00:42 +00:00
ed 7ae84dea1a autorefresh controlpanel 2025-08-06 20:30:01 +00:00
ed a57f7cc2f8 ie9: recent-uploads 2025-08-06 20:25:29 +00:00
ed 0f55a1ae86 fix js-crash for url //; closes #487 2025-08-06 20:24:31 +00:00
ed 00cb1f74e2 golf 2025-08-06 20:23:39 +00:00
ed b664ebb01f add chungus.conf (#475) 2025-08-04 22:56:37 +00:00
ed c2ac57a2a8 improve helptext for multi-value options (#475) 2025-08-04 22:56:30 +00:00
geekalaa 0df1901fc0 fix: add missing L. prefix for un_clip localization string
Fixes ReferenceError when copying links from recently uploaded files.
  The un_clip localization string was missing the L. prefix in up2k.js.

  Fixes #467
2025-08-04 18:11:16 +00:00
ed 8c000fd683 cleanup 2025-08-04 00:40:27 +00:00
ed d4397e7217 update pkgs to 1.18.10 2025-08-04 00:39:26 +00:00
ed d7e7e77f93 v1.18.10 2025-08-04 00:13:54 +00:00
ed 715f8424b3 tl cleanup 2025-08-03 23:42:51 +00:00
ed 40d56bb3f0 indicate play-as-audio for video files 2025-08-03 23:35:08 +00:00
ed f9502c3df3 add idp-cookie; for high-traffic / glitchy auth servers 2025-08-03 23:27:53 +00:00
ed ae5eefc528 add sfx explanation; #345 2025-08-03 23:02:56 +00:00
ed 6eaf8af15a pypi: add extras-group "all"; closes #398 2025-08-03 22:50:12 +00:00
ed 848315c009 do not force d2d with default vfs; #295
fixes v1.18.3 regression
2025-08-03 22:43:57 +00:00
ed 47fa4a9299 fix nosub with PUT uploads; closes #412 2025-08-03 22:34:37 +00:00
ed 9db8037e39 remove old joke
end of an era
2025-08-03 22:24:36 +00:00
ed 39e5582496 ignore browser-extension errors; closes #435 2025-08-03 22:14:31 +00:00
ed 16bbcce51b videos can be folder thumbnails; closes #459 2025-08-03 22:10:33 +00:00
ed e85a71070e docs: groups; closes #461 2025-08-03 21:42:26 +00:00
ed d0499257c8 fix tests 2025-08-03 21:36:38 +00:00
ed 7d3a5c1e97 black 2025-08-03 21:35:52 +00:00
ed 153d240d0d mention the -nc option in the max-conn errormsg 2025-08-03 21:35:33 +00:00
ed 66a5bf365b fix ipv6 qrcode port; closes #449 2025-08-03 21:33:08 +00:00
ed 0d09fb6818 audio transcoding tweaks 2025-08-03 21:23:41 +00:00
Toby Kohlhagen b2d48c646f Add flac transcoding option 2025-08-03 20:23:27 +00:00
Toby Kohlhagen b469db3c62 Add wav transcoding option 2025-08-03 20:23:27 +00:00
AOTREVAI a38e6e65d5
Translate to Italian (#458)
* Translating to Italian
* Update browser.js
* sync splash.js, browser.js
* Update browser.js
* Update splash.js

---------

Signed-off-by: AOTREVAI <46420278+AOTREVAI@users.noreply.github.com>
2025-08-03 20:38:16 +02:00
DeStilleGast 3798e19a26
Dutch translation (#426)
* Update browser.js to include Dutch language
* Update splash.js to include some Dutch translations

Signed-off-by: DeStilleGast <3677706+DeStilleGast@users.noreply.github.com>
2025-08-03 18:20:10 +02:00
Beethoven c805c60f40 (scripts/prep.sh) update
i forgot to follow the style woops

Signed-off-by: Beethoven <44652883+Beethoven-n@users.noreply.github.com>
2025-08-03 13:27:27 +00:00
Chinpo Nya c69c7c8ac0 additional instructions for --ah-cli 2025-08-03 13:26:56 +00:00
Techflash 50f1629355 Add test results for Wii Internet Channel
Signed-off-by: Techflash <72118300+techflashYT@users.noreply.github.com>
2025-08-03 13:23:18 +00:00
ed 0bc1b8f715 readme: webdav and opengraph are incompatible by default 2025-08-03 10:22:52 +00:00
icxes a68d5b03f1 fixup finnish translation here and there 2025-08-03 08:43:47 +00:00
ed 971360e914 set config from PRTY_CONFIG; closes #439 2025-08-02 23:24:32 +00:00
Kazi 7e3825f8f5
More verbose help text for TLS certificate flag (#429)
* Clarify TLS key in help text
* More verbose help text

---------

Signed-off-by: Kazi <kzshantonu@users.noreply.github.com>
2025-08-02 14:06:57 +00:00
ed b700072107 update pkgs to 1.18.9 2025-08-01 21:27:28 +00:00
ed ca22cd8853 v1.18.9 2025-08-01 20:56:27 +00:00
ed 09910ba807 fix GHSA-5662-2rj7-f2v6 ;
an unauthenticated user could make the server inaccessible by
accessing the recent-uploads page and using an expensive filter

fixed by making the filter not regex-based,
only supporting bare-minimum anchoring (^foo bar$)
2025-08-01 20:42:49 +00:00
Beethoven 3c6f0b17d0
add Debian packaging via MPR (#385)
* (scripts/prep.sh) prep mpr package at the same time as the arch package
* (contrib/package/makedeb-mpr/) add MPR package

i wanted this on my raspberry pi and i could've done it with docker but
this gives me a systemd service. i haven't actually uploaded this at all

---------

Signed-off-by: Beethoven <44652883+Beethoven-n@users.noreply.github.com>
2025-08-01 22:10:03 +02:00
ed 4fa7be2a48 change "ack" to "continue";
longer text so easier to tap on mobile, and less confusing for
people who aren't network engineers and/or kernel hackers

thx @JanluOfficial for the idea
2025-08-01 19:56:16 +00:00
ed 941761e6e7 tl cleanup 2025-08-01 19:50:38 +00:00
ed c160428810 support tabs in configfiles; closes #400 2025-08-01 18:00:48 +00:00
ed ad23b253dc add --localtime for ui; closes #312 2025-08-01 17:55:34 +00:00
ed d0d2f206a9 log creator of new/blank markdown files too 2025-08-01 17:49:23 +00:00
exci 7ecedb2ce2
add finnish translation (#381)
* reorder translations alphabetically
* R comes before S
* add initial finnish translation
* add splash.js for finnish translation
* add ct_utc translation (fin)
* fix finnish translation problems pointed out in review

---------

Co-authored-by: icxes <icxes@dev.null@need.moe>
2025-08-01 19:46:46 +02:00
ed fee1416cbc redundant 2025-08-01 15:09:10 +00:00
ed 6d6d79fcbc fix upload-abort in shares; closes #347 2025-08-01 15:08:55 +00:00
KevinXuxuxu 9c19753546 [u2c.py] Fix unicode files argument handling for py2.7 2025-08-01 14:39:57 +00:00
Juan Herruzo 4e8b88d8f6 fixed newline structure 2025-08-01 14:33:20 +00:00
Juan Herruzo 1ee89ec21d order spa alphabetically in language selector 2025-08-01 14:33:20 +00:00
Juan Herruzo 9dcb45133b order spa alphabetically 2025-08-01 14:33:20 +00:00
Juan Herruzo 1a5b7d40a8 changed esp to spa 2025-08-01 14:33:20 +00:00
Juan Herruzo 6e35171c88 added splash.js translation 2025-08-01 14:33:20 +00:00
Juan Herruzo af34fbf1a4 fix badly translated keys 2025-08-01 14:33:20 +00:00
Juan Herruzo be729fe557 small tweaks in the localization when looking a it in the gui 2025-08-01 14:33:20 +00:00
Juan Herruzo a1dfd0be33 added spanish draft 2025-08-01 14:33:20 +00:00
Kevin Leutzinger d357ff0d16 Update README.md
Signed-off-by: Kevin Leutzinger <6435727+kleutzinger@users.noreply.github.com>
2025-07-31 23:07:32 +00:00
Kevin Leutzinger e965dc9c74 Add uvx copyparty
Signed-off-by: Kevin Leutzinger <6435727+kleutzinger@users.noreply.github.com>
2025-07-31 23:07:32 +00:00
Toast f401fa7f6c nix: remove space from list separator
The extra speces made copyparty freak out if you tried listening to an ip
address and a unix socket at the same time
2025-07-31 23:05:31 +00:00
Benjamin Bock b69d590176 Improve Python 2 compatibility 2025-07-31 23:05:03 +00:00
ed 1f966bb9d5 devnotes: add tgz to build-from-scratch procedure 2025-07-31 22:57:14 +00:00
ed 3222ba3acd man 2025-07-31 22:56:45 +00:00
ed 0e35f37638 tl cleanup 2025-07-31 22:11:49 +00:00
ed edb5c2bdce
Revert "Added Dutch(NL) translation" (#380)
This reverts commit a2faf4e1e9.
2025-07-31 21:56:06 +00:00
ed 714744f73e
Revert "Added Dutch(NL) Translation to splash.js (#373)" (#379)
This reverts commit 1c86b64a4e.
2025-07-31 21:55:38 +00:00
Bart 1c86b64a4e
Added Dutch(NL) Translation to splash.js (#373) 2025-07-31 18:43:55 +00:00
crypt0rr a2faf4e1e9 Added Dutch(NL) translation 2025-07-31 18:23:50 +00:00
ed b46b5c35e3 tl cleanup 2025-07-31 18:19:47 +00:00
Vlad fea45e451d
add Ukrainian translation (#350) 2025-07-31 19:20:36 +02:00
Altair 0b05c726de
Translate to Russian (#321) 2025-07-31 19:01:41 +02:00
ed cd460902b0 update pkgs to 1.18.8 2025-07-31 08:45:18 +00:00
ed dccef40f3d v1.18.8 2025-07-31 08:33:34 +00:00
ed c17ce4892e fix pkgres on older python3 versions 2025-07-31 08:32:52 +00:00
ed 5df2cbe5d7 update pkgs to 1.18.7 2025-07-30 21:59:58 +00:00
ed daa44be1a5 v1.18.7 2025-07-30 21:31:54 +00:00
ed 13d5631b48 more escapes in case 2025-07-30 21:26:27 +00:00
ed a8705e611d fix GHSA-8mx2-rjh8-q3jq ;
this fixes a DOM-Based XSS in the recent-uploads page:

it was possible to execute arbitrary javascript by
tricking someone into visiting `/?ru&filter=</script>`

huge thanks to @Ju0x for finding and reporting this!
2025-07-30 21:19:39 +00:00
ed b7ca6f4a66 try to fix #300
the importlib stuff broke early versions of py2.7
2025-07-30 21:07:47 +00:00
ed 4f1eb89382 just moving some stuff around, not foreshadowing 2025-07-30 21:05:37 +00:00
Raphael Guntersweiler 9d32564c68
translate to german (#212)
* added german translation
2025-07-30 20:34:51 +00:00
ed 6016ec9388 connectpage: fix sharex 2025-07-30 20:30:18 +00:00
ed fb7cbc423b shares: move all config to webroot 2025-07-30 19:43:47 +00:00
ed e9684d402e fix ipv6 cors-chk 2025-07-30 19:41:45 +00:00
ed 6069bc9b19 mention optional idp persistence 2025-07-30 19:38:33 +00:00
ed f195998865 per-volume uid/gid; closes #265 2025-07-30 19:35:00 +00:00
ed a9d07c63ed disable libmagic on windows; probably closes #276 2025-07-30 18:02:11 +00:00
ed 053de61907 explain what Leeloo Dallas is doing here (closes #316)
also makes rejections from IdP auths less confusing;
it was handled by the config-parser throwing "invalid config"
2025-07-30 17:26:58 +00:00
Jo c3cc2ddeae
diskfree without root-reserved space (#285)
Signed-off-by: Jo <141064017+Arklaum@users.noreply.github.com>
2025-07-29 20:24:17 +00:00
ed 4988a55ea5 webdav: send diskfree; closes #272 2025-07-29 20:07:11 +00:00
ed 5c6341e99f disk-info: both free+total on windows too (#272) 2025-07-29 20:03:42 +00:00
ed fbf17be203 apply unlist to navpane too 2025-07-29 18:14:51 +00:00
ed 3cde1f3be2 docker-compose: PYTHONUNBUFFERED=1
almost zero performance impact with podman in kitty
2025-07-29 17:13:34 +00:00
Tom van Dijk 4915b14be1
various improvements to the nix files (#228)
* nix: allow passing extra packages in PATH

* nix: allow passing extra python packages

I wanted to use
https://github.com/9001/copyparty/blob/hovudstraum/bin/hooks/notify.py
but that wasn't really possible without this under the nix package.

* nix: format all nix files with nixfmt

* nix: reduce redundancy in the package

For readability

* nix: remove unused pyftpdlib import

* nix: put makeWrapper into the correct inputs

* nix: fill out all of meta

* nix: set formatter in flake for nix files

This allows contributors to format their nix changes with the `nix fmt`
command.

* nix: add u2c

* nix: add partyfuse

One downside of the way the nix ecosystem works is that MacFUSE needs to
be installed manually. Luckily the script tells you that already!

* nix: add missing cfssl import

* nix: add flake check that makes sure it builds with all flags

Because sometimes an import might be missing, and if it is an optional
then you'll only figure out that it's broken if you set the flag.

* nix: use correct overlay argument names

Or `nix flake check` will refuse to run the copyparty-full check
2025-07-29 00:16:30 +00:00
ed 735d9f9391 update pkgs to 1.18.6 2025-07-28 23:45:26 +00:00
ed cd40adccdb v1.18.6 2025-07-28 23:20:07 +00:00
ed 0f2c623599 nosub should prevent mkdir 2025-07-28 23:08:41 +00:00
ed 4adbe1b517 readme: fedora package is happening 2025-07-28 22:36:05 +00:00
ed 4f013f64fe fix helptext typo; closes #244 2025-07-28 22:24:14 +00:00
ed a9d1310296 wait lol 2025-07-28 22:20:50 +00:00
Adam 43e6da3454
add demo video link (#190)
* add feature showcase video

Signed-off-by: Adam <134429563+RustoMCSpit@users.noreply.github.com>

* add youtube link too

Signed-off-by: ed <s@ocv.me>

---------

Signed-off-by: Adam <134429563+RustoMCSpit@users.noreply.github.com>
Signed-off-by: ed <s@ocv.me>
Co-authored-by: ed <s@ocv.me>
2025-07-28 22:19:01 +00:00
AppleTheGolden 542a1de1ba cbz thumbnails: sort alphabetically
Comic readers will sort alphabetically, but that isn't always the order in which the files are stored in the zip.
2025-07-28 22:01:53 +00:00
ed 03d23daecb improve chmod helptext 2025-07-28 20:43:34 +00:00
ed cb019afecf standardize on /dev/shm/party.sock; closes #229 2025-07-28 20:29:40 +00:00
ptweezy 5b98e104f2 Update docker-compose.yml
The version attribute is deprecated, resolves error "the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion" when building with Docker

Signed-off-by: ptweezy <parkerbrayden@gmail.com>
2025-07-28 20:10:06 +00:00
ed df9feabcf8 add reflink-based dedup; closes #201 2025-07-28 19:46:15 +00:00
ed 674fc1fe08 make nginx example less confusing 2025-07-28 19:46:15 +00:00
ed a2601fd6ad chpw ratelimit 2025-07-28 19:46:15 +00:00
ed 025942a7d6
connect: hide "use real pw" when no accs (#242)
Disable the "use the real password" button on the connect page when there's no accounts
2025-07-28 19:33:16 +00:00
ed 510100c86b
Update svcs.js
Signed-off-by: ed <s@ocv.me>
2025-07-28 19:31:37 +00:00
Toast 161bbc7d26 connect-page: disable use real password button when there's no accounts 2025-07-28 21:14:26 +02:00
Chinpo Nya 7c9c962b79 nix: add /etc/group to systemd sandbox
allows specifying groups by name in the unix socket
2025-07-28 18:32:55 +00:00
ed cbdbaf1938 update pkgs to 1.18.5 2025-07-27 23:38:32 +00:00
ed cdfceb483e v1.18.5 2025-07-27 23:05:44 +00:00
ed 2228f81f94 block externally-hosted m3u files;
pointless security risk; made GHSA-9q4r-x2hj-jmvr much worse
2025-07-27 22:59:16 +00:00
ed 895880aeb0 fix GHSA-9q4r-x2hj-jmvr ;
this fixes a DOM-Based XSS when rendering multimedia metadata

assuming the media-indexing option is enabled, a malicious media file
could be uploaded to the server by a privileged user, executing
arbitrary javascript on anyone visiting and viewing the directory

the same vulnerability could also be triggered through an
externally-hosted m3u file, by tricking a user into
clicking a link to load and play this m3u file

huge thanks to @altperfect for finding and reporting this!
2025-07-27 22:56:38 +00:00
ed 6bb27e6091 audioplayer: stop at end-of-(song/folder); closes #214 2025-07-27 22:14:16 +00:00
ed d197e754b9 fix scroll after logtail (thx @Bevinsky)
if file was closed without using the [X] button, for example
with the browser back button, the tail would not abort
2025-07-27 21:17:44 +00:00
ed b0dec83aad connect: fix ipv6 and resolve .local only; closes #202 2025-07-27 20:32:45 +00:00
Masked e2c2dd18cf Improve host IP address handling in HttpCli
Added logic to detect if the user provided an IP address or hostname using the ipaddress module. This ensures correct resolution and mapping behavior based on the input type, improving reliability and correctness in network operations.
2025-07-27 19:51:40 +00:00
ed ca6d0b8d5e SameSite=Strict as default; closes #189 2025-07-27 18:18:49 +00:00
ed 48705a74c6 versus: nextcloud does chunked uploads 2025-07-26 18:22:51 +00:00
ed b419984709 docker: add ftps support 2025-07-26 10:50:38 +00:00
ed e00b97eee0 update pkgs to 1.18.4 2025-07-25 18:56:12 +00:00
ed 4dca1cf8f4 v1.18.4 2025-07-25 18:41:05 +00:00
ed edba7fffd3 add landmarks (#182) 2025-07-25 18:35:28 +00:00
ed 21a96bcfe8 add quickdelete option; closes #183
togglebutton in the ui switches between 2 (off/default) and
1 (on/quick) confirmations; global-option `--qdel` sets the default

setting `--qdel=0` changes the togglebutton to switch
between 1 (off/default) confirmations and 0 (on)

in other words, when the ui-button is enabled, it
always reduces the number of confirmations by one
2025-07-25 18:31:49 +00:00
ed 2d322dd48e fix unpost in new shares 2025-07-25 15:12:05 +00:00
ed df6d4df4f8 fix filekeys on windows 2025-07-24 23:07:04 +00:00
ed 5aa893973c update pkgs to 1.18.3 2025-07-21 23:30:16 +00:00
ed be0dd555a6 v1.18.3 2025-07-21 23:07:00 +00:00
ed 9921c43e3a add options to set default chmod (#181)
the unix-permissions of new files/folders can now be changed

* global-option --chmod-f, volflag chmod_f for files
* global-option --chmod-d, volflag chmod_d for directories

the expected value is a standard three-digit octal value
(User/Group/Other) such as 755, 750, 644, 640, etc
2025-07-21 22:46:28 +00:00
ed 14fa369fae macos fixes 2025-07-21 00:04:38 +02:00
ed 0f0f8d90c1 support --shr with --xvol; closes #179 2025-07-20 23:49:36 +02:00
ed 1afbff7335 fix some error-messages failing to render
would show a jinja-panic instead of explaining what went wrong
2025-07-20 23:39:08 +02:00
ed 8c32b0e7bb bbox: hide buttons fully; closes #180 2025-07-20 23:31:38 +02:00
ed 9bc4c5d2e6 mediaplayer: stay within search-results 2025-07-20 23:30:27 +02:00
ed 1534b7cb55 fix hotkey-help on macos 2025-07-20 23:27:44 +02:00
ed 56d3bcf515 rss: fix --rp-loc;
some rss links were malformed when combined with rp-loc
2025-07-14 03:48:27 +02:00
ed 78605d9a79 ios: force video embed
default on all other platforms, but apple thinks different
2025-07-09 14:11:45 +00:00
ed d46a40fed8 update pkgs to 1.18.2 2025-07-07 14:29:38 +00:00
ed ce4e489802 v1.18.2 2025-07-07 14:19:56 +00:00
ed fd7c71d6a3 add volflag to hide volume from controlpanel listing 2025-07-07 14:15:58 +00:00
ed fad2268566 update pkgs to 1.18.1 2025-07-07 13:39:55 +00:00
ed a95ea03cd0 v1.18.1 2025-07-07 13:20:59 +00:00
ed f6be390579 avoid pillow warning 2025-07-07 12:58:03 +00:00
ed 4f264a0a9c add idp-cache editor ui 2025-07-07 12:52:31 +00:00
ed d27144340f ie11 fix 2025-07-07 11:09:46 +00:00
ed 299cff3ff7 copyparty.exe: update pillow 2025-07-07 11:05:49 +00:00
ed 42c199e78e api for rescanning multiple volumes;
`?scan=/foo,/bar` will perform a filesystem reindexing of volumes
`/foo` and `/bar` even if they only have `e2d` and not `e2ds`
2025-07-07 09:53:03 +00:00
ed 1b2d39857b reset x-forwarded-for before next req;
assume the following stack: cpp <- rproxyA <- rproxyB <- WAN

if A also accepts WAN requests, and A muxes both B and WAN
onto a single connection to cpp, then WAN requests may get
tagged with the IP-address of the most recent B request

aside from the confusing logs, this could break
unpost on servers with shared accounts
2025-07-07 08:47:24 +00:00
ed ed908b9868 usb-eject: support non-alphanumeric volume names
until now, volumes with whitespace and such would fail to unmount

also adds a sanchk that the directory to unmount is still below the
expected parent after absreal; the path was already passed to gio in
a safe manner (assuming gio doesn't have any vulns) but why risk it
2025-07-07 08:35:41 +00:00
ed d162502c38 add idp-volume persistence (optional);
it keeps track of all seen users/groups by default,
but nothing takes effect unless --idp-store=3 or 2
2025-07-07 01:05:57 +02:00
ed bf11b2a421 drop corrupted sockets;
socket.accept() can fail silently --
this would crash the worker-pool and also produce
a confusing useless error-message while doing so

reported by someone on a mac with Little Snitch:
uv python install cpython-3.13.3-macos-aarch64-none
uv python pin cpython-3.13.3-macos-aarch64-none
uv sync
uv run copyparty

...but was also observed on x86_64 linux with
python 2.7 in 2018 (no longer reproduces)

fix this to log what's going on and also don't crash
2025-07-01 18:32:27 +00:00
morganamilo 77274e9d59 Add python-magic to iv and dj docker files 2025-06-29 11:14:02 +00:00
ed 8306e3d9de docker: disarm unmaintained images 2025-06-29 11:13:29 +00:00
ed deb6711b51 docker: add missing cleanup 2025-06-29 11:12:29 +00:00
ed 7ef6fd13cf navpane: fix scrollbar overlap 2025-06-28 21:10:48 +00:00
ed 65c4e03574 fix keyfinder build;
stopped working in alpine 3.22 due to switching to llvm,
which strictly requres CXXFLAGS rather than CFLAGS

the PKG_CONFIG_PATH change is unnecessary but might as well
2025-06-22 12:27:11 +00:00
ed c9fafb202d copyparty32.exe: fix segfault on win7 2025-06-22 01:17:48 +00:00
ed d4d9069130 update pkgs to 1.18.0 2025-06-22 00:59:42 +00:00
ed 7eca90cc21 v1.18.0 2025-06-22 00:20:31 +00:00
ed 6ecf4fdceb textfile-streaming fixes;
* add optional max duration, default-infinite
* add optional wordwrap, default-enabled
* url-param `...&tail` enables tailing in textviewer too
* hide bottom tray while tailing
2025-06-21 23:36:19 +00:00
ed 8cae7a715b fix linecrop bleed (#170):
chrome (only on windows and macos) could show the top
row of pixels of the truncated line; this seems to fix it
2025-06-20 16:55:47 +02:00
ed c75b0c25a6 ext-th: reduce specificity (#170);
thumbnails defined for file-extension '.asdf' will now also
apply to '.qwer.asdf' if no more specific ext-th is given
2025-06-20 16:25:30 +02:00
ed 9dd5dec093 adjustments after #171;
* move the new functionality to --rmagic
* performance tweaks
2025-06-19 17:25:31 +00:00
morganamilo ec05f8ccd5 Detect content-type when extension is missing or unknown
If a file has no known extension the content type gets set to
application/octet-stream causing the browser try and download the file
when viewed directly.

This quickly becomes annoying as many of the files I interact with often
have no extension. I.e., config files, log files, LICENSE files and
other random text files.

This patch uses libmagic to detect the file type and set the
content-type header. It also does this for the RSS feed and webdav for
sake of completeness.

This patch does not touch the front end at all so these files still have a 'txt'
button and a type of '%' in the web UI. But when clicked on, the browser
will display the files correctly.

This feature is enabled with the existing "magic" option. I thought this
fit as the existing functionality also uses libmagic and gives file
extensions to files on upload. Tell me if it should be its own option
instead.

The code base was very confusing, this patch works but I have no idea if
it's the way you'd like this implemented. Hopefully its acceptable as
is.
2025-06-19 17:18:23 +00:00
ed a1c7a095ee textfile-streaming fixes;
* give up on disconnect
* block scrapers from tailing
* prism throws on window-resize if riced object has poofed
* fix prism-init race
2025-06-19 17:07:06 +00:00
ed 77df17d191 add ui for streaming textfiles in realtime 2025-06-16 00:00:40 +00:00
ed fa5845ff5f readme: explain ext-th better; closes #170 2025-06-14 22:38:04 +00:00
ed 17fa490687 add ?tail 2025-06-14 21:13:14 +00:00
ed 1eff87c3bd copyparty.exe: upgrade to python 3.13 2025-06-13 21:53:16 +00:00
ed d123d2bff0 add test for non-idp group filtering 2025-06-13 19:34:58 +00:00
ed 5ac3864874 avoid new SyntaxWarning in python 3.14
this change should not alter behavior; the code was already correct

prevents the following message on stdout during startup:
SyntaxWarning: 'return' in a 'finally' block
2025-06-08 18:32:45 +02:00
ed c599e2aaa3 add opt for dotfile visibility default 2025-06-08 18:32:32 +02:00
ed 2e53f7979a IdP: multiple group rules for ${u} and ${g}
until now, ${u} would match all users,
${u%-foo} would exclude users in group foo,
${u%+foo} would only include users in group foo

now, the following is also possible:
${u%-foo,%-bar} excludes users in group foo and/or group bar,
${u%+foo,%+bar} only includes users which are in groups foo AND bar,
${g%-foo} skips group foo (includes all others),
${g%-foo,%-bar} skips group foo and/or bar (includes all others)

see ./docs/examples/docker/idp/copyparty.conf ;
https://github.com/9001/copyparty/blob/hovudstraum/docs/examples/docker/idp/copyparty.conf
2025-06-03 20:03:17 +00:00
ed f61511d8c8 docs: building from source / building from scratch 2025-05-29 21:54:54 +00:00
ed 47415a7120 update pkgs to 1.17.2 2025-05-27 20:11:24 +00:00
ed db7becacd2 v1.17.2 2025-05-27 19:39:22 +00:00
ed 28b63e587b docker: improve lack-of-config panic 2025-05-27 18:52:41 +00:00
ed 9cb93ae1ed fix upload into share with vproxy; closes #168 2025-05-27 16:29:03 +00:00
ed e3e51fb83a mitigate google-chrome slow hashing
file hashing became drastically slower in recent chrome versions;

* 748 MiB/s in 131.0.6778.86
* 747 MiB/s in 132.0.6834.160
* 485 MiB/s in 133.0.6943.60
* 319 MiB/s in 134.0.6998.36

the silver lining: it looks like chrome-bug 1352210 is improving
(crypto.subtle, the native hasher, now scales with multiple cores)

* 133.0.6943.60: speed peaked at 2 threads; 341 MiB/s, 485 MiB/s
* 134.0.6998.36: peak at 7; 193, 383, 383, 408, 421, 431, 438, 438
* 137.0.7151.41: peak at 8; 210, 382, 445, 513, 573, 573, 585, 598
   MiB/s when hashing with 1, 2, ..., 7, 8 webworkers respectively
   on a ryzen7-5800x with 2x16g 2133mhz ram

characteristics of versions between v134 and v137 are unknown
(cannot find old official builds to test), but v137 is a good
cutoff for minimizing risk of hitting chrome-bugs

meanwhile, hash-wasm scales linearly up to 8 cores;
0=328 1=377 2=738 3=947 4=1090 5=1190 6=1380 7=1530 8=1810
(0 = wasm on mainthread, no webworkers)

but it looks like chrome-bug 383568268 is making a return,
so keep the limit of max 4 threads if machine has more than
4 cores (and numCores-1 otherwise)
2025-05-27 15:33:50 +00:00
ed 49c7124776 fix errorhandling for browser-oom
because chrome-bug 383568268 is possibly making a return soon
(observed in google-chrome 138.0.7191.0 and chromium 139.0.7205.0)
2025-05-27 15:25:09 +00:00
Harsh Shandilya 60fb1207fc fix: disable use of aliases in nixpkgs
This enables compatibility with users who also disable aliases

The utillinux alias was added in 2020[1], which is older than the previous
Nixpkgs pin, which means we can safely switch to the non-aliased version.

1: 3896a0c0e2/pkgs/top-level/aliases.nix (L1967)
2025-05-27 10:17:15 +00:00
Harsh Shandilya 48470f6b50 fix: update to the latest NixOS release
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/884e3b68be02ff9d61a042bc9bd9dd2a358f95da' (2023-04-01)
  → 'github:NixOS/nixpkgs/7c43f080a7f28b2774f3b3f43234ca11661bf334' (2025-05-25)
2025-05-27 10:17:15 +00:00
ed 1d308eeb4c minimal-up2k: add usage instructions 2025-05-21 20:53:19 +00:00
ed 84f5f41747 unconditionally apply --rp-loc (#165)
previously, `--rp-loc` only took effect for trusted reverse-proxies

this was a source of confusion when setting up a config from
scratch, since there is no obvious relation to `--xff-src`

as this behavior was incidental, `--rp-loc` is now always applied,
even if the proxy is untrusted (or not detected at all)
2025-05-19 22:01:29 +00:00
ed 19189afb34 docker: fix i386 builds 2025-05-18 23:49:41 +00:00
ed 23e77a3389 update pkgs to 1.17.1 2025-05-18 22:52:49 +00:00
ed ecced0c4f2 v1.17.1 2025-05-18 22:34:16 +00:00
ed d4a8071de5 add kde dolphin to connect-page
mentions the specific protocol (webdav/webdavs) to use, #162
2025-05-18 22:07:03 +00:00
ed 261236e302 st_mtime can be -11644473600 on win64 fat16 vhd 2025-05-18 21:34:38 +00:00
ed 0de09860f6 new option: default-hasher for PUTs 2025-05-17 16:55:29 +02:00
ed bfb39969a4 macos: fix test race 2025-05-16 12:28:34 +02:00
ed 256dad8cc0 button to zip/tar current folder 2025-05-14 18:02:38 +02:00
ed a247ba9ca3 update translations 2025-05-14 17:51:33 +02:00
ed 0a9a807772 fix xbu/xau reloc collision-handling;
if a hook relocates a file into a folder where that same file
exists with the same filename, the filename-collision-avoidance
would kick in, generating a new filename and another copy
2025-05-14 15:45:52 +02:00
ed 41fa6b2552 improve tagscan-resume for dupes;
* ignore t:mtp (the todo-flag) when spooling the resume-list
* only add a single t:mtp for each unique file
2025-05-14 12:32:30 +02:00
ed f425ff51ae cross-filesystem-move fixes
* nonlocal markdown backups
* relocation-hooks

tested on macos, to be verified on Linux/windows
2025-05-14 12:30:59 +02:00
ed 7cde9a2976 alias .oga to .ogg
because firefox renames .ogg files to .oga when saving
2025-05-12 18:50:29 +02:00
ed 5dcd88a6c8 add option --put-name; closes #164 2025-05-12 10:30:41 +02:00
ed c3ef3fdc1f fix --shr with pw-hash; closes #162
--ah-alg now also applies to password-protected shares
2025-05-11 20:10:00 +02:00
ed b9ba783c1c official archlinux package 2025-05-05 21:25:52 +02:00
Gabriel Venberg d1bca1f52f
nixos: revamp (#159)
* formatting clean-up with alejandra.

* added ability to specify user and group.

* added option to have hist data live with volumes.

* improved my understanding of what paths copyparty needs to function.

* added environment script.

* Revert "added environment script."

Cant have 2 instances of copyparty running, even if one is just for
ah-cli...

This reverts commit c60c8d8e0b.

* fixup! added ability to specify user and group.

* Reapply "added environment script."

This reverts commit a54e950ecc.

* Moved back to TemporaryFileSystem for system hardening.

I misunderstood bind mounts...

* made systemd.tmpfiles rules to ensure the volume directories exist.

* changed copyparty-env script to copyparty-hash.

* removed seperatehist in favor of default settings attrset.

* new update of copyparty removed the need for some options.

* minor refactoring.

* fixed some descriptions that had not kept up with changes.

* fixup! removed seperatehist in favor of default settings attrset.
2025-04-29 14:48:17 +02:00
ed 94352f278b non-https clipboard newlines; fixes #161 2025-04-28 19:00:13 +00:00
ed 4fb87ebe32 flatcase best case 2025-04-27 09:25:01 +00:00
ed 3cbb7243ab update pkgs to 1.17.0 2025-04-26 22:50:45 +00:00
ed fff45552da v1.17.0 2025-04-26 21:49:09 +00:00
ed 95157d02c9 ie11 can't sandbox; add minimal fallback 2025-04-26 20:14:23 +00:00
ed 3090c74832 ie11: fix debounce-untint;
css 'unset' appeared in chr41, ff27

dom.closest appeared in chr41, ff35
2025-04-26 19:57:59 +00:00
ed 4195762d2a playlist: when lacking perms, s/edit/view/ 2025-04-26 19:28:12 +00:00
ed dc3b7a2720 reduce --th-ram-max floor;
helps avoid oom in a vm with 512 MiB ram
2025-04-26 19:06:32 +00:00
ed ad200f2b97 add ui for creating playlists 2025-04-26 00:19:41 +00:00
ed 897f9d328d audioplayer: load and play m3u8 playlists 2025-04-25 22:33:00 +00:00
ed efbe34f29d readme: mention basic-auth behavior 2025-04-25 18:57:12 +00:00
ed dbfc899d79 pw-hash tweaks (#159):
* do not take lock on shares-db / sessions-db when running with
   `--ah-gen` or `--ah-cli` (allows a 2nd instance for that purpose)

* add options to print effective salt for ah/fk/dk; useful for nixos
   and other usecases where config is derived or otherwise opaque
2025-04-25 18:12:35 +00:00
ed 74fb4b0cb8 fix --u2j helptext:
* mention potential hdd-bottleneck from big values
* most browsers enforce a max-value of 6 (c354a38b)
* chunk-stitching (132a8350) made this less important;
   still beneficial, but only to a point
2025-04-24 20:51:45 +00:00
ed 68e7000275 update pkgs to 1.16.21 2025-04-20 19:19:35 +00:00
ed 38c2dcce3e v1.16.21 2025-04-20 18:36:32 +00:00
ed 5b3a5fe76b show warning on ctrl-a in lazyloaded folders 2025-04-20 13:33:01 +00:00
ed d5a9bd80b2 docker: hide healthcheck from logs 2025-04-20 12:26:56 +00:00
ed 71c5565949 add button to loop/repeat music; closes #156 2025-04-20 11:45:48 +00:00
ed db33d68d42 zip-download: eagerly 64bit data-descriptors; closes #155
this avoids a false-positive in the info-zip unzip zipbomb detector.

unfortunately,

* now impossible to extract large (4 GiB) zipfiles using old software
   (WinXP, macos 10.12)

* now less viable to stream download-as-zip into a zipfile unpacker
   (please use download-as-tar for that purpose)

context:

the zipfile specification (APPNOTE.TXT) is slightly ambiguous as to when
data-descriptor (0x504b0708) filesize-fields change from 32bit to 64bit;
both copyparty and libarchive independently made the same interpretation
that this is only when the local header is zip64, AND the size-fields
are both 0xFFFFFFFF. This makes sense because the data descriptor is
only necessary when that particular file-to-be-added exceeds 4 GiB,
and/or when the crc32 is not known ahead of time.

another interpretation, seen in an early version of the patchset
to fix CVE-2019-13232 (zip-bombs) in the info-zip unzip command,
believes the only requirement is that the local header is zip64.

in many linux distributions, the unzip command would thus fail on
zipfiles created by copyparty, since they (by default) satisfy
the three requirements to hit the zipbomb false-positive:

* total filesize exceeds 4 GiB, and...
* a mix of regular (32bit) and zip64 entries, and...
* streaming-mode zipfile (not made with ?zip=crc)

this issue no longer exists in a more recent version of that patchset,
https://github.com/madler/unzip/commit/af0d07f95809653b
but this fix has not yet made it into most linux distros
2025-04-17 18:52:47 +00:00
ed e1c20c7a18 readme: mention bootable flashdrive / cdrom 2025-04-17 18:45:50 +00:00
ed d3f1b45ce3 update pkgs to 1.16.20 2025-04-13 22:32:06 +00:00
ed c7aa1a3558 v1.16.20 2025-04-13 21:51:39 +00:00
ed 7b2bd6da83 fix sorting of japanese folders
directory-tree sidebar did not sort correctly for non-ascii names

also fix a natural-sort bug; it only took effect for the
initial folder load, and not when changing the sort-order

also, natural-sort will now apply to all non-numeric fields,
not just the filename like before
2025-04-13 21:11:07 +00:00
ed 2bd955ba9f race-the-beam: improve phrasing 2025-04-13 18:51:45 +00:00
ed 98dcaee210 workaround ffmpeg-bug 10797
reduces ram usage from 1534 to 230 MiB when generating spectrograms
of files which are decoded by libopenmpt, so most s3xmodit formats
2025-04-13 18:51:35 +00:00
ed 361aebf877 warn on zeroconf with uds-only 2025-04-13 16:38:29 +00:00
ed ffc1610980 dont crash if qrcode + mdns + uds 2025-04-13 16:11:36 +00:00
ed 233075aee7 ctrl-a selects all files in gridview too 2025-04-13 16:09:49 +00:00
ed d1a4d335df increase treenav scroll-margins
was too small in deep folders, and/or long foldernames
2025-04-13 16:09:14 +00:00
ed 96acbd3593 cleanup
* remove cpr bonk (deadcode)
* remove get_vpath (wasteful)
2025-04-13 16:08:44 +00:00
thaddeus kuah 4b876dd133 full lowercase on login button to match the page
Signed-off-by: thaddeus kuah <tk@tkkr.dev>
2025-04-11 23:56:51 +02:00
ed a06c5eb048 new xau hook: podcast-normalizer.py 2025-04-09 19:44:13 +00:00
ed c9cdc3e1c1 update pkgs to 1.16.19 2025-04-08 21:52:43 +00:00
ed c0becc6418 v1.16.19 2025-04-08 21:32:51 +00:00
ed b17ccc38ee prefer XDG_CONFIG_HOME on all platforms
convenient escape-hatch
2025-04-08 19:23:14 +00:00
ed acfaacbd46 enforce single-instance for session/shares db
use file-locking to detect and prevent misconfigurations
which could lead to subtle unexpected behavior
2025-04-08 19:08:12 +00:00
ed 8e0364efad if this is wrong i blame suzubrah for playing entirely too hype music at 6am in the fkn morning
improve shares/session-db smoketests and error semantics
2025-04-08 05:42:21 +00:00
ed e3043004ba improve u2ow phrasing 2025-04-07 20:48:43 +00:00
ed b2aaf40a3e speedgolf
in some envs (unsure which), importlib.resources is an
expensive import; drop it when we know it's useless
2025-04-07 20:34:55 +00:00
ed 21db8833dc tests: fix for f9954bc4e5 2025-04-07 18:59:43 +00:00
ed ec14c3944e fix DeprecationWarning: Accessing argon2.__version__ is deprecated and will be removed in a future release. Use importlib.metadata directly to query for structlog's packaging metadata. 2025-04-07 18:51:13 +00:00
ed 20920e844f svg newlines + fix cleaner warning:
* support newlines in svg files;
  * `--error--\ncheck\nserver\nlog`
  * `upload\nonly`

* thumbnails of files with lastmodified year 1601 would
   make the cleaner print a harmless but annoying warning
2025-04-07 18:47:20 +00:00
ed f9954bc4e5 smoketest fs-access when transcoding
the thumbnailer / audio transcoder could return misleading errors
if the operation fails due to insufficient filesystem permissions

try reading a few bytes from the file and bail early if it fails,
and detect/log unwritable output folders for thumbnails

also fixes http-response to only return svg-formatted errors
if the initial request expects a picture in response, not audio
2025-04-07 18:41:37 +00:00
thaddeus kuah d450f61534
Apply custom fonts to buttons and input fields (#152)
* set custom font for inputs and buttons

Signed-off-by: Thaddeus Kuah <tk@tkkr.dev>
2025-04-06 19:15:10 +00:00
ed 2b50fc2010 fix mkdir in symlinked folders; closes #151
remove an overly careful safety-check which would refuse creating
directories if the location was outside of the volume's base-path

it is safe to trust `rem` due to `vpath = undot(vpath)` and
a similar check being performed inside `vfs.get` as well,
so this served no purpose
2025-04-06 09:18:40 +00:00
ed c2034f7bc5 add GoogleOther to bad-crawlers list 2025-04-01 21:29:58 +02:00
ed cec3bee020 forbid all use of LLM / AI when writing code 2025-03-31 17:25:56 +00:00
ed e1b9ac631f separate histpath and dbpath options (#149)
the up2k databases are, by default, stored in a `.hist` subfolder
inside each volume, next to thumbnails and transcoded audio

add a new option for storing the databases in a separate location,
making it possible to tune the underlying filesystem for optimal
performance characteristics

the `--hist` global-option and `hist` volflag still behave like
before, but `--dbpath` and volflag `dbpath` will override the
histpath for the up2k-db and up2k-snap exclusivey
2025-03-30 16:08:28 +00:00
ed 19ee64e5e3 clarify that all dependencies are optional (#149) 2025-03-30 13:30:52 +00:00
ed 4f397b9b5b add zfs-tune (#149) 2025-03-30 13:30:15 +00:00
ed 71775dcccb mention mimalloc 2025-03-30 13:17:12 +00:00
ed b383c08cc3 add review from ixbt forums 2025-03-29 13:57:35 +00:00
ed fc88341820 add option to store markdown backups elsewhere
`--md-hist` / volflag `md_hist` specifies where to put old
versions of markdown files when edited using the web-ui;

* `s` = create `.hist` subfolder next to the markdown file
   (the default, both previously and now)

* `v` = use the volume's hist-path, either according to
   `--hist` or the `hist` volflag. NOTE: old versions
   will not be retrievable through the web-ui

* `n` = nope / disabled; overwrite without backup
2025-03-26 20:07:35 +00:00
ed 43bbd566d7 mention mimalloc in docker-compose examples (thx thad) 2025-03-24 23:19:17 +00:00
ed e1dea7ef3e dangit 2025-03-23 23:28:05 +00:00
ed de2fedd2cd update pkgs to 1.16.18 2025-03-23 23:04:53 +00:00
ed 6aaafeee6d v1.16.18 2025-03-23 22:16:40 +00:00
ed 99f63adf58 google isn't taking the hint
specifically google, but also some others, have started ignoring
rel="nofollow" while also understanding just enough javascript to
try viewing binary files as text
2025-03-23 21:21:41 +00:00
ed de2c978842 docker: suggest mimalloc 2025-03-23 20:45:03 +00:00
ed 3c90cec0cd forgot these
pyinstaller/build.sh: fix jinja2 after upgrade

up2k.py: fix double-hs after dupe finalize
2025-03-23 20:19:18 +00:00
ed 57a56073d8 use zlib-ng when available
download-as-tar-gz becomes 2.4x faster in docker

segfaults on windows, so don't use it there

does not affect fedora or gentoo,
since zlib-ng is already system-default on those

also adds a global-option to write list of successful
binds to a textfile, for automation / smoketest purposes
2025-03-23 20:15:21 +00:00
ed 2525d594c5 19a5985f removed the restriction on uploading logues, as it was
too restrictive, blocking editing through webdav and ftp

but since logues and readmes can be used as helptext for users
with write-only access, it makes sense to block logue/readme
uploads from write-only users

users with write-only access can still upload any file as before,
but the filename prefix `_wo_` is added onto files named either
README.md | PREADME.md | .prologue.html | .epilogue.html

the new option `--wo-up-readme` restores previous behavior, and
will not add the filename-prefix for readmes/logues
2025-03-22 14:21:35 +00:00
ed a0ecc4d88e update pkgs to 1.16.17 2025-03-16 21:13:23 +00:00
ed accd003d15 v1.16.17 2025-03-16 20:02:51 +00:00
ed 9c2c423761 IdP: extend ${u} with syntax to exclude by group
just like before, if vpath contains ${u} then
the IdP-volume is created unconditionally

but this is new:

${u%+foo} creates the vol only if user is member of group foo

${u%-foo} creates the vol if user is NOT member of group foo
2025-03-16 19:28:23 +00:00
ed 999789c742 improve accuracy of failsafe-check
also fix fsutil relabel after 8417098c
2025-03-16 18:49:42 +00:00
ed 14bb299918 hide zip-link when user not allowed 2025-03-16 18:08:20 +00:00
ed 0a33336dd4 cosmetic: fix zipmax in up2k volume-listing 2025-03-16 17:51:50 +00:00
ed 6a2644fece set nofollow on ?doc links
google keeps trying to read binaries as text, maybe now it won't
2025-03-16 11:57:42 +00:00
ed 5ab09769e1 move symlinks as-is; don't expand into full files
previously, when moving or renaming a symlink to a file (or
a folder with symlinks inside), the dedup setting would decide
whether those links would be expanded into full files or not

with dedup disabled (which is the default),
all symlinks would be expanded during a move operation

now, the dedup-setting is ignored when files/folders are moved,
but it still applies when uploading or copying files/folders

* absolute symlinks are moved as-is

* relative symlinks are rewritten as necessary,
   assuming both source and destination is known in db
2025-03-15 23:54:32 +00:00
ed 782084056d filter appledoubles from uploads
should catch all the garbage that macs sprinkle onto flashdrives;
https://a.ocv.me/pub/stuff/?doc=appledoubles-and-friends.txt

will notice and suggest to skip the following files/dirs:

* __MACOSX
* .DS_Store
* .AppleDouble
* .LSOverride
* .DocumentRevisions-*
* .fseventsd
* .Spotlight-V*
* .TemporaryItems
* .Trashes
* .VolumeIcon.icns
* .com.apple.timemachine.donotpresent
* .AppleDB
* .AppleDesktop
* .apdisk

and conditionally ._foo.jpg if foo.jpg is also being uploaded
2025-03-15 21:16:54 +00:00
ed 494179bd1c optional max-size for download-as-zip/tar 2025-03-14 23:36:01 +00:00
ed 29a17ae2b7 fix detection of unsafe IdP volumes; closes #147
was overly aggressive until now, thinking the following was unsafe:

-v 'x::'                                  # no-anonymous-access
-v 'x/${u}:${u}:r:A,${u}'           # world-readable,user-admin
-v 'x/${u}/priv:${u}/priv:A,${u}'             # only-user-admin

now it realizes that this is safe because both IdP volumes
will be created/owned by the same user

however, if the first volume is 'x::r' then this is NOT safe,
and is now still correctly detected as being dangerous

also add a separate warning if `${g}` and `${u}` is mixed
in a volpath, since that is PROBABLY (not provably) unsafe
2025-03-14 21:08:21 +00:00
ed 815d46f2c4 this keyboard sure is bouncy 2025-03-09 21:14:53 +01:00
ed 8417098c68 fix dl from shares with -j0; closes #146
`write_dls` assumed `vfs.all_nodes` included shares; make it so

shares now also appear in the active-downloads list, but the
URL is hidden unless the viewer definitely already knows the
share exists (which is why vfs-nodes now have `shr_owner`)

also adds PRTY_FORCE_MP, a beefybit (opposite of chickenbit)
to allow multiprocessing on known-buggy platforms (macos)
2025-03-09 21:10:31 +01:00
ed 25974d660d improve errmsg when reading non-utf8 files (#143)
previously, the native python-error was printed when reading
the contents of a textfile using the wrong character encoding

while technically correct, it could be confusing for end-users

add a helper to produce a more helpful errormessage when
someone (for example) tries to load a latin-1 config file
2025-03-09 11:59:33 +01:00
ed 12fcb42201 github: mention preferred language 2025-03-08 23:58:07 +02:00
ed 16462ee573 xff-warning: suggest proper /64 for ipv6 2025-03-06 19:57:20 +01:00
ed 540664e0c2 usb-eject nitpicks
* fix navpane reload
* strip trailing newlines in toasts
2025-03-02 23:51:35 +00:00
ed b5cb763ab1 usb-eject: treepar fix
since this dumb plugin found an actual usecase,
fix the most glaring issue

when nodes overflow from treeul into treepar, the
eject-button is cloned over as well, but the clone
does nothing (as expected), though this will also
cause a flood of new eject-buttons appearing, and
that's worth fixing

NB: check treeul + treepar explicitly; avoid docul
2025-03-01 22:03:18 +00:00
ed c24a0ec364 update pkgs to 1.16.16 2025-02-28 19:16:27 +00:00
ed 4accef00fb v1.16.16 2025-02-28 18:46:32 +00:00
ed d779525500 move -volflag warning to avoid false positives 2025-02-28 18:13:23 +00:00
ed 65a7706f77 add helptext for volflags dk, dks, dky 2025-02-28 17:56:51 +00:00
ed 5e12abbb9b ignore impossible lastmod on upload; closes #142
android-chrome bug https://issues.chromium.org/issues/393149335
sends last-modified time `-11644473600` for all uploads

this has been fixed in chromium, but there might be similar
bugs in other browsers, so add server-side and client-side
detection for unreasonable lastmod times

previously, if the js detected a similar situation, it would
substitute the lastmod-time with the client's wallclock, but
now the server's wallclock is always preferrred as fallback
2025-02-28 17:48:14 +00:00
daimond113 e0fe2b97be nix: add mainProgram
Silences warnings like "getExe: Package
"copyparty-1.16.15" does not have the
meta.mainProgram attribute. We'll assume that the
main program has the same name for now, but this
behavior is deprecated, because it leads to
surprising errors when the assumption does not
hold. If the package has a main program, please
set `meta.mainProgram` in its definition to make
this warning go away. Otherwise, if the package
does not have a main program, or if you don't
control its definition, use getExe' to specify
the name to the program, such as lib.getExe' foo
"bar"."
2025-02-26 23:07:19 +01:00
ed bd33863f9f update pkgs to 1.16.15 2025-02-25 01:25:15 +00:00
ed a011139894 v1.16.15 2025-02-25 00:17:58 +00:00
ed 36866f1d36 dangit.wav 2025-02-25 00:11:57 +00:00
ed 407531bcb1 fix markdown / text-editor jank
* only indicate file-history for markdown files since
   other files won't load into the editor which makes
   that entirely pointless; do file extension instead

* text-editor: in files containing one single line,
   ^C followed by ^V ^Z would accidentally a letter

and fix unhydrated extensions
2025-02-25 00:03:22 +00:00
ed 3adbb2ff41 https://youtu.be/WyXebd3I3Vo 2025-02-24 23:32:03 +00:00
ed 499ae1c7a1 other minor html-escaping fixes
mostly related to error-handling for uploads, network-loss etc,
nothing worse than the dom-xss just now
2025-02-24 22:42:05 +00:00
ed 438ea6ccb0 fix GHSA-m2jw-cj8v-937r ;
this fixes a DOM-Based XSS when preparing files for upload;
empty files would have their filenames rendered as HTML in
a messagebox, making it possible to trick users into running
arbitrary javascript by giving them maliciously-named files

note that, being a general-purpose webserver, it is still
intentionally possible to upload and execute arbitrary
javascript, just not in this unexpected manner
2025-02-24 21:23:13 +00:00
ed 598a29a733 mention sony psp support (thx dwarf) 2025-02-23 21:37:21 +00:00
ed 6d102fc826 mention risc-v support 2025-02-20 04:51:04 +00:00
ed fca07fbb62 update pkgs to 1.16.14 2025-02-19 23:35:05 +00:00
ed cdedcc24b8 v1.16.14 2025-02-19 23:09:14 +00:00
ed 60d5f27140 new example: randpic.py 2025-02-19 22:41:30 +00:00
ed cb413bae49 webdav: a healthy dash of paranoia
there's probably at least one client sending `Overwrite: False`
instead of the spec-correct `Overwrite: F`
2025-02-19 22:07:26 +00:00
ed e9f78ea70c up2k: tristate option for overwriting files; closes #139
adds a third possible value for the `replace` property in handshakes:

* absent or False: never overwrite an existing file on the server,
   and instead generate a new filename to avoid collision

* True: always overwrite existing files on the server

* "mt": only overwrite if client's last-modified is more recent
   (this is the new option)

the new UI button toggles between all three options,
defaulting to never-overwrite
2025-02-19 21:58:56 +00:00
ed 6858cb066f spinner: themes + improve positioning
loading-spinner is either `#dlt_t` or `#dlt_f`
(tree or files), appearing top-left or top-right,
regardless of page/tree scroll (position:fixed)
2025-02-19 18:55:33 +00:00
ed 4be0d426f4 option to forget uploader-IP from db after some time
does this mean copyparty is GDPR-compliant now? idklol
2025-02-17 23:47:59 +00:00
ed 7d7d5d6c3c fix custom spinner css on initial page load 2025-02-17 23:26:21 +00:00
ed 0422387e90 readme: changing the loading spinner (#138) 2025-02-16 19:28:57 +00:00
ed 2ed5fd9ac4 readme: diagnosing broken thumbnails (#137) 2025-02-16 19:22:17 +00:00
ed 2beb2acc24 readme: permanent cloudflare tunnel (#137) 2025-02-16 18:59:18 +00:00
ed 56ce591908 synology dsm: add updating 2025-02-16 18:12:35 +00:00
ed b190e676b4 fix cosmetic volflag stuff:
* `xz` would show the "unrecognized volflag" warning,
   but it still applied correctly

* removing volflags with `-foo` would also show the warning
   but it would still get removed correctly

* hide `ext_th_d` in the startup volume-listing
2025-02-14 20:54:13 +00:00
ed 19520b2ec9 remove patch for musl cve (no longer necessary) 2025-02-14 09:15:52 +00:00
ed eeb96ae8b5 update pkgs to 1.16.13 2025-02-13 21:43:32 +00:00
ed cddedd37d5 v1.16.13 2025-02-13 20:57:04 +00:00
ed 4d6626b099 workaround musl 1.2.5 cve 2025-02-13 20:53:47 +00:00
ed 7a55833bb2 silence linter 2025-02-13 18:34:41 +00:00
ed 7e4702cf09 file-extension icons
global-option / volflag `ext_th` specifies
custom thumbnail for a given file extension
2025-02-13 18:32:01 +00:00
ed 685f08697a alternative loader spinners 2025-02-13 17:07:48 +00:00
ed a255db706d make volflags less confusing
1. warn about unrecognized volflags

previously, when specifying an unknown volflag, it would
be silently ignored, giving the impression that it applied

2. also allow uppercase, kebab-case
    (previously, only snake_case was accepted)

3. mention every volflag in --help-flags
    (some volflags were missing)
2025-02-13 00:34:46 +00:00
ed 9d76902710 WebDAV: adjust 401-mask for GETs (#136)
some clients, including KDE Dolphin (kioworker/6.10) keeps
sending requests without the basic-auth header, expecting
the server to respond with a 401 before it does

most clients only do this for the initial request, which is
usually a PROPFIND, which makes this nice and simple -- but
turns out we need to consider this for GET as well...

this is tricky because a graphical webbrowser must never
receive a 401 lest it becomes near-impossible to deauth,
and that's exactly what Dolphin pretends to be in its UA

man ( ´_ゝ`)

note: `KIO/` hits konqueror so don't
2025-02-11 23:32:44 +00:00
ed 62ee7f6980 WebDAV: support COPY, KDE-Dolphin (#136):
* add support for the COPY verb

* COPY/MOVE: add overwrite support;
   default is True according to rfc
   (only applies to single files for now)

* COPY/MOVE/MKCOL: return 401 as necessary
   for clients which rechallenge frequently
   such as KDE Dolphin (KIO/6.10)

* MOVE: support webdav:// Destination prefix
   as used by KDE Dolphin (KIO/6.10)

* MOVE: vproxy support
2025-02-11 21:34:24 +00:00
ed 2f6707825a improve usb-eject hook:
* don't crash internet explorer
* support running as root
* support old linuxen
2025-02-10 04:52:57 +00:00
ed 7dda77dcb4 update pkgs to 1.16.12 2025-02-10 00:04:04 +00:00
ed ddec22d04c v1.16.12 2025-02-09 23:31:26 +00:00
ed 32e90859f4 readme: add config file examples 2025-02-09 23:03:46 +00:00
ed 8b8970c787 add note about dead docker experiments 2025-02-09 21:17:25 +00:00
ed 03d35ba799 rename bubblewrap.sh to bubbleparty.sh (2/2)
reduces confusion if it ends up in $PATH, if there
are multiple such wrappers with different semantics
2025-02-09 20:40:16 +00:00
ed c035d7d88a rename bubblewrap.sh to bubbleparty.sh (1/2)
reduces confusion if it ends up in $PATH, if there
are multiple such wrappers with different semantics
2025-02-09 20:39:32 +00:00
ed 46f9e9efff add plugin: quickmove
defines hotkey W to move selected files into a subfolder
2025-02-09 19:40:36 +00:00
ed 4fa8d7ed79 hotkey S toggles selection of playing song
does not apply if image gallery is open

also ensure the hotkey handler is only attached once;
makes it easier to hook/modify it from plugins
2025-02-09 19:22:29 +00:00
ed cd71b505a9 safeguard against accidental config loss
when running copyparty without any config, it defaults to sharing
the current folder read-write for everyone. This makes sense for
quick one-off instances, but not in more permanent deployments

especially for docker, where the config can get lost by accident
in too many ways (compose typos, failed upgrade, selinux, ...)
the default should be to reject all access

add a safeguard which disables read-access if one or more
config-files were specified, but no volumes are defined

should prevent issues such as filebrowser/filebrowser#3719
2025-02-08 20:37:30 +00:00
ed c7db08ed3e remember file selection per-folder
avoids losing file selection when
accidentally changing to another folder
2025-02-08 15:18:07 +00:00
Leon van Kammen 3582a1004c added bubblewrap docs + script 2025-02-07 21:12:39 +01:00
ed 22cbd2dbb5 handlers: add http-redirect example 2025-02-07 19:03:13 +00:00
ed c87af9e85c option to restrict download-as-zip/tar
new global-option / volflag `zip_who` specifies
who gets to use the download-as-zip/tar function;

* 0: nobody, same as --no-zip
* 1: admins
* 2: authorized users with read-access
* 3: anyone with read-access
2025-02-05 20:45:50 +00:00
ed 6c202effa4 add plugin: graft-thumbs.js; #133
"sidecar thumbnails"; if a folder contains both foo.mp3 and foo.png
then this plugin takes the png thumbnail and applies to the mp3
while in the grid-view
2025-02-05 19:48:59 +00:00
ed 632f52af22 warn that RTL support is currently not planned
the current approach to html generation is
probably too jank to handle RTL correctly
2025-02-03 18:41:02 +00:00
ed 46e59529a4 ensure intended order in language selector 2025-02-03 18:32:58 +00:00
ed bdf060236a improve(?) bugreport template 2025-02-03 05:27:19 +00:00
ed d9d2a09282 mention fuse/rclone hijinks from #132 2025-02-02 23:22:06 +00:00
ed b020fd4ad2 make some 403s less ambiguous in logs 2025-02-02 23:02:54 +00:00
ed 4ef3526354 bbox: try to detect media load errors
listen for errors from <img> and <video> in the media gallery and
show an error-toast to indicate that the file isn't going to appear

unfortunately, when iOS-Safari fails to decode an unsupported video,
Safari itself appears to believe that everything is fine, and doesn't
issue the expected error-event, meaning we cannot detect this...

for example, trying to play non-yuv420p vp9 webm will silently fail,
with the only symptom being the play() promise throwing as the
<video> is destroyed during cleanup (bbox-close or media unload)
2025-01-31 21:13:35 +00:00
ed 20ddeb6e1b include last rtt in next req 2025-01-31 20:09:45 +00:00
ed d27f110498 http rtt in serverinfo panel 2025-01-31 20:00:33 +00:00
ed 910797ccb6 ping.html: add mdev, limit 2025-01-31 19:16:44 +00:00
ed 7de9d15aef add ping.html (from old php project) 2025-01-31 18:56:12 +00:00
ed 6a9ffe7e06 traefik-example: fix disconnect during big uploads
if an upload takes longer than 60 seconds,
by default, traefik closes the connection

thx to @JuvenoiaAgent@lemmy.ca for catching this
2025-01-29 21:03:18 +00:00
ed 12dcea4f70 improve iPad detection;
recent iPads do not indicate being an iPad in the user-agent,
so the audio-player would fall back on transcoding to mp3,
assuming the device cannot play opus-caf

improve this with pessimistic feature-detection for caf
hopefully still avoiding false-positives
2025-01-27 21:06:47 +00:00
ed b3b39bd8f1 update pkgs to 1.16.11 2025-01-27 02:01:25 +00:00
ed c7caecf77c v1.16.11 2025-01-27 01:40:23 +00:00
ed 1fe30363c7 u2c: option to print download links 2025-01-27 01:35:36 +00:00
ed 54a7256c8d fix js-panic if audio transcoding disabled 2025-01-27 00:37:03 +00:00
ed 8e8e4ff132 update pkgs to 1.16.10 2025-01-25 18:45:50 +00:00
ed 1dace72092 v1.16.10 2025-01-25 18:09:52 +00:00
ed 3a5c1d9faf allow zeromq to veto uploads 2025-01-25 17:49:03 +00:00
ed f38c754301 add hook: usb-eject 2025-01-25 17:02:41 +00:00
ed fff38f484d prefer opus-caf due to iOS bugs 2025-01-25 14:27:34 +00:00
ed 95390b655f ensure opus to owa is remux, not transcode
also add transcoding from opus to mp3 if client wants mp3,
overriding the feature detection for opus support
2025-01-25 13:44:19 +00:00
ed 5967c421ca zmq tweaks 2025-01-25 11:29:38 +00:00
ed b8b5214f44 option to restrict recent-uploads visibility 2025-01-25 11:13:12 +00:00
ed cdd3b67a5c msg-to-log includes xm / ZeroMQ response 2025-01-25 10:59:15 +00:00
ed 28c9de3f6a add opus-weba transcoding (for iOS 18 and newer)
support for "owa", audio-only webm, was introduced in iOS 17.5

owa is a more compliant alternative to opus-caf from iOS 11,
which was technically limited to CBR opus, a limitation which
we ignored since it worked mostly fine for regular opus too

being the new officially-recommended way to do things,
we'll default to owa for iOS 18 and later, even though
iOS still has some bugs affecting our use specifically:

if a weba file is preloaded into a 2nd audio object,
safari will throw a spurious exception as playback is
initiated, even as the file is playing just fine

the `.ld` stuff is an attempt at catching and ignoring this
spurious error without eating any actual network exceptions
2025-01-25 10:15:44 +00:00
ed f3b9bfc114 option to disable caf transcoding + misc cleanup 2025-01-24 22:40:52 +00:00
ed c9eba39edd fix audio-transcoding for iOS v10 and older
opus-in-caf was added in iOS v11;
use caf in iOS v12 and newer (iPhone 5s, iPad Air/mini2, iPod 6),
use mp3 in iOS v11 and older (iPhone 5c, iPad 4)
2025-01-24 19:57:23 +00:00
ed 40a1c7116e golf useragent to ua 2025-01-24 19:56:56 +00:00
ed c03af9cfcc update pkgs to 1.16.9 2025-01-22 23:54:04 +00:00
ed c4cbc32cc5 v1.16.9 2025-01-22 23:26:17 +00:00
ed 1231ce199e create utf8 zipfiles by default
previously, the `?zip` url-suffix would create a cp437 zipfile,
and `?zip=utf` would use utf-8, which is now generally expected

now, both `?zip=utf` and `?zip` will produce a utf8 zipfile,
and `?zip=dos` provides the old behavior
2025-01-22 22:50:03 +00:00
ed e0cac6fd99 clamp filekeys to max 72 chars
fixes a bug reported on discord:

a sha512 checksum does not cleanly encode to base64, and the
padding runs afoul of the safety-check added in 988a7223f4

as there is not a single reason to use a filekey that long,
fix it by setting an upper limit (which is still ridiculous)
2025-01-22 22:17:57 +00:00
ed d9db1534b1 hooks: send zeromq/zmq/0mq messages
adds an optional dependency on pyzmq
2025-01-22 21:18:42 +00:00
ed 6a0aaaf069 md/logue sandbox: custom allow prop
add global-option and volflag to specify the
value of the iframe's allow-property
2025-01-21 22:51:00 +00:00
ed 4c04798aa5 u2c: fix hash-calculator mode
it produced the correct chunk-hashes with --chs
but the total file-hash was wrong regardless
2025-01-21 22:04:20 +00:00
ed 3f84b0a015 failsafe against unsafe reverse-proxy misconfiguration:
if an untrusted x-forwarded-for is received, then disable
some features which assume the client-ip to be correct:

* listing dotfiles recently uploaded from own ip
* listing ongoing uploads from own ip
* unpost recently uploaded files

this is in addition to the existing vivid warning in
the serverlogs, which empirically is possible to miss
2025-01-20 18:52:39 +00:00
ed 917380ddbb add nosparse volflag + update s3 readme:
may improve upload performance in some particular uncommon scenarios,
for example if hdd-writes are uncached, and/or the hdd is drastically
slower than the network throughput

one particular usecase where nosparse *might* improve performance
is when the upload destination is cloud-storage provided by FUSE
(for example an s3 bucket) but this is educated guesswork
2025-01-19 16:28:40 +00:00
ed d9ae067e52 stop recommending webworkers on android
as of v1.16.8 this is counter-productive on android;
see ec50788987
2025-01-19 16:09:54 +00:00
ed b2e8bf6e89 selftest dxml on startup:
try to decode some malicious xml on startup; if this succeeds,
then force-disable all xml-based features (primarily WebDAV)

this is paranoid future-proofing against unanticipated changes
in future versions of python, specifically if the importlib or
xml.etree.ET behavior changes in a way that somehow reenables
entity expansion, which (still hypothetically) would probably
be caused by failing to unload the `_elementtree` c-module

no past or present python versions are affected by this change
2025-01-17 06:06:36 +00:00
ed 170cbe98c5 refactor github urls 2025-01-17 05:48:49 +00:00
exci c94f662095
fix optional package name in PKGBUILD (#130) 2025-01-16 08:01:17 +01:00
ed 0987dcfb1c versus: seafile fix, filebrowser fork
* versus: seafile DOES support write-only folders

* versus: mention https://github.com/gtsteffaniak/filebrowser

* connect-page: link the correct v12.x version of sharex
2025-01-13 22:30:46 +00:00
ed 6920c01d4a update pkgs to 1.16.8 2025-01-11 16:47:33 +00:00
ed cc0cc8cdf0 v1.16.8 2025-01-11 16:11:15 +00:00
ed fb13969798 connect-page: add flameshot too 2025-01-11 16:08:12 +00:00
ed 278258ee9f connect-page:
* add sharex, ishare

* change placeholder password from `pw` to `hunter2`

* add a button to use a real password instead of a placeholder
2025-01-11 15:23:47 +00:00
ed 9e542cf86b these can also trigger reloads; dd6e9ea7 2025-01-11 12:52:11 +00:00
ed 244e952f79 copyparty.exe: update pillow 2025-01-11 12:49:07 +00:00
ed aa2a8fa223 up2k-snap: remove deprecated properties
v1.15.7 is the oldest version which still
has any chance of reading the up2k.snap
2025-01-11 12:16:45 +00:00
ed 467acb47bf up2k-snap-load: assert .PARTIAL for unfinished
when loading up2k snaps, entries are forgotten if
the relevant file has been deleted since last run

when the entry is an unfinished upload, the file that should
be asserted is the .PARTIAL, and not the placeholder / final
filename (which, unintentionally, was the case until now)

if .PARTIAL is missing but the placeholder still exists,
the only safe alternative is to forget/disown the file,
since its state is obviously wrong and unknown
2025-01-11 11:49:53 +00:00
ed 0c0d6b2bfc add ishare config example (macos screenshot uploader)
also includes a slight tweak to the json upload info:

when exactly one file is uploaded, the json-response has a
new top-level property, `fileurl` -- this is just a copy of
`files[0].url` as a workaround for castdrian/ishare#107
("only toplevel json properties can be referenced")
2025-01-10 21:13:20 +00:00
ed ce0e5be406 bup: alias ?j to request-header Accept: json
and teach PUT to answer in json too
2025-01-10 20:32:12 +00:00
ed 65ce4c90fa link the idp-webdav docs from the main readme too 2025-01-10 18:54:45 +00:00
ed 9897a08d09 hotlink from the connect-page to the idp client-auth docs added in #129 2025-01-10 18:47:12 +00:00
ed f5753ba720 add chunksize cheat-sheet 2025-01-10 18:24:40 +00:00
Wuast94 fcf32a935b add idp client section to docs 2025-01-10 18:17:57 +01:00
ed ec50788987 up2k.js: 10x faster hashing on android-chrome
when hashing files on android-chrome, read a contiguous range of
several chunks at a time, ensuring each read is at least 48 MiB
and then slice that cache into the correct chunksizes for hashing

especially on GrapheneOS Vanadium (where webworkers are forbidden),
improves worst-case speed (filesize <= 256 MiB) from 13 to 139 MiB/s

48M was chosen wrt RAM usage (48*4 MiB); a target read-size of
16M would have given 76 MiB/s, 32M = 117 MiB/s, and 64M = 154 MiB/s

additionally, on all platforms (not just android and/or chrome),
allow async hashing of <= 3 chunks in parallel on main-thread
when chunksize <= 48 MiB, and <= 2 at <= 96 MiB; this gives
decent speeds approaching that of webworkers (around 50%)

this is a new take on c06d928bb5
which was removed in 184af0c603
when a chrome-beta temporarily fixed the poor file-read performance
(afaict the fix was reverted and never made it to chrome stable)

as for why any of this is necessary,

the security features in android have the unfortunate side-effect
of making file-reads from web-browsers extremely expensive;
this is especially noticeable in android-chrome, where
file-hashing is painfully slow, around 9 MiB/s worst-case

this is due to a fixed-time overhead for each read operation;
reading 1 MiB takes 60 msec, while reading 16 MiB takes 112 msec
2025-01-10 05:29:55 +00:00
ed ac0a2da3b5 add/improve reverse-proxy examples
* add haproxy, lighttpd, traefik, caddy

* adjust nginx buffer sizes for way faster downloads

* move unix-socket to /dev/shm/ because
   fedora sets PrivateTmp=true for nginx (orz)
2025-01-07 05:49:40 +00:00
ed 9f84dc42fe recommend kamelåså instead of very-bad-idea; closes #75 2025-01-01 20:26:09 +00:00
ed 21f9304235 add synology howto 2024-12-27 02:16:20 +00:00
ed 5cedd22bbd update pkgs to 1.16.7 2024-12-23 18:24:35 +00:00
ed c0dacbc4dd v1.16.7 2024-12-23 00:05:49 +00:00
ed dd6e9ea70c when idp is enabled, always daemon(up2k-rescan)
fixes a bug reported on discord;

1. run with `--idp-h-usr=iu -v=srv::A`
2. upload a file with up2k; this succeeds
3. announce an idp user: `curl -Hiu:a 127.1:3923`
4. upload another file; fails with "fs-reload"

the idp announce would `up2k.reload` which raises the
`reload_flag` and `rescan_cond`, but there is nothing
listening on `rescan_cond` because `have_e2d` was false

must assume e2d if idp is enabled, because `have_e2d` will
only be true if there are non-idp volumes with e2d enabled
2024-12-23 17:16:56 +00:00
ed 87598dcd7f recent-uploads: move rendering to js
* loads 50% faster, reducing server-load by 30%

* inhibits search engines from indexing it

* eyecandy (filter applies automatically on edit)
2024-12-20 23:52:03 +00:00
ed 3bb7b677f8 jinja optimizations 2024-12-20 16:34:17 +00:00
ed 988a7223f4 remove some footguns
in case someone writes a plugin which
expects certain params to be sanitized

note that because mojibake filenames are supported,
URLs and filepaths can still be absolutely bonkers

this fixes one known issue:
invalid rss-feed xml if ?pw contains special chars

...and somehow things now run 2% faster, idgi
2024-12-20 14:03:40 +00:00
ed 7f044372fa 18:17:14 +Mai | ed: volume bar is bad design
18:17:26  &ed | what's wrong with it
18:17:38 +Mai | that you don't know it's the volume bar before you try it
18:17:46  &ed | oh
18:17:48  &ed | yeah i guess
18:17:54 +Mai | especially when it's at 100
18:18:00  &ed | how do i fix it tho
18:19:50 +Mai | you could add an icon that's also a mute button (to not make it a useless icon)
18:22:38  &ed | i'll make the volume text always visible and include a speaker icon before it
18:23:53 +Mai | that is better at least
2024-12-19 18:49:51 +00:00
ed 552897abbc fix log colors on loss of ext.ip 2024-12-19 18:48:03 +00:00
ed 946a8c5baa u2c: fix windowtitle 2024-12-19 18:02:29 +00:00
ed 888b31aa92 update pkgs to 1.16.6 2024-12-19 01:08:34 +00:00
ed e2dec2510f v1.16.6 2024-12-19 00:37:24 +00:00
ed da5ad2ab9f warn on ambiguous comments in config files 2024-12-19 00:25:10 +00:00
ed eaa4b04a22 list recent uploads
also makes the unpost lister 5x faster
2024-12-18 22:17:30 +01:00
ed 3051b13108 try to avoid printing mojibake in logs
unprintable and side-effect-inducing paths and names are hex-escaped,
preserving greppability and making log-parsing slightly more okay
2024-12-18 01:45:54 +01:00
ed 4c4e48bab7 improve dotfile handling; closes #126
when deleting a folder, any dotfiles/folders within would only
be deleted if the user had the dot-permission to see dotfiles;
this gave the confusing behavior of not removing the "empty"
folders after deleting them

fix this to only require the delete-permission, and always
delete the entire folder, including any dotfiles within

similar behavior would also apply to moves, renames, and copies;

fix moves and renames to only require the move-permission in
the source volume; dotfiles will now always be included,
regardless of whether the user does (or does not) have the
dot-permission in either the source and/or destination volumes

copying folders now also behaves more intuitively: if the user has
the dot-permission in the target volume, then dotfiles will only be
included from source folders where the user also has the dot-perm,
to prevent the user from seeing intentionally hidden files/folders
2024-12-17 22:47:34 +01:00
ed 01a3eb29cb ui: improve some eta/idle fields
cpanel db-idle-time indicator would glitch on 0.0s

upload windowtitle was %.2f seconds, but the value is int
2024-12-17 22:01:36 +01:00
ed 73f7249c5f decode and log request URLs; closes #125
as processing of a HTTP request begins (GET, HEAD, PUT, POST, ...),
the original query line is printed in its encoded form. This makes
debugging easier, since there is no ambiguity in how the client
phrased its request.

however, this results in very opaque logs for non-ascii languages;
basically a wall of percent-encoded characters. Avoid this issue
by printing an additional log-message if the URL contains `%`,
immediately below the original url-encoded entry.

also fix tests on macos, and an unrelated bad logmsg in up2k
2024-12-16 00:53:22 +01:00
ed 18c6559199 update pkgs to 1.16.5 2024-12-11 22:59:44 +00:00
ed e66ece993f v1.16.5 2024-12-11 22:36:19 +00:00
ed 0686860624 connectpage nitpick + update dompurify 2024-12-11 22:24:31 +00:00
ed 24ce46b380 avoid chrome webworker OOM bug; closes #124
chrome (and chromium-based browsers) can OOM when:

* the OS is Windows, MacOS, or Android (but not Linux?)
* the website is hosted on a remote IP (not localhost)
* webworkers are used to read files

unfortunately this also applies to Android, which heavily relies
on webworkers to make read-speeds anywhere close to acceptable

as for android, there are diminishing returns with more than 4
webworkers (1=1x, 2=2.3x, 3=3.8x, 4=4.2x, 6=4.5x, 8=5.3x), and
limiting the number of workers to ensure at least one idle core
appears to sufficiently reduce the OOM probability

on desktop, webworkers are only necessary for hashwasm, so
limit the number of workers to 2 if crypto.subtle is available
and otherwise use the nproc-1 rule for hashwasm in workers

bug report: https://issues.chromium.org/issues/383568268
2024-12-11 22:11:54 +00:00
ed a49bf81ff2 mdns: improve nic-ip changelog
if a NIC is brought up with several IPs,
it would only mention one of the new IPs in the logs

or if a PCIe bus crashes and all NICs drop dead,
it would only mention one of the IPs that disappeared

as both scenarios are oddly common, be more verbose
2024-12-10 00:36:58 +00:00
ed 64501fd7f1 hybrid IdP (check regular users too); closes #122
previously, when IdP was enabled, the password-based login would be
entirely disabled. This was a semi-conscious decision, based on the
assumption that you would always want to use IdP after enabling it.

it makes more sense to keep password-based login working as usual,
conditionally disengaging it for requests which contains a valid
IdP username header. This makes it possible to define fallback
users, or API-only users, and all similar escape hatches.
2024-12-08 17:18:20 +00:00
ed db3c0b0907 nice 2024-12-07 22:24:13 +00:00
ed edda117a7a update pkgs to 1.16.4 2024-12-07 01:10:50 +00:00
ed cdface0dd5 v1.16.4 2024-12-07 00:24:37 +00:00
ed be6afe2d3a improve ux for relocating partial uploads
if someone accidentally starts uploading a file in the wrong folder,
it was not obvious that you can forget that upload in the unpost tab

this '(explain)' button in the upload-error hopefully explains that,
and upload immediately commences when the initial attempt is aborted

on the backend, cleanup the dupesched when an upload is
aborted, and save some cpu by adding unique entries only
2024-12-06 23:34:47 +00:00
ed 9163780000 u2c: misc windows fixes
* support globbing/wildcards on windows

* add `osc 9;4` to show upload progress in the taskbar
   (currently windows-only; linux is picking it up)

* workaround msys2-terminal not normalizing
   absolute paths which contain whitespace

* show a helpful "now hashing..." while the
   first file is being hashed, since it kinda
   looks like a deadlock on windows otherwise
2024-12-06 18:44:05 +00:00
ed d7aa7dfe64 translations: new strings 2024-12-04 09:46:04 +00:00
ed f1decb531d update pkgs to 2024-12-04 00:41:34 +00:00
ed 99399c698b v1.16.3 2024-12-04 00:03:55 +00:00
ed 1f5f42f216 fix #121 (GET toplevel files with h) 2024-12-03 23:53:21 +00:00
ed 9082c4702f accesslog: exclude thumbnails by default 2024-12-03 22:17:49 +00:00
ed 6cedcfbf77 update deps:
* copyparty.exe: python 3.12.7 => 3.12.8
* webdeps:
  * hashwasm 4.10.0 => 4.12.0
  * dompurify 3.1.7 => 3.2.2
  * codemirror 5.65.16 => 5.65.18
2024-12-03 22:11:07 +00:00
ed 8a631f045e ui: fix final time-elapsed and speed for fsearch 2024-12-03 21:43:38 +00:00
ed a6a2ee5b6b sort on filename should forget other sorts
filenames are unique per folder; remembering other keys is pointless
2024-12-03 21:06:00 +00:00
ed 016708276c add sorting granularity options for media URLs 2024-12-03 20:01:19 +00:00
ed 4cfdc4c513 preserve active sort-prefs if more specific than url-hash 2024-12-03 02:13:12 +00:00
ed 0f257c9308 embed sort-order in gallery/media URLs
so anyone who clicks the link sees the files in the same order
2024-12-03 01:46:56 +00:00
ed c8104b6e78 js: 7x faster deepclone 2024-12-03 01:44:55 +00:00
ed 1a1d731043 misc cleanup:
* u2c: remove superfluous pathsep (harmless)
* tl: new strings
2024-12-02 22:52:39 +00:00
ed c5a000d2ae url-option for upload checksum type
url-param / header `ck` specifies hashing algo;
md5 sha1 sha256 sha512 b2 blake2 b2s blake2s

value 'no' or blank disables checksumming,
for when copyparty is running on ancient gear
and you don't really care about file integrity
2024-12-02 13:51:39 +00:00
ed 94d1924fa9 improve avahi-379 workaround 2024-12-01 21:24:41 +00:00
ed 6c1cf68bca mdns: add workaround for https://github.com/avahi/avahi/issues/379
Avahi's mDNS-reflection feature does not understand NSEC, so
it corrupts mDNS packets by not rewriting compressed labels
2024-12-01 19:01:40 +00:00
ed 395af051bd mdns: option to ignore invalid packets on the lan 2024-12-01 15:38:24 +00:00
ed 42fd66675e tests: improve specificity 2024-12-01 15:36:35 +00:00
ed 21a3f3699b webdav: add tests + fix minor edgecases
* allow depth:0 at top of unmapped root

* cannot use the Referer header to identify
   graphical browsers since rclone sends it
2024-12-01 14:44:41 +00:00
ed d168b2acac forget all shadowed files (uploads too); closes #120
shadowing is the act of intentinoally blocking off access to
files in a volume by placing another volume atop of a file/folder.

say you have volume '/' with a file '/a/b/c/d.txt'; if you create a
volume at '/a/b', then all files/folders inside the original folder
becomes inaccessible, and replaced with the contents of the new vol

the initial code for forgetting shadowed files from the parent vol
database would only forget files which were discovered during a
filesystem scan; any uploaded files would be intentionally preseved
in the parent volume's database, probably to avoid losing uploader
info in the event of a brief mistaken config change, where a volume
is shadowed by accident.

this precaution was a mistake, currently causing far more
issues than it solves (#61 and #120), so away it goes.

huge thanks to @Gremious for doing all the legwork on this!
2024-11-28 22:01:18 +00:00
ed 2ce8233921 webdav: auth-challenge clients correctly:
* return 403 instead of 404 in the following sitations:
  * viewing an RSS feed without necessary auth
  * accessing a file with the wrong filekey
  * accessing a file/folder without necessary auth
     (would previously 404 for intentional ambiguity)

* only allow PROPFIND if user has either read or write;
   previously a blank response was returned if user has
   get-access, but this could confuse webdav clients into
   skipping authentication (for example AuthPass)

* return 401 basic-challenge instead of 403 if the client
   appears to be non-graphical, because many webdav clients
   do not provide the credentials until they're challenged.
   There is a heavy bias towards assuming the client is a
   browser, because browsers must NEVER EVER get a 401
   (tricky state that is near-impossible to deal with)

* return 401 basic-challenge instead of 403 if a PUT
   is attempted without any credentials included; this
   should be safe, as graphical browsers never do that

this fixes the interoperability issues mentioned in
https://github.com/authpass/authpass/issues/379
where AuthPass would GET files without providing the
password because it expected a 401 instead of a 403;
AuthPass is behaving correctly, this is not a bug
2024-11-27 22:07:53 +00:00
ed 697a4fa8a4 exclude search results by regex (#120)
a better alternative to using `--no-idx` for this purpose since
this also excludes recent uploads, not just during fs-indexing,
and it doesn't prevent deduplication

also speeds up searches by a tiny amount due to building the
sanchecks into the exclude-filter while parsing the config,
instead of during each search query
2024-11-26 23:57:01 +00:00
ed 2f83c6c7d1 drop caches if certain volflags change (#120)
dhash would prevent a new noidx value from taking effect
2024-11-26 19:25:47 +00:00
ed 127f414e9c improve phrasing in indexer messages (#120) 2024-11-26 18:52:23 +00:00
ed 33c4ccffab vendor foss licenses
license downloader (for generating COPYING.txt) broke after
opensource.org changed their html, so just vendor all of it
2024-11-26 00:39:38 +00:00
ed bafe7f5a09 improve helptext exporters 2024-11-24 21:28:21 +00:00
ed baf41112d1 update pkgs to 1.16.2 2024-11-23 23:55:09 +00:00
ed a90dde94e1 v1.16.2 2024-11-23 23:36:15 +00:00
ed 7dfbfc7227 fix v1.16.0 webdav upload regression; closes #119 2024-11-23 23:32:56 +00:00
ed b10843d051 cosmetic eta improvements:
* u2c: strip hh:mm:ss past 30 days
* u2js: fix "infini.ty" in elapsed-times
2024-11-23 19:58:25 +00:00
ed 520ac8f4dc fix opening md files from gridview 2024-11-23 17:55:05 +00:00
ed 537a6e50e9 javascript... 2024-11-22 23:10:23 +00:00
ed 2d0cbdf1a8 video-player: support mov files 2024-11-22 22:47:42 +00:00
ed 5afb562aa3 avoid layout-shift for qr-codes 2024-11-22 22:44:44 +00:00
ed db069c3d4a fix shares qr-code on chrome 2024-11-22 22:28:00 +00:00
ed fae40c7e2f black 2024-11-22 22:26:34 +00:00
ed 0c43b592dc pave the way for more ux volflags
makes directory listings a tiny bit faster, about 7% or so
2024-11-22 22:24:56 +00:00
ed 2ab8924e2d tests/debug: plug some resource leaks 2024-11-22 22:21:43 +00:00
akp 0e31cfa784 Allow multiple CIDR ranges when using lan shorthands
Signed-off-by: akp <abi@tdpain.net>
2024-11-22 19:51:56 +00:00
ed 8f7ffcf350 add nsort option/volflag 2024-11-19 18:39:40 +00:00
ed 9c8507a0fd fix downloads-eta layout jank 2024-11-17 19:39:44 +00:00
ed e9b2cab088 update pkgs to 1.16.1 2024-11-15 22:40:41 +00:00
ed d3ccacccb1 v1.16.1 2024-11-15 22:18:11 +00:00
ed df386c8fbc ux: fix paste msg + cleanup css 2024-11-15 22:11:51 +00:00
ed 4d15dd6e17 cbz thumbnails 2024-11-15 21:33:37 +00:00
ed 56a0499636 fix gallery links when msel enabled 2024-11-15 20:04:13 +00:00
ed 10fc4768e8 fix dl from jumpvols with -j0 2024-11-15 19:29:44 +00:00
ed 2b63d7d10d detect invalid config (prevent db loss) 2024-11-15 08:04:58 +00:00
ed 1f177528c1 fix advanced options for password-hashing
and allow raising scrypt ram usage past OpenSSL's default 32 MiB
2024-11-15 00:42:08 +00:00
ed fc3bbb70a3 update pkgs to 1.16.0 2024-11-10 20:00:38 +00:00
ed ce3cab0295 v1.16.0 2024-11-10 19:32:37 +00:00
ed c784e5285e u2c: adaptive connection:keepalive expiration 2024-11-10 17:43:40 +00:00
ed 2bf9055cae detect free RAM on startup for sane defaults
* if free ram on startup is less than 2 GiB,
   use smaller chunks for parallel file hashing

* if --th-max-ram is lower than 0.25 (256 MiB),
   print a warning that thumbnails will not work

* make thumbnail cleaner immediately do a sweep on startup,
   forgetting any failed conversions so they can be retried
   in case the memory limit was increased since last run
2024-11-10 15:43:19 +00:00
ed 8aba5aed4f list active downloads in controlpanel 2024-11-10 02:12:18 +00:00
ed 0ce7cf5e10 update comparison / versus.md 2024-11-09 14:44:03 +00:00
ed 96edcbccd7 https://ocv.me/stuff/goed-gedaan.jpg 2024-11-08 22:11:33 +00:00
ed 4603afb6de don't consume ctrl-shift-c (devtools inspector) 2024-11-08 21:51:54 +00:00
ed 56317b00af filecopy: ui for resolving name conflicts 2024-11-08 02:12:28 +00:00
ed cacec9c1f3 support copying files/folders; closes #115
behaves according to the target volume's deduplication config;
will create symlinks / hardlinks instead if dedup is enabled
2024-11-07 21:41:53 +00:00
ed 44ee07f0b2 IdP: async reload; closes #114
whenever a new idp user is registered, up2k will continuously
reload in the background until all users have been processed

just like before, this blocks up2k uploads from each user
until said user makes it into a reload, but as of now,
reloads will batch and execute without interrupting read-access

needs further testing before next release,
probably some rough edges to sand down
2024-11-04 22:31:48 +00:00
ed 6a8d5e1731 ui: batch-rename: remember last regex + format 2024-11-02 18:06:39 +00:00
ed d9962f65b3 ui: folder loading indicator stole focus
show a spinning halfcircle around the +/- instead of
moving the focus to the selected folder in the sidebar,
since that could mess with keyboard scrolling
2024-11-02 17:58:30 +00:00
ed 119e88d87b bubble OS-filesystem errors to client
send a 500 or 404 if a folder is inaccessible or does not exist

previously it would return an empty directory listing instead
2024-11-02 17:38:17 +00:00
ed 71d9e010d9 ui: make hotkey-help less eager to show itself
would appear when typing `?` into textboxes
2024-10-30 19:40:48 +00:00
ed 5718caa957 ui: url-options to set grid/thumbs on/off 2024-10-30 19:24:00 +00:00
ed efd8a32ed6 ui: show switch-to-https on 403s too 2024-10-28 03:38:15 +00:00
ed b22d700e16 update pkgs to 1.15.10 2024-10-27 09:27:38 +00:00
ed ccdacea0c4 v1.15.10 2024-10-27 07:51:11 +00:00
ed 4bdcbc1cb5 shares: allow upload, unpost
* files can be uploaded into writeable shares

* add "write-only" button to the create-share ui

* unpost is possible while viewing the relevant share
2024-10-26 21:36:07 +00:00
ed 833c6cf2ec partyfuse: bump dircache size
dircache size should exceed max dir depth, because the OS
may periodically listdir all parents of current folder
2024-10-26 18:25:21 +00:00
ed dd6dbdd90a http 304: client-option to force-disable cache
an extremely brutish workaround for issues such as #110 where
browsers receive an HTTP 304 and misinterpret as HTTP 200

option `--no304=1` adds the button `no304` to the controlpanel
which can be enabled to force-disable caching in that browser

the button is default-disabled; by specifying `--no304=2`
instead of `--no304=1` the button becomes default-enabled

can also always be enabled by accessing `/?setck=no304=y`
2024-10-26 17:56:54 +00:00
ed 63013cc565 http 304: k304 obsoleted for ie11 by Vary
the Vary header killed caching in all versions of internet explorer
so there's no point conditionally enabling k304 for trident anymore
2024-10-25 22:32:58 +00:00
ed 912402364a http 304: strip Content-Length and Content-Type
these response headers are usually not included in 304 replies,
and their presence are suspected to confuse some clients (#110)

also strip `out_headerlist` (primarily cookie assignments)
2024-10-25 22:24:40 +00:00
ed 159f51b12b http 304: if-range, backdating
add support for the `If-Range` header which is generally used to
prevent resuming a partial download after the source file on the
server has been modified, by returning HTTP 200 instead of a 206

also simplifies `If-Modified-Since` and `If-Range` handling;
previously this was a spec-compliant lexical comparison,
now it's a basic string-comparison instead. The server will now
reply 200 also when the server mtime is older than the client's.
This is technically not according to spec, but should be safer,
as it allows backdating timestamps without purging client cache
2024-10-25 22:05:59 +00:00
ed 7678a91b0e debug: --ohead (log response headers) 2024-10-25 20:00:19 +00:00
ed b13899c63d make --u2sz more intuitive
previously, it only accepted the 3-tuple `min,default,max`

if given a single integer (or any other unexpected value),
the up2k js would enter an infinite loop, eat all the ram
and crash the browser (nice)

fix this by accepting a single integer (for example 96)
and translating it to `1,96,96`
2024-10-22 21:37:51 +00:00
ed 3a0d882c5e fix NetMap -j0 compat
would crash on startup if `-j0` was
combined with `--ipa` or `--ipu`
2024-10-22 20:53:19 +00:00
ed cb81f0ad6d readme: add nintendo 3ds to supported browsers 2024-10-21 00:06:13 +00:00
ed 518bacf628 add pingvin-share to comparison 2024-10-20 01:18:07 +00:00
ed ca63b03e55 update pkgs to 1.15.9 2024-10-18 23:54:46 +00:00
ed cecef88d6b v1.15.9 2024-10-18 23:42:20 +00:00
ed 7ffd805a03 add RSS feed output; closes #109 2024-10-18 23:24:12 +00:00
ed a7e2a0c981 up2k: fix chinese-specific js crash; closes #108
the client-side ETA, included as metadata in POSTs,
would crash the js with the initial "Starting..." text
2024-10-18 19:04:22 +00:00
ed 2a570bb4ca fix --df for webdav; closes #107
PUT uploads, as used by webdav, would stat the absolute
path of the file to be created, which would throw ENOENT

strip components until the path is an existing directory

and also try to enforce disk space / volume size limits
even when the incoming file is of unknown size
2024-10-18 18:14:35 +00:00
ed 5ca8f0706d up2k.js: detect broken webworkers;
the first time a file is to be hashed after a website refresh,
a set of webworkers are launched for efficient parallelization

in the unlikely event of a network outage exactly at this point,
the workers will fail to start, and the hashing would never begin

add a ping/pong sequence to smoketest the workers, and
fallback to hashing on the main-thread when necessary
2024-10-18 16:50:15 +00:00
ed a9b4436cdc up2k: improve upload retry/timeout
* `js:` make handshake retries more aggressive
* `u2c:` reduce chunks timeout + ^
* `main:` reduce tcp timeout to 128sec (js is 42s)
* `httpcli:` less confusing log messages
2024-10-18 16:24:31 +00:00
ed 5f91999512 update pkgs to 1.15.8 2024-10-16 22:22:29 +00:00
ed 9f000beeaf v1.15.8 2024-10-16 21:53:23 +00:00
ed ff0a71f212 gallery: play m4v videos 2024-10-16 21:36:11 +00:00
ed 22dfc6ec24 ui-toast: hide countdown if infinite 2024-10-16 21:32:47 +00:00
ed 48147c079e subchunks: fix eta, cfg-ui 2024-10-16 21:17:00 +00:00
ed d715479ef6 add chickenbit to force hashwasm 2024-10-16 20:23:02 +00:00
ed fc8298c468 up2k: avoid cloudflare upload size-limit
previously, the biggest file that could be uploaded through
cloudflare was 383 GiB, due to max num chunks being 4096

`--u2sz`, which takes three ints (min-size, target, max-size)
can now be used to enforce a max chunksize; chunks larger
than max-size gets split into smaller subchunks / chunklets

subchunks cannot be stitched/joined, and subchunks of the
same chunk must be uploaded sequentially, one at a time

if a subchunk fails due to bitflips or connection-loss,
then the entire chunk must (and will) be reuploaded
2024-10-16 19:29:08 +00:00
ed e94ca5dc91 up2k: improve logging 2024-10-16 15:41:19 +00:00
ed 114b71b751 up2k: fix filesystem toctou
previously and currently, as an upload completes, its "done" flag
is not set until all the data has been flushed to disk

however, the list of missing chunks becomes empty before the flush,
and that list was incorrectly used to determine completion state
in some dedup-related logic

as a result, duplicate uploads could initially fail, and would
succeed after the client automatically retried a handful of times
2024-10-16 15:32:58 +00:00
ed b2770a2087 u2c: support more crazy filenames
newlines, invalid utf8, and worst of all... %20 (whitespace)

due to up2k protocol limitations,
filenames are normalized when they hit the server,
but folders get to keep their intended jank
2024-10-15 23:01:07 +00:00
ed cba1878bb2 u2c: don't get stuck at fifos and such 2024-10-15 22:53:55 +00:00
ed a2e037d6af u2c: fix chunksize calculation
files which were exactly 128 GiB large would fail
(you can't make this shit up)
2024-10-15 22:39:48 +00:00
ed 65a2b6a223 u2c: fix excessive FDs
it would open separate FDs for all chunks to be uploaded...

open and close files as they are needed during upload instead
2024-10-15 22:30:15 +00:00
ed 9ed799e803 update pkgs to 1.15.7 2024-10-13 23:07:31 +00:00
ed c1c0ecca13 v1.15.7 2024-10-13 22:44:57 +00:00
ed ee62836383 bitflip logging 2024-10-13 22:37:35 +00:00
ed 705f598b1a up2k non-e2d fixes:
* respect noforget when loading snaps
* ...but actually forget deleted files otherwise
* insert empty need/hash as necessary
2024-10-13 22:10:27 +00:00
ed 414de88925 u2c v2.2 2024-10-13 22:07:41 +00:00
ed 53ffd245dd u2c: fix progress indicator for resumed uploads 2024-10-13 22:07:07 +00:00
ed cf1b756206 u2c: option to list chunk hashes 2024-10-13 22:06:02 +00:00
ed 22b58e31ef unpost: authed users can see anon on same ip 2024-10-13 22:00:15 +00:00
ed b7f9bf5a28 cidr-based autologin 2024-10-13 21:56:26 +00:00
ed aba680b6c2 update pkgs to 1.15.6 2024-10-11 23:16:24 +00:00
ed fabada95f6 v1.15.6 2024-10-11 22:56:10 +00:00
ed 9ccd8bb3ea support viewing dotfile docs; closes #104 2024-10-11 22:06:43 +00:00
ed 1d68acf8f0 add preadme.md; closes #105 2024-10-11 21:52:44 +00:00
ed 1e7697b551 misc cleanup;
* more typos
* python 3.13 deprecations
2024-10-11 20:46:40 +00:00
ed 4a4ec88d00 up2k: fix hs after bitflips / net-glitch
chunk stitching could cause handshakes to initiate
a new upload rather than resume an ongoing one
2024-10-11 19:48:44 +00:00
ed 6adc778d62 fix a buttload of typos 2024-10-11 18:58:14 +00:00
ed 6b7ebdb7e9 upgrade old snaps to dwrk + fix ptop
ptop would be wrong if a volume was moved on-disk since last run
2024-10-09 06:05:55 +00:00
ed 3d7facd774 add option to entirely disable dedup
global-option `--no-clone` / volflag `noclone` entirely disables
serverside deduplication; clients will then fully upload dupe files

can be useful when `--safe-dedup=1` is not an option due to other
software tampering with the on-disk files, and your filesystem has
prohibitively slow or expensive reads
2024-10-08 21:27:19 +00:00
ed eaee1f2cab update pkgs to 1.15.5 2024-10-05 18:20:20 +00:00
ed ff012221ae v1.15.5 2024-10-05 18:03:04 +00:00
ed c398553748 pkgres: fix multiprocessing 2024-10-05 17:32:08 +00:00
ed 3ccbcf6185 update pkgs to 1.15.4 2024-10-04 23:56:45 +00:00
ed f0abc0ef59 v1.15.4 2024-10-04 23:19:28 +00:00
ed a99fa3375d the impresources.files traversible is not threadsafe 2024-10-04 22:37:29 +00:00
ed 22c7e09b3f small fixes;
* make-sfx: delete failed deps downloads
* tlcheck: detect untranslated strings
2024-10-04 20:56:16 +00:00
ed 0dfe1d5b35 toast countdown bar 2024-10-04 19:29:54 +00:00
ed a99a3bc6d7 audio-player: fix compact-mode rendering glitch on narrow screens 2024-10-04 18:15:18 +00:00
ed 9804f25de3 add option for natural sorting; thx @oshiteku 2024-10-04 00:30:04 +00:00
ed ae98200660 og: support filekeys 2024-10-03 23:52:11 +00:00
ed e45420646f share folders as qr-codes 2024-10-03 23:14:06 +00:00
ed 21be82ef8b fix #101 (show logues even if dotfiles are hidden) 2024-10-03 22:19:32 +02:00
ed 001afe00cb i18n: time plurals 2024-10-03 07:38:33 +00:00
ed 19a5985f29 allow uploading logues; closes #100 2024-10-02 23:16:59 +00:00
ed 2715ee6c61 fix confusing toast on F2 with nothing selected (#100) 2024-10-02 23:11:29 +00:00
ed dc157fa28f webdav: support explicit <allprop/> (WinSCP) 2024-10-02 22:28:23 +00:00
ed 1ff14b4e05 optimizations, failsafes, formatting 2024-10-02 21:59:53 +00:00
ed 480ac254ab webdav: show toplevel volumes when root is unmapped
previously, only real folders could be listed by a webdav client;
a server which does not have any filesystem paths mapped to `/`
would cause clients to panic when trying to list the server root

now, assuming volumes `/foo` and `/bar/qux` exist, when accessing `/`
the user will see `/foo` but not `/bar` due to limitations in `walk`,
and `qux` will only appear when viewing `/bar`

a future rework of the recursion logic should further improve this
2024-10-02 21:12:58 +00:00
ed 4b95db81aa thx keth 2024-10-01 22:37:50 +00:00
ed c81e898435 partyfuse: also support mounting nginx, iis
these additional parsers are not included in the sfx-embedded
copy of partyfuse.py; grab it from github when necessary
2024-10-01 22:37:07 +00:00
ed f1646b96ca dist: strip some pointless code 2024-10-01 18:35:36 +00:00
ed 44f2b63e43 partyfuse: embed fuse.py into sfx 2024-10-01 18:27:42 +00:00
ed 847a2bdc85 partyfuse: bump datacache chunksize
previous approach:
* cache 64K on first read
* cache 1M on subsequent intersecting reads

new approach:
* cache 64K on first read
* cache 1M on the next intersecting read
* cache 8M on subsequent intersecting reads
* cache 4M on standalone reads at offsets >1M

improves performance by 50% on windows
and should help on high-latency connections
2024-10-01 17:15:35 +00:00
ed 03f0f99469 partyfuse: fix extremely slow dircache lookups
the cache was a list of files instead of a dict... dude

also adds a max-num dircache limit
in addition to the expiration time
2024-10-01 17:07:28 +00:00
ed 3900e66158 partyfuse: modernize html parser (just in case) 2024-10-01 17:00:17 +00:00
ed 3dff6cda40 partyfuse: normalize naming in parsers 2024-10-01 16:55:00 +00:00
ed 73d05095b5 partyfuse: misc correctness;
* support more unix envs with granular fuse config
* generated URLs were OK but technically incorrect
2024-10-01 16:49:39 +00:00
ed fcdc1728eb #102: make UI translation easier in docker 2024-10-01 00:04:07 +00:00
ed 8b942ea237 partyfuse: cleanup logging and exceptions
windows runs 50% faster with recentlog on infos too...
2024-09-29 23:19:33 +00:00
ed 88a1c5ca5d optimize non-e2d ram usage down to 10% or so
drop chunk-hashes in the up2k snap, plus other insignificant attribs
to reduce both the snapfile size and the ram usage by about 90%

reduces startup/shutdown time by a lot since there's less to serdes
(does not affect -e2d which was already optimal)

other changes:

* improve incoming-eta accuracy when the initial handshake
   was made a long time before the upload actually started

* move the list of incoming files in the controlpanel to the top
2024-09-27 21:11:10 +00:00
ed 047176b297 py2 fix 2024-09-27 21:06:01 +00:00
ed dc4d0d8e71 smb: upto 2x faster; but still very buggy:
* do not absreal paths unless necessary
* do not determine username if no users configured
* impacket 0.12 fixed the foldersize limit, but now
   you get extremely poor performance in large folders
   so the previous workaround is still default-enabled
2024-09-27 17:09:48 +00:00
ed b9c5c7bbde u2c: early exclude + fix py2 perf
* don't traverse into excluded folders
* 3.5x faster on python2.7
2024-09-23 17:20:04 +00:00
ed 9daeed923f u2c: remove all deps to become 3x faster on small files
reduces performance on python 2.7, but that is ok

also fixes `unknown encoding: idna` due to cpython race
2024-09-22 18:07:36 +00:00
ed 66b260cea9 pkgres: fix tiny leak in template loader 2024-09-20 22:25:36 +00:00
ed 58cf01c2ad fix linter warnings 2024-09-20 22:24:39 +00:00
ed d866841c19 pkgres:
* pyz: yeet the resource tar which is now pointless thanks to pkgres
* cache impresource stuff because pyz lookups are Extremely slow
* prefer tx_file when possible for slightly better performance
* use hardcoded list of expected resources instead of dynamic
   discovery at runtime; much simpler and probably safer
* fix some forgotten resources (copying.txt, insecure.pem)
* fix loading jinja templates on windows
2024-09-19 22:04:49 +00:00
Shiz a462a644fb
Python 3.7 package resources support (#98)
add support for reading webdeps and jinja-templates using either
importlib_resources or pkg_resources, which removes the need for
extracting these to a temporary folder on the filesystem

* util: add helper functions to abstract embedded resource access
* http*: serve embedded resources through resource abstraction
* main: check webdeps through resource abstraction
* httpconn: remove unused method `respath(name)`
* use __package__ to find package resources
* util: use importlib_resources backport if available
* pass E.pkg as module object for importlib_resources compatibility
* util: add pkg_resources compatibility to resource abstraction
2024-09-19 09:00:34 +00:00
ed 678675a9a6 fix prometheus metrics; broke in 609c5921 2024-09-16 21:04:58 +00:00
ed de9069ef1d update pkgs to 1.15.3 2024-09-16 01:20:16 +00:00
ed c0c0a1a83a v1.15.3 2024-09-16 01:07:50 +00:00
ed 1d004b6dbd update pkgs to 1.15.2 2024-09-16 00:44:48 +00:00
ed b90e1200d7 v1.15.2 2024-09-16 00:20:20 +00:00
ed 4493a0a804 misc mojibake filename support 2024-09-16 00:12:49 +00:00
ed 58835b2b42 ux bugfixes:
* show media tags in shares
* html hydrator assumed a folder named `foo.txt` was a doc
* due to sessions, use `pwd` as password placeholder on services
2024-09-15 23:37:24 +00:00
ed 427597b603 show total directory size in listings
sizes are computed during `-e2ds` indexing, and new uploads
are counted, but a rescan is necessary after a move or delete
2024-09-15 23:01:18 +00:00
ed 7d64879ba8 more optimizations,
* 5% less cpu load from clients fetching thumbnails
* and slight improvement to up2k stuff
2024-09-15 17:46:43 +00:00
ed bb715704b7 ren_open was too fancy 2024-09-15 14:39:35 +00:00
ed d67e9cc507 sqlite and misc optimizations:
* exponentially slow upload handshakes caused by lack of rd+fn
   sqlite index; became apparent after a volume hit 200k files
* listing big folders 5% faster due to `_quotep3b`
* optimize `unquote`, 20% faster but only used rarely
* reindex on startup 150x faster in some rare cases
   (same filename in MANY folders)

the database is now around 10% larger (likely worst-case)
2024-09-15 13:18:43 +00:00
ed 2927bbb2d6 strip dev-only asserts at build stage 2024-09-14 22:17:35 +00:00
ed 0527b59180 cosmetic: only print hostname warning once 2024-09-14 20:37:56 +00:00
ed a5ce1032d3 tlnote + nginx unix-socket example 2024-09-12 21:42:33 +00:00
ed 1c2acdc985 add flameshot client example 2024-09-11 20:56:38 +00:00
ed 4e75534ef8 optimize BrokerThr, 7x faster:
reduce the overhead of function-calls from the client thread
to the svchub singletons (up2k, thumbs, metrics) down to 14%

and optimize up2k chunk-receiver to spend 5x less time bookkeeping
which restores up2k performance to before introducing incoming-ETA
2024-09-11 20:37:10 +00:00
ultwcz 7a573cafd1
fix: translation: Check the newly added Chinese translation (#97) 2024-09-11 19:03:53 +00:00
ed 844194ee29 incoming-ETA: improve accuracy 2024-09-11 06:56:12 +00:00
ed 609c5921d4 list incoming files + ETA in controlpanel 2024-09-10 21:24:05 +00:00
ed c79eaa089a update pkgs to 1.15.1 2024-09-09 23:55:37 +00:00
ed e9d962f273 v1.15.1 2024-09-09 23:43:43 +00:00
ed b5405174ec add login sessions 2024-09-09 23:39:20 +00:00
ed 6eee601521 fix u2c --ow (overwrite/replace)
the u2c flag to overwrite files on the server became no-op in v1.13.8
2024-09-09 19:40:38 +00:00
ed 2fac2bee7c update pkgs to 1.15.0 2024-09-08 20:02:25 +00:00
ed c140eeee6b v1.15.0 2024-09-08 19:25:46 +00:00
ed c5988a04f9 up2k.js: bump handshake timeout for safededup 2024-09-08 18:06:37 +00:00
ed a2e0f98693 disable upload deduplication by default;
dedup is still encouraged and fully supported, but
being default-enabled has caused too many surprises

enabling `--dedup` restores the previous default behavior

also renames `--never-symlink` to `--hardlink-only`
2024-09-08 17:09:14 +00:00
ed 1111153f06 test dedup relinking 2024-09-08 12:55:27 +00:00
ed e5a836cb7d og: fix links to textfiles 2024-09-08 12:12:34 +00:00
ed b0de84cbc5 db-verify: support newlines in filenames + flag 404s 2024-09-08 00:44:22 +00:00
ed cbb718e10d css fixes:
* improve hotdog-stand theme
* fix up2k tabs glow (went poof in a syntax error)
2024-09-07 19:29:40 +00:00
ed b5ad9369fe confine xlink behavior behind its volflag
symlinks between volumes will only be created if xlink is
enabled, so such symlinks should be ignored if xlink is
disabled, as they might originate from other software

this prevents accidental rewriting of non-dedup symlinks
2024-09-07 19:17:32 +00:00
ed 4401de0413 fix mv with --no-dedup in volumes with dupes;
if --no-dedup was enabled in a volume which already contained
symlinked duplicate files, renaming/moving folders could fail

this is due to folder contents being moved one file at a time
(which is how symlink breakage is prevented) except the links
are moved assuming the final directory layout, meaning they
may be intermittently broken during the movie

with no-dedup, the symlinks are converted into full files as
each symlink is encountered, but a temporarily broken symlink
would crash the procedure

fix this by giving `_symlink` a new parameter `fsrc`
which is a known valid inode for data copying purposes
2024-09-07 00:47:12 +00:00
ed 6e671c5245 verify on-disk contents before dedup;
previously, the assumption was made that the database and filesystem
would not desync, and that an upload could safely be substituted with
a symlink to an existing copy on-disk, assuming said copy still
existed on-disk at all

this is fine if copyparty is the only software that makes changes to
the filesystem, but that is a shitty assumption to make in hindsight

add `--safe-dedup` which takes a "safety level", and by default (50)
it will no longer blindly expect that the filesystem has not been
altered through other means; the file contents will now be hashed
and compared to the database

deduplication can be much slower as a result, but definitely worth it
as this avoids some potentially very unpleasant surprises

the previous behavior can be restored with `--safe-dedup 1`
2024-09-06 19:08:14 +00:00
ed 08848be784 u2c: add hashgen mode + fix shutdown lag 2024-09-06 00:31:25 +00:00
ed b599fbae97 use local timezone in log messages; closes #96
timezone can be changed with `export TZ=Europe/Oslo` before launch

using naive timestamps like this appears to be safe as of 3.13-rc1,
no deprecation warnings, just a tiny bit slower than assuming UTC
2024-09-05 19:31:33 +00:00
ed a8dabc99f6 add more translations 2024-09-04 23:46:32 +00:00
ed f1130db131 fix confusing message when uploading dupes
due to deduplication, it is intentionally impossible to
upload several identical copies of a file in parallel

by default, the up2k client will upload files sorted by
size, which usually leads to dupes being grouped together,
and it will try to do just that

this is by design, as it improves performance on average,
but it also shows the confusing (but technically-correct)
message "resume the partial upload into the original path"

fix this with a more appropriate message

note that this approach was selected in favor of pausing
handshakes while the initial copy finishes uploading,
because that could severely reduce upload performance
by preventing optimal use of multiple connections
2024-09-04 22:03:26 +00:00
ed 735ec35546 update pkgs to 1.14.4 2024-09-02 01:21:07 +00:00
ed 5a009a2a64 v1.14.4 2024-09-02 01:08:41 +00:00
ed d9e9526247 fix js typo (could panic on network glitches) 2024-09-02 00:58:15 +00:00
ed 5a8c3b8be0 optimize test_httpcli.py too, from 1.64 to 1.51s 2024-08-31 22:03:06 +00:00
ed 1c9c17fb9b optimize test_dedup.py
* 7.71s originally
* 4.51s with fstab reuse
* 4.34s without db_wd
* 4.02s with no pp start
* 3.73s with Cfg reuse
2024-08-31 21:54:47 +00:00
ed 7f82449179 changelog: cleanup historic entries 2024-08-31 20:39:37 +00:00
ed e455ec994e logo tweaks (kerning, footer-slant) 2024-08-31 20:37:58 +00:00
ed c111027420 update pkgs to 1.14.3 2024-08-30 23:29:47 +00:00
ed abcdf479e6 v1.14.3 2024-08-30 23:11:22 +00:00
ed ad2371f810 shares: add revival and expiration extension 2024-08-30 22:25:50 +00:00
ed c4e2b0f95f doc-viewer: always wordwrap code 2024-08-30 22:13:10 +00:00
ed 3da62ec234 fix dedup bug as of v1.13.8:
* v1.13.8 broke collision resolving for non-identical files;
   the correct filename was reserved but not symlinked to
   the original file, leaving a zerobyte file instead.
   See v1.14.3 github release notes for remediation info

* add sanchecks for early detection of index/fs desync;
   saves performance and gives less confusing logs
2024-08-30 22:06:25 +00:00
ed 01233991f3 tftp: support unmapped root 2024-08-30 16:08:50 +00:00
ed ee35974273 readme hacking 2024-08-29 22:17:13 +00:00
ed 7037e7365e add logo 2024-08-29 22:00:08 +00:00
ed 03b13e8a1c sfx-customizer:
* better translation stripping
* add support in bruteforcer
* add examples

and fix login-banner usage example
2024-08-28 05:53:26 +00:00
ed cdd2da0208 update pkgs to 1.14.2 2024-08-23 23:43:46 +00:00
ed cec0e0cf02 v1.14.2 2024-08-23 23:07:18 +00:00
ed 8122ddedfe share multiple files (#84);
if files (one or more) are selected for sharing, then
a virtual folder is created to hold the selected files

if a single file is selected for sharing, then
the returned URL will point directly to that file

and fix some shares-related bugs:
* password coalescing
* log-spam on reload
2024-08-23 22:55:31 +00:00
ultwcz 55a77c5e89
Chinese translation fixes (#95)
* fix: translation: changing from `" "` to `' '` for some strings;
	using `./scripts/tlcheck.sh eng chi copyparty/web/browser.js`

* fix: translation: Check the newly added Chinese translation
2024-08-23 08:14:24 +00:00
ed 461f31582d add IDs for ricing (#93) + fix a11y bleed 2024-08-22 20:14:08 +00:00
ed f356faa278 u2c: support multiple exclusion patterns 2024-08-22 20:03:25 +00:00
ed 9f034d9c4c fix confusing logmsg for zerobyte files 2024-08-22 19:54:10 +00:00
ed ba52590ae4 translation tweaks 2024-08-22 19:52:20 +00:00
ultwcz 92edea1de5
add translation: Chinese (#94) 2024-08-22 17:19:16 +00:00
ed 7ff46966da fix some issues with shares mentioned in #84;
* crash when root volume is unmapped
* rephrase login-page for shares
* add chrome support (lol)
* fix confusing helptext
* improve ux
  * placeholders in share creator
  * button to disable expiration in share creator
  * human-readable timestamps in share listing
2024-08-19 21:38:47 +00:00
ed fca70b3508 update pkgs to 1.14.1 2024-08-19 00:24:52 +00:00
ed 70009cd984 v1.14.1 2024-08-19 00:14:44 +00:00
ed 8d8b88c4fd update pkgs to 1.14.0 2024-08-18 23:36:57 +00:00
ed c4b0cccefd v1.14.0 2024-08-18 23:11:36 +00:00
ed 7c2beba555 add file/folder sharing; closes #84 2024-08-18 22:49:13 +00:00
ed 7d8d94388b invert volume scrollwheel
<daniiooo> also iirc some time ago we were talking about the scroll for volume ed
<daniiooo> and how its reversed
<ed> is it reversed though? most people said it worked the way they expected
<daniiooo> fuck maybe i agreed back then too
<daniiooo> its the opposite in both aimp and mpv though
<ed> is it w
<tatsu> its a feature
<Devices> it's to keep you on your toes
<Devices> consciously use copyparty
<ed> i can invert it no problem
<ed> would be a nice surprise for anyone who's used it
<Flaminator> Scroll down turns the audio down right?
<daniiooo> ye it makes it louder in cpp
<Devices> why would scrolling down make something louder
<Vin> yeah that's odd
<Vin> scrolling up should make it louder
<Flaminator> It's what it does for me in winamp, mpc-hc and foobar2000.
<daniiooo> so now the question is who itc agreed to whats currently in cpp
<daniiooo> haha
<ed> idk but i'm inverting it
<ed> let's invert it every 6 months
2024-08-17 20:36:59 +00:00
ed 0b46b1a614 fix some vproxy issues (#93):
* navpane would always feed the vproxy paths into the tree
   instead of only when necessary (the initial load)

* mkdir would return `X-New-Dir` without the `rp-loc` prefix
  * chpw and some other redirects also sent raw vpaths

Reported-by: @iridial
2024-08-17 18:17:40 +00:00
ed 5153db6bff ux: login margin; theme2: yellow buttons
the red buttons from protonmail's monokai theme look better,
but they're confusing because intuitively red means off
2024-08-17 15:55:55 +00:00
ed b0af4b3712 hook/reloc: dupe in one vol doesn't mean dupe in another 2024-08-16 21:08:22 +00:00
ed c8f4aeaefa hook/reloc: fix up2k jank
* wark landed in the wrong registry when moved to another volume
   (harmless; upload would succeed on the next handshake)

* dedup did not apply correctly when moved into another volume,
   since all the checks were done based on the previous vol;
   fix this by recursing the whole thing

also update the reloc example after some real-world experience

Reported-by: @daniiooo
2024-08-15 19:26:06 +00:00
ed 00da74400c password-changer fixes:
* fix `--chpw-no` which did nothing
* print list of users with unchanged passwords by default
* more granular verbosity levels
2024-08-15 17:30:01 +00:00
ed 83fb569d61 make passwords user-changeable; closes #92 2024-08-14 20:09:57 +00:00
ed 5a62cb4869 fix custom fonts in sandboxed docs;
`@import` must be at the very start of a `<style>` tag

Reported-by: @thaddeuskkr (thx!)
2024-08-14 15:30:04 +00:00
ed 687df2fabd unix-socket fixes:
* support x-forwarded-for
* option to specify socket permissions and group
* in containers, avoid collision during restart
* add --help-bind with examples
2024-08-14 04:47:10 +00:00
ed cdd0794d6e update pkgs to 1.13.8 2024-08-13 00:20:04 +00:00
ed dcc988135e v1.13.8 2024-08-13 00:08:23 +00:00
ed 3db117d85f list status of optional dependencies 2024-08-12 22:48:53 +00:00
ed ee9aad82dd support listening on unix sockets 2024-08-12 21:58:02 +00:00
ed 2d6eb63fce scripts/uncomment: python 3.12 support;
`tokenize.FSTRING_MIDDLE` was introduced, changing the
representation of `f"x{{y"` from `STRING(f"x{{y")` to:

* `FSTRING_START('f"')`
* `FSTRING_MIDDLE('x{')`
* `FSTRING_MIDDLE('y')`
* `FSTRING_END('"')`

each literal `{` (encoded as `{{` in the input) now appears as a
single `{` as the final character of its `FSTRING_MIDDLE`, with
additional consecutive `FSTRING_MIDDLE` tokens if necessary

regular interpolating `{` are encoded as separate `OP` tokens

the fact that the literal `{` is encoded as a single `{` instead
of `{{` breaks the assumption that the string-value of each token
maps directly to the original code

fix this by replacing `{` with `{{` and `}` with `}}` in
`FSTRING_MIDDLE` tokens, and not adding whitespace after
`FSTRING_MIDDLE` tokens
2024-08-12 19:55:17 +00:00
ed ca001c8504 update deps (pyftpdlib, win10-python) 2024-08-12 18:51:52 +00:00
ed 4e581c59da fix s390x w/a, up2k name-randomizer 2024-08-12 17:45:19 +00:00
ed dbd42bc6bf add option to load custom js on all pages 2024-08-11 23:51:17 +00:00
ed c862ec1b64 up2k.js: optimal pipelining 2024-08-11 21:15:44 +00:00
ed f709140571 hook/reloc: helptext mentioned jank that doesn't exist anymore 2024-08-11 15:07:21 +00:00
ed ef1c4b7a20 this guy didn't make it in 2024-08-11 14:55:51 +00:00
ed 6c94a63f1c add hook side-effects; closes #86
hooks can now interrupt or redirect actions, and initiate
related actions, by printing json on stdout with commands

mainly to mitigate limitations such as sharex/sharex#3992

xbr/xau can redirect uploads to other destinations with `reloc`
and most hooks can initiate indexing or deletion of additional
files by giving a list of vpaths in json-keys `idx` or `del`

there are limitations;
* xbu/xau effects don't apply to ftp, tftp, smb
* xau will intentionally fail if a reloc destination exists
* xau effects do not apply to up2k

also provides more details for hooks:
* xbu/xau: basic-uploader vpath with filename
* xbr/xar: add client ip
2024-08-11 14:52:32 +00:00
ed 20669c73d3 rm dead code (gridview conditional dl/play)
and maybe fix negative eta when a chunk gets eaten by the network
2024-08-09 21:57:42 +00:00
ed 0da719f4c2 up2k: shrink request headers
v1.13.5 made some proxies angry with its massive chunklists

when stitching chunks, only list the first chunk hash in full,
and include a truncated hash for the consecutive chunks

should be enough for logfiles to make sense
and to smoketest that clients are behaving
2024-08-08 18:24:18 +00:00
ed 373194c38a better up2k stitching on fat32 servers:
* the batches don't need to be window-aligned
* improve js backoff (in case of more funnies)
2024-08-05 19:52:50 +00:00
ed 3d245431fc linter fixes 2024-08-05 18:48:16 +00:00
ed 250c8c56f0 fix deadlock on IBM mainframes (s390x) 2024-08-02 23:05:44 +00:00
ed e136231c8e docker: add portainer howto 2024-08-02 23:01:32 +00:00
ed 98ffaadf52 docker: use less RAM at runtime
compile to bytecode so cpython doesn't have to keep it in memory

ram usage reduced by:
* min: 5.4 MiB (32.6 to 27.2)
* ac/im: 5.2 MiB (39.0 to 33.8)
* dj/iv: 10.6 MiB (67.3 to 56.7)

startup time reduced from:
* min: 1.3s to 0.6s
* ac/im: 1.6s to 0.9s
* dj/iv: 2.0s to 1.1s

image size increased by 4 MiB (min), 6 MiB (ac/im/iv), 9 MiB (dj)

ram usage measured on idle with:
while true; do ps aux | grep -E 'R[S]S|no[-]crt'; read -n1; echo; done

startup time measured with:
time podman run --rm -it localhost/copyparty-min-amd64 --exit=idx
2024-08-02 22:11:23 +00:00
ed ebb1981803 py2: reduce ram usage 2024-08-01 20:01:42 +00:00
ed 72361c99e1 add import chickenbits 2024-08-01 18:29:25 +00:00
ed d5c9c8ebbd make it 5% faster 2024-07-31 17:51:53 +00:00
ed 746229846d add test for zip-download 2024-07-30 22:44:29 +00:00
ed ffd7cd3ca8 update pkgs to 1.13.6 2024-07-29 20:56:00 +00:00
ed b3cecabca3 v1.13.6 2024-07-29 20:28:51 +00:00
ed 662541c64c audio-player: show status while loading 2024-07-29 20:14:39 +00:00
ed 225bd80ea8 up2k.js: fix overshoot in chunk stitcher 2024-07-29 19:19:22 +00:00
ed 85e54980cc up2k.js: set timeouts for uploads
in the event that an upload chunk gets stuck, the js would
never stop waiting for a response, requiring a page reload

improves reliability when running behind a reverse-proxy
which is configured to never timeout requests (can make
sense when combined with other services on the same box)
2024-07-29 19:17:03 +00:00
ed a19a0fa9f3 fix modal wordwrap in firefox;
with overflow:auto, firefox picks the div-width before estimating
the height, causing it to undershoot by the scrollbar width
and then messing up the text alignment

fix: conditionally set overflow-y:scroll using js
2024-07-29 18:04:35 +00:00
ed 9bb6e0dc62 misc ux:
* wait until page (au) has loaded to register hotkeys
* hotkey `m` would grow sidebar if tree was minimized
* more exact warning about num.parallel uploads
* keep more console logs in memory
* message phrasing
2024-07-29 17:59:34 +00:00
ed 15ddcf53e7 add bsod theme 2024-07-26 22:09:59 +00:00
ed 6b54972ec0 update comparison vs similar software:
* general changes:
  * upload speed comparisons considering v1.13.5

* hfs2:
  * dead project with unfixed vulnerabilities

* hfs3:
  * has replaced hfs2
  * uploads are now resumable
  * add new functionality:
    * write-only folders
    * unmap subfolders
    * move and delete files
    * folder-rproxy
    * themes
    * basic audio player, image viewer

* filebrowser:
  * uploads are now parallelized, resumable, segmented
    * but single large files are not accelerated
  * can listen on unix sockets
  * folder-rproxy is supported
  * more cpu efficient than copyparty
2024-07-26 19:46:03 +00:00
ed 0219eada23 cleanup: strip trailing whitespace 2024-07-26 19:33:56 +00:00
ed 8916bce306 u2c fixes:
* `--sz` was num.chunks, not the intended MiB
* crash on exit with `-z` and no modified files
* summary upload elapsed-time could exceed wallclock
2024-07-26 19:28:47 +00:00
ed 99edba4fd9 change xm examples to reject users without write-access; #68 2024-07-25 19:23:08 +00:00
ed 64de3e01e8 update pkgs to 1.13.5 2024-07-22 23:48:24 +00:00
ed 8222ccc40b v1.13.5 2024-07-22 23:23:53 +00:00
ed dc449bf8b0 fix grid toolbar undocking after viewing a pic/vid 2024-07-22 23:09:25 +00:00
ed ef0ecf878b recommend rclone over davfs2; closes #90 2024-07-22 22:46:24 +00:00
ed 53f1e3c91d ui option to play video as audio
audio extraction happens serverside to opus or mp3
depending on browser support

remuxing (extracting audio without transcoding)
is currently not supported, and is not planned
2024-07-22 22:30:21 +00:00
ed eeef80919f css-fix for firefox52 (centos6) 2024-07-22 20:59:05 +00:00
ed 987bce2182 u2c fixes:
* don't stitch across deduplicated blocks
* print speed/time for hash/upload
* more compact json in handshakes
2024-07-22 20:55:32 +00:00
ed b511d686f0 up2k fixes:
* progress donuts should include inflight bytes
* changes to stitch-size in settings didn't apply until next refresh
* serverlog was too verbose; truncate chunk hashes
* mention absolute cloudflare limit in readme
2024-07-22 19:06:01 +00:00
ed 132a83501e add chunk stitching; twice as fast long-distance uploads:
rather than sending each file chunk as a separate HTTP request,
sibling chunks will now be fused together into larger HTTP POSTs
which results in unreasonably huge speed boosts on some routes
( `2.6x` from Norway to US-East,  `1.6x` from US-West to Finland )

the `x-up2k-hash` request header now takes a comma-separated list
of chunk hashes, which must all be sibling chunks, resulting in
one large consecutive range of file data as the post body

a new global-option `--u2sz`, default `1,64,96`, sets the target
request size as 64 MiB, allowing the settings ui to specify any
value between 1 and 96 MiB, which is cloudflare's max value

this does not cause any issues for resumable uploads; thanks to the
streaming HTTP POST parser, each chunk will be verified and written
to disk as they arrive, meaning only the untransmitted chunks will
have to be resent in the event of a connection drop -- of course
assuming there are no misconfigured WAFs or caching-proxies

the previous up2k approach of uploading each chunk in a separate HTTP
POST was inefficient in many real-world scenarios, mainly due to TCP
window-scaling behaving erratically in some IXPs / along some routes

a particular link from Norway to Virginia,US is unusably slow for
the first 4 MiB, only reaching optimal speeds after 100 MiB, and
then immediately resets the scale when the request has been sent;
connection reuse does not help in this case

on this route, the basic-uploader was somehow faster than up2k
with 6 parallel uploads; only time i've seen this
2024-07-21 23:35:37 +00:00
ed e565ad5f55 better errors through broker 2024-07-21 20:36:50 +00:00
ed f955d2bd58 dangit 2024-07-20 22:28:40 +00:00
ed 5953399090 add helptext exporters (html, txt) 2024-07-17 23:06:01 +00:00
ed d26a944d95 hooks: add cache-warmer 2024-07-17 21:00:59 +00:00
ed 50dac15568 update pkgs to 1.13.4 2024-07-16 05:48:45 +00:00
ed ac1e11e4ce v1.13.4 2024-07-16 04:57:26 +00:00
ed d749683d48 hooks: add permission filtering, argv-prepend;
hooks can be restricted to users with certain permissions, for example
`--xm aw,notify-send` will only `notify-send` if user has write-access

the user's list of permissions are now also included in the json
that is passed to the hook if enabled; `--xm aw,j,notify-send`

will now also stop parsing flags when encountering a blank value,
allowing to specify any initial arguments to the command:
`--xm aw,j,,notify-send,hey` would run `notify-send` with `hey`
as its first argument, and the json would be the 2nd argument,
similarly `--xm ,notify-send,hey` when no flags specified

this is somewhat explained in `--help-hooks`, but
additional related features are planned in the near future
and will all be better documented when the dust settles
2024-07-16 04:45:02 +00:00
ed 84e8e1ddfb ftpd: only mention vols that user can access
if an ftp client tried to list the toplevel folder on a server
where nothing is mounted toplevel, it would syntheisze a
directory listing which included all volumes, even those
which the user would not be able to access

so basically not a problem, just very confusing
2024-07-15 21:24:26 +00:00
ed 6e58514b84 update deps:
* win10:
  * python 3.12
  * pillow 10.4
  * pyinstaller 6.9
* win: upx 4.2.4
* web: dompurify 3.1.6
2024-07-15 21:16:19 +00:00
ed 803e156509 hooks: improve torrent downloader 2024-07-14 17:57:36 +00:00
ed c06aa683eb allow audio-DL regardless of current folder 2024-07-13 17:10:24 +02:00
ed 6644ceef49 mention davfs2 workaround, closes #91 2024-07-13 16:55:27 +02:00
ed bd3b3863ae hooks: add bittorrent downloader 2024-07-13 01:37:17 +02:00
ed ffd4f9c8b9 hooks: describe examples better 2024-07-13 01:32:26 +02:00
ed 760ff2db72 other linter nitpicks (not actually bugs) 2024-07-13 01:18:14 +02:00
ed f37187a041 fix bugs detected by pyright but not pylance:
* race-the-beam broke in v1.13.3 (i'm good at this)

* wrong logger type in certgen
2024-07-13 01:09:19 +02:00
ed 1cdb170290 order-significant --th-covers;
the first matching filename as listed in the
`--th-covers` global-option will always be selected
2024-07-13 00:54:38 +02:00
ed d5de3f2fe0 improve --cgen (configfile generator) 2024-07-12 22:57:57 +02:00
ed d76673e62d use correct mtime for folder thumbs;
mtime the file that was used to produce the folder thumbnail
(rather than the folder itself) since the folder-thumb is
always resolved to the file's thumb in the on-disk cache
2024-07-11 23:12:51 +02:00
ed c549f367c1 reduce timeout of unbounded socket reads;
if a request body is expected, but request has no content-length,
set the timeout to 1/20 of `--s-tbody`, so 9 seconds by default,
or 3 seconds if it's 60 as recommended in helptext

this gives less confusing behavior if a client accidentally does
something invalid, replying with an error response before the
previous timeout of 186 seconds

also raise the slowloris flag, in case a client bugs out and
keeps making such requests
2024-07-10 11:14:42 +02:00
ed 927c3bce96 support descript.ion; makes listings 2% slower 2024-07-06 17:02:33 +02:00
ed d75a2c77da og: fix viewing readmes 2024-07-06 16:55:15 +02:00
ed e6c55d7ff9 systemd service: fix install notes, closes #88
the linked issue mentions that creating the `th` folder inside `.hist`
failed when RestrictSUIDSGID=true was enabled; this was on raspbian11
inside an ext4 chmod 777 owned by another user, so I have no idea why
that option would make any difference... but might as well mention it
2024-06-27 17:35:23 +02:00
ed 4c2cb26991 readme: add mimetype mapping examples; closes #89 2024-06-27 15:24:15 +02:00
ed dfe7f1d9af point out that HTTP/2 tends to be slower than HTTP/1.1
re discord, someone with a fairly standard setup (cpp behind nginx)
found that switching from HTTP/2 to HTTP/1.1 made it 5x faster
2024-06-27 15:19:21 +02:00
ed 666297f6fb remove excessive warning on ancient machines;
sqlite<3.9 combined with python<3.6> would always warn
that `-e2t` is not supported, even when not requested
2024-06-27 14:55:12 +02:00
ed 55a011b9c1 fix jank when trying to play a corrupt audio file
if a song fails to play for some reason (network loss,
corrupt file), a timer plays the next track after 5s

the timer was not cancelled if the user
started another track in the meantime
2024-06-23 01:59:02 +02:00
ed 27aff12a1e fix helptext, closes #87 2024-06-19 10:42:41 +02:00
ed 9a87ee2fe4 add gsel option; closes #85
global-option `--gsel`, volflag `gsel` default-enables the
client setting to select files by ctrl-clicking them in the grid
2024-06-18 22:47:17 +02:00
ed 0a9f4c6074 ftpd: allow implicit overwrite if user has delete perms
the spec doesn't say what you're supposed to do if the target filename of an upload is already taken, but this seems to be the most common behavior on other ftp servers, and is required by wondows 2000 (otherwise it'll freak out and issue a delete and then not actually upload it, nice)

new option `--ftp-no-ow` restores old default behavior of rejecting upload if target filename exists
2024-06-18 12:07:45 +02:00
ed 7219331057 bugfixes;
* `--og` went 500 if thumbnails were disabled / not available
* strip_hints wasn't very helpful explaining why it crashed
2024-06-18 12:01:48 +02:00
ed 2fd12a839c more windows2000 support 2024-06-18 12:01:21 +02:00
ed 8c73e0cbc2 support windows 2000 and XP 2024-06-17 00:09:52 +02:00
ed 52e06226a2 make thumbnails compatible with dirkeys/filekeys
was intentionally skipped to avoid complexity but enough people have
asked why it doesn't work that it's time to do something about it

turns out it wasn't that bad
2024-06-16 21:35:43 +02:00
ed 452592519d tftp:
* upgrade to partftpy 0.4.0
  * workarounds for buggy clients/servers
  * improved ipv6 support, especially on macos
  * improved robustness on unreliable networks

* make `--tftp4` separate from `--ftp4`
2024-06-16 21:20:09 +02:00
ed c9281f8912 option to return media-links for uploads 2024-06-07 12:56:02 +00:00
ed 36d6d29a0c set audio volume by scrollwheel 2024-06-07 12:23:55 +00:00
ed db6059e100 music preloader fixes:
* stop scanning after 5 folders
* don't walk into errorpages (such as unmapped root)

and improve errortoast in case of network issues
2024-06-07 11:38:40 +00:00
ed aab57cb24b update pkgs to 1.13.3 2024-06-01 23:51:14 +00:00
ed f00b939402 v1.13.3 2024-06-01 23:24:35 +00:00
ed bef9617638 u2c.exe: explain that https is disabled 2024-06-01 22:26:47 +00:00
ed 692175f5b0 md-editor autoindent was duplicating hr markers
only keep characters `>+-*` if there's less than three of them,
and discard entire prefix if there's more

markdown spec only cares about exactly-one or three-or-more, but
let's keep pairs in case anyone use that as unconventional markup
2024-06-01 20:56:15 +00:00
ed 5ad65450c4 more intuitive df option/volflag, closes #83 2024-06-01 01:15:34 +00:00
ed 60c96f990a ux: hide video ui + floor seekbar text
* hide lightbox buttons when a video is playing

* move audio seekbar text to the bottom, so it
   hides less of the waveform and minute-markers
2024-06-01 00:35:44 +00:00
ed 07b2bf1104 better support for 700+ connections
when there was more than ~700 active connections,
* sendfile (non-https downloads) could fail
* mdns and ssdp could fail to reinitialize on network changes

...because `select` can't handle FDs higher than 512 on windows
(1024 on linux/macos), so prefer `poll` where possible (linux/macos)

but apple keeps breaking and unbreaking `poll` in macos,
so use `--no-poll` if necessary to force `select` instead
2024-05-31 23:31:32 +00:00
ed ac1bc232a9 black 2024-05-31 08:57:33 +00:00
ed 5919607ad0 sanitize fs-paths in archive error summary
also gets rid of a dumb debug print i forgot
2024-05-30 23:55:37 +00:00
ed 07ea629ca5 keep most tags during audio transcode
metadata is no longer discarded when transcoding to opus or mp3;
this was a good idea back when the transcodes were only used by
the webplayer, but now that folders can be batch-downloaded with
on-the-fly transcoding, it makes sense to keep most of the tags

individual tags are discarded if its value exceeds 1023 letters

this should mainly affect the following:
* traktor beatmaps, size usually somewhere around 100 KiB
* non-standard cover-art embeddings, size around 250 KiB
* XMP (project data from adobe premiere), around 48 KiB
2024-05-30 23:46:56 +00:00
ed b629d18df6 print helpful warning if unix env is inhospitable
thx kipu you're the best
2024-05-11 18:34:41 +00:00
ed 566cbb6507 update pkgs to 1.13.2 2024-05-10 15:04:33 +00:00
ed 400d700845 v1.13.2 2024-05-10 14:31:50 +00:00
ed 82ce6862ee option to use pngquant for smaller waveform PNGs 2024-05-10 13:06:02 +00:00
ed 38e4fdfe03 batch-convert audio waveforms with ?tar&p 2024-05-10 12:55:35 +00:00
ed c04662798d play compressed s3xmodit chiptunes
adds support for playing gz, xz, and zip-compressed tracker files

using the de-facto naming convention for compressed modules;

* mod: mdz, mdgz, mdxz
* s3m: s3z, s3gz, s3xz
* xm: xmz, xmgz, xmxz
* it: itz, itgz, itxz
2024-05-10 12:45:17 +00:00
ed 19d156ff4e option to add custom UI translations 2024-05-09 23:09:45 +00:00
ed 87c60a1ec9 ensure OS signals hit main-thread as intended;
use sigmasks to block SIGINT, SIGTERM, SIGUSR1 from all other threads

also initiate shutdown by calling sighandler directly,
in case this misses anything and that is still unreliable
(discovered by `--exit=idx` being noop once in a blue moon)
2024-05-09 22:28:16 +00:00
ed 2c92dab165 fix small annoyances,
* mute exception on early shutdown
* sfx: give the utime thread a name
2024-05-09 14:17:53 +00:00
ed 5c1e23907d og: append full original filename as url suffix 2024-05-09 13:18:15 +00:00
ed 925c7f0a57 in gridview, assume .ts files are video, not typescript 2024-05-08 22:20:29 +00:00
ed feed08deb2 doc: export --help to html and link it 2024-05-08 22:01:58 +00:00
ed 560d7b6672 option to add or change mimetype mappings 2024-05-08 21:12:14 +00:00
ed 565daee98b fix mimetype detection for uppercase file extensions 2024-05-08 20:08:11 +00:00
ed e396c5c2b5 only drop index caches if necessary;
prevents having to rebuild covers due to unrelated changes
2024-05-08 20:03:51 +00:00
ed 1ee2cdd089 update pkgs to 1.13.1 2024-05-06 01:11:01 +00:00
ed beacedab50 v1.13.1 2024-05-06 00:29:15 +00:00
ed 25139a4358 qr-code: better fallback ip when no default-route 2024-05-05 23:36:05 +00:00
ed f8491970fd remember url-hash during login from 403 2024-05-05 22:37:41 +00:00
ed da091aec85 "volume" is too overloaded, make it --au-vol instead 2024-05-05 21:27:07 +00:00
ed e9eb5affcd and option to set default audio/video volume 2024-05-05 19:10:29 +00:00
ed c1918bc36c expand tcolor early to avoid listing in volume props 2024-05-05 18:52:02 +00:00
ed fdda567f50 ux: add "this folder is empty" banner 2024-05-05 18:44:36 +00:00
ed 603d0ed72b misc: messages, docs, ie4 / win311 support
* docker: improve config-not-found warning message
* readme: mention markdown variable expansion
* basic-browser: use zip=crc to support ie4 / win-3.11
2024-05-05 17:32:50 +00:00
ed b15a4ef79f failed attempt at making images load on android-discord 2024-05-05 14:16:22 +00:00
ed 48a6789d36 use --og-title as fallback if template gives blank result 2024-05-05 11:25:52 +00:00
ed 36f2c446af opengraph stuff:
* template-based title formatting
* picture embeds are no longer ant-sized
* `--og-color` sets accent color; default #333
* `--og-s-title` forces default title, ignoring e2t
* add a music indicator to song titles because discord doesn't
2024-05-03 00:11:40 +00:00
ed 69517e4624 add general-purpose query-string parcelling;
currently only being used to workaround discord discarding
query strings in opengraph tags, but i'm sure there will be
plenty more wonderful usecases for this atrocity
2024-05-02 22:49:27 +00:00
ed ea270ab9f2 add og / opengraph / discord embeds 2024-05-01 23:40:56 +00:00
ed b6cf2d3089 --html-head can take a filepath and/or jinja2 2024-05-01 20:24:18 +00:00
ed e8db3dd37f fix tests on windows 2024-04-25 22:25:38 +00:00
ed 27485a4cb1 add pyz builder 2024-04-24 23:45:01 +00:00
ed 253a414443 better ctrl-v upload ux 2024-04-24 23:49:34 +02:00
ed f6e693f0f5 reevaluate support for sparse files periodically
if a given filesystem were to disappear (e.g. removable storage)
followed by another filesystem appearing at the same location,
this would not get noticed by up2k in a timely manner

fix this by discarding the mtab cache after `--mtab-age` seconds and
rebuild it from scratch, unless the previous values are definitely
correct (as indicated by identical output from `/bin/mount`)

probably reduces windows performance by an acceptable amount
2024-04-24 21:18:26 +00:00
ed c5f7cfc355 upload files/images with CTRL-V (from explorer etc.) 2024-04-23 19:46:54 +00:00
ed bc2c1e427a config-reset forgot the dots cookie 2024-04-23 19:39:43 +00:00
ed 95d9e693c6 d2d should disable search/unpost even if db exists 2024-04-22 18:55:13 +00:00
ed 70a3cf36d1 pipe: only flush FDs when necessary
should give higher performance on servers with slow storage
2024-04-21 23:53:04 +00:00
ed aa45fccf11 update pkgs to 1.13.0 2024-04-20 22:48:16 +00:00
ed 42d00050c1 v1.13.0 2024-04-20 22:32:50 +00:00
ed 4bb0e6e75a pipe: windows: make it safe with aggressive flushing 2024-04-20 22:15:08 +00:00
ed 2f7f9de3f5 pipe: optimize (1 GiB/s @ ryzen5-4500U) 2024-04-20 20:13:31 +00:00
ed f31ac90932 less confusing help-text for --re-dhash 2024-04-20 16:42:56 +00:00
ed 439cb7f85b u2c: add --ow (previously part of --dr) 2024-04-20 16:36:10 +00:00
ed af193ee834 keep up2k state integrity on abort 2024-04-20 16:13:32 +00:00
ed c06126cc9d pipe: add volflag to disable 2024-04-19 23:54:23 +00:00
ed 897ffbbbd0 pipe: add to docs 2024-04-19 00:02:28 +00:00
ed 8244d3b4fc pipe: add tapering to keep tcp alive 2024-04-18 23:10:37 +00:00
ed 74266af6d1 pipe: warn when trying to download a .PARTIAL
and fix file sorting indicators on firefox
2024-04-18 23:10:11 +00:00
ed 8c552f1ad1 windows: fix upload-abort 2024-04-18 23:08:05 +00:00
ed bf5850785f add opt-out from storing uploader IPs 2024-04-18 17:16:00 +00:00
ed feecb3e0b8 up2k: fix put-hasher dying + a harmless race
* hasher thread could die if a client would rapidly
   upload and delete files (so very unlikely)

* two unprotected calls to register_vpath which was
   almost-definitely safe because the volumes
   already existed in the registry
2024-04-18 16:43:38 +00:00
ed 08d8c82167 PoC: ongoing uploads can be downloaded in lockstep 2024-04-18 00:10:54 +00:00
ed 5239e7ac0c separate registry mutex for faster access
also fix a harmless toctou in handle_json where clients
could get stuck hanging for a bit longer than necessary
2024-04-18 00:07:56 +00:00
ed 9937c2e755 add ArozOS to comparison 2024-04-16 21:00:47 +00:00
ed f1e947f37d rehost deps from a flaky server 2024-04-12 21:49:01 +00:00
ed a70a49b9c9 update pkgs to 1.12.2 2024-04-12 21:25:21 +00:00
ed fe700dcf1a v1.12.2 2024-04-12 21:10:02 +00:00
ed c8e3ed3aae retry failed renames on windows
theoretical issue which nobody has ran into yet,
probably because nobody uses this on windows
2024-04-12 20:38:30 +00:00
ed b8733653a3 fix audio transcoding with filekeys 2024-04-11 21:54:15 +00:00
ed b772a4f8bb fix wordwrap of buttons on ios 2024-04-11 21:31:40 +00:00
ed 9e5253ef87 ie11: restore load-bearing thing 2024-04-11 20:53:15 +00:00
ed 7b94e4edf3 configurable basic-auth preference;
adds options `--bauth-last` to lower the preference for
taking the basic-auth password in case of conflict,
and `--no-bauth` to entirely disable basic-authentication

if a client is providing multiple passwords, for example when
"logged in" with one password (the `cppwd` cookie) and switching
to another account by also sending a PW header/url-param, then
the default evaluation order to determine which password to use is:

url-param `pw`, header `pw`, basic-auth header, cookie (cppwd/cppws)

so if a client supplies a basic-auth header, it will ignore the cookie
and use the basic-auth password instead, which usually makes sense

but this can become a problem if you have other webservers running
on the same domain which also support basic-authentication

--bauth-last is a good choice for cooperating with such services, as
--no-bauth currently breaks support for the android app...
2024-04-11 20:15:49 +00:00
ed da26ec36ca add password placeholder on login page
was easy to assume you were supposed to put a username there
2024-04-11 19:31:02 +00:00
ed 443acf2f8b update nuitka notes 2024-04-10 22:04:43 +00:00
ed 6c90e3893d update pkgs to 1.12.1 2024-04-09 23:53:43 +00:00
ed ea002ee71d v1.12.1 2024-04-09 23:34:31 +00:00
ed ab18893cd2 update deps 2024-04-09 23:25:54 +00:00
ed 844d16b9e5 bbox: scrollwheel for prev/next pic
inspired by d385305f5e
2024-04-09 20:39:07 +00:00
ed 989cc613ef fix tree-rendering when history-popping into bbox
plus misc similar technically-incorrect addq usages;
most of these don't matter in practice since they'll
never get a url with a hash, but makes the intent clear

and make sure hashes never get passed around
like they're part of a dirkey, harmless as it is
2024-04-09 19:54:15 +00:00
ed 4f0cad5468 fix bbox destructor, closes #81 for real 2024-04-09 19:10:55 +00:00
ed f89de6b35d preloading too aggressive, chill a bit 2024-04-09 18:44:23 +00:00
ed e0bcb88ee7 update pkgs to 1.12.0 2024-04-06 20:56:52 +00:00
ed a0022805d1 v1.12.0 (closes #64) 2024-04-06 20:11:49 +00:00
ed 853adb5d04 update deps 2024-04-06 19:51:38 +00:00
ed 7744226b5c apply audio equalizer to videos too 2024-04-06 18:44:08 +00:00
ed d94b5b3fc9 fau doesn't work on iphones; compensate by preloading much earlier 2024-04-06 18:43:45 +00:00
ed e6ba065bc2 improve cachebusters 2024-04-06 00:27:06 +00:00
ed 59a53ba9ac on phones, fix playback halting if next song didn't buffer in time 2024-04-06 00:25:28 +00:00
ed b88cc7b5ce turns out it doesn't need to be audible... 2024-04-05 23:06:26 +00:00
ed 5ab54763c6 remove pyoxidizer (unmaintained)
partially reverts e430b2567a

the remaining stuff might be useful for other cpython alternatives
2024-04-05 17:51:26 +00:00
ed 59f815ff8c deps: add busy.mp3 2024-04-04 09:27:01 +00:00
ed 9c42cbec6f maybe fix #81 2024-04-03 00:28:15 +00:00
ed f471b05aa4 todo: fix playback stopping on phones if slow preload 2024-04-02 23:20:58 +00:00
ed 34c32e3e89 golf:
util.js ensures `WebAssembly`, `Notification`, and `FormData`
are always declared, setting them false when not available
2024-04-02 20:25:06 +00:00
ed a080759a03 add transcoding to mp3
because CU's car stereo can't do opus...

incidentally adds support for playing any audio format in ie11
2024-03-29 16:36:56 +00:00
ed 0ae12868e5 dirkeys: add volflag dky (skip keycheck) 2024-03-27 21:03:58 +00:00
ed ef52e2c06c dirkeys: fix 403 in dks volumes 2024-03-27 20:34:34 +00:00
ed 32c912bb16 fix a bunch of dirkey stuff:
* breadcrumb navigation
* tree generation in `recvls`
* dirkeys in initial tree
2024-03-27 16:05:05 +00:00
ed 20870fda79 Merge branch 'dirkeys' into hovudstraum 2024-03-25 10:34:08 +00:00
ed bdfe2c1a5f mention unproductive optimizations 2024-03-24 22:07:23 +00:00
ed cb99fbf442 update pkgs to 1.11.2 2024-03-23 17:53:19 +00:00
ed bccc44dc21 v1.11.2 2024-03-23 17:24:36 +00:00
ed 2f20d29edd idp: mention lack of volume persistence 2024-03-23 16:35:45 +00:00
ed c6acd3a904 add option --s-rd-sz (socket read size):
counterpart of `--s-wr-sz` which existed already

the default (256 KiB) appears optimal in the most popular scenario
(linux host with storage on local physical disk, usually NVMe)

was previously 32 KiB, so large uploads should now use 17% less CPU

also adds sanchecks for values of `--iobuf`, `--s-rd-sz`, `--s-wr-sz`

also adds file-overwrite feature for multipart posts
2024-03-23 16:35:14 +00:00
ed 2b24c50eb7 add option --iobuf (file r/w buffersize):
the default (256 KiB) appears optimal in the most popular scenario
(linux host with storage on local physical disk, usually NVMe)

was previously a mix of 64 and 512 KiB;
now the same value is enforced everywhere

download-as-tar is now 20% faster with the default value
2024-03-23 16:17:40 +00:00
ed d30ae8453d idp: precise expansion of ${u} (fixes #79);
it is now possible to grant access to users other than `${u}`
(the user which the volume belongs to)

previously, permissions did not apply correctly to IdP volumes due to
the way `${u}` and `${g}` was expanded, which was a funky iteration
over all known users/groups instead of... just expanding them?

also adds another sanchk that a volume's URL must contain a
`${u}` to be allowed to mention `${u}` in the accs list, and
similarly for `${g}` / `@${g}` since users can be in multiple groups
2024-03-21 20:10:27 +00:00
ed 8e5c436bef black + isort 2024-03-21 18:51:23 +00:00
ed f500e55e68 update pkgs to 1.11.1 2024-03-18 17:41:43 +00:00
ed 9700a12366 v1.11.1 2024-03-18 17:09:56 +00:00
ed 2b6a34dc5c sfx: lexically comparable git-build versions
if building from an untagged git commit, the third value in the
VERSION tuple (in __version__.py) was a string instead of an int,
causing the version to compare and sort incorrectly
2024-03-18 17:04:49 +00:00
ed ee80cdb9cf docs: real-ip (with or without cloudflare) 2024-03-18 16:30:51 +00:00
ed 2def4cd248 fix linter warnings + a test 2024-03-18 15:25:10 +00:00
ed 0287c7baa5 fix unpost when there is no rootfs;
the volflags of `/` were used to determine if e2d was enabled,
which is wrong in two ways:

* if there is no `/` volume, it would be globally disabled

* if `/` has e2d, but another volume doesn't, it would
   erroneously think unpost was available, which is not an
   issue unless that volume used to have e2d enabled AND
   there is stale data matching the client's IP

3f05b665 (v1.11.0) had an incomplete fix for the stale-data part of
the above, which also introduced the other issue
2024-03-18 06:15:32 +01:00
ed 51d31588e6 parse xff before deciding to reject a connection
this commit partially fixes the following issue:
if a client manages to escape real-ip detection, copyparty will
try to ban the reverse-proxy instead, effectively banning all clients

this can happen if the configuration says to obtain client real-ip
from a cloudflare header, but the server is not configured to reject
connections from non-cloudflare IPs, so a scanner will eventually
hit the server IP with malicious-looking requests and trigger a ban

copyparty will now continue to process requests from banned IPs until
the header has been parsed and the real-ip has been obtained (or not),
causing an increased server load from malicious clients

assuming the `--xff-src` and `--xff-hdr` config is correct,
this issue should no longer be hitting innocent clients

the old behavior of immediately rejecting a banned IP address
can be re-enabled with the new option `--early-ban`
2024-03-17 02:36:03 +00:00
ed 32553e4520 fix building mtp deps on python 3.12 2024-03-16 13:59:08 +00:00
ed 211a30da38 update pkgs to 1.11.0 2024-03-15 21:34:29 +00:00
ed bdbcbbb002 v1.11.0 (closes #62) 2024-03-15 20:47:58 +00:00
ed e78af02241 docs:
* add readme section on using amazon/aws s3 as storage
* mention http/https confusion caused by incorrectly configured cloudflare
* improve custom-font notes
* docker: ftp-server howto
* docker: suggest moving hist-folders into the config path

and switch the idp docker-compose files to use the
main image, in anticipation of v1.11
2024-03-14 23:26:26 +00:00
ed 115020ba60 update partftpy to 0.3.1 2024-03-14 22:30:25 +00:00
ed 66abf17bae black 2024-03-14 18:37:05 +00:00
ed b377791be7 support cidr notation for --xff-src, --ipa, --*-ipa
the old `10.88.` syntax is still supported,
translating to `10.88.0.0/16`

also fix `--tftp-ipa` when optimizations are enabled
2024-03-14 19:07:35 +01:00
ed 78919e65d6 idp: docs 2024-03-13 22:50:50 +00:00
ed 84b52ea8c5 idp: docs / cleanup 2024-03-13 22:13:34 +00:00
ed fd89f7ecb9 idp: abandon idea for persisting idp volumes;
too fraught with subtle dangers, such as other copyparty instances
ending up sharing knowledge of volumes unintentionally, and
configuration becoming mysteriously sticky (not to mention
this would all become hella difficult to reason about)

instead, rely entirely on users seeing the big red warning
added in 2ebfdc25 if their configuration is dangerous

this decision has the drawback that there will be server stuttering
whenever a new user makes themselves known since the last restart,
as it realizes the volumes exist and does the usual e2ds indexing,
instead of doing it early during startup

but it's probably good enough
2024-03-13 21:49:49 +00:00
ed 2ebfdc2562 idp: add anon-read sanchk 2024-03-13 21:36:36 +00:00
ed dbf1cbc8af idp: hide login/logout UI + improve html_head handling 2024-03-13 18:22:24 +00:00
ed a259704596 Merge branch 'hovudstraum' into idp 2024-03-13 17:28:48 +00:00
ed 04b55f1a1d get rid of the halted-playback detector,
underlying cause probably fixed by f262aee8
2024-03-13 15:41:43 +00:00
ed 206af8f151 handle mediaplayer hash collisions between folders;
when switching to another folder with identical filenames, the
mediaplayer would get confused and think it was the same files,
messing up the playback order
2024-03-13 15:30:47 +00:00
ed 645bb5c990 tweak some sus logic re: mtp on config reload
and fix controlpanel status listing so the state-change from
mtp to idle happens immediately as each volume finishes up
2024-03-13 15:08:05 +00:00
ed f8966222e4 todo-done: IdP secret-tokens 2024-03-12 23:06:20 +00:00
ed d71f844b43 IdP: add safeguard --idp-h-key and also require --xff-src 2024-03-12 22:57:47 +00:00
ed e8b7f65f82 IdP: parallel user init + rename idp-h-sep to idp-gsep
`--idp-h-sep` is still supported and will map to its new name
2024-03-12 21:21:53 +00:00
ed f193f398c1 Merge branch 'hovudstraum' into idp 2024-03-12 17:31:27 +00:00
ed b6554a7f8c black 3f05b665 (add upload abort feat.) 2024-03-11 20:18:42 +00:00
ed 3f05b6655c add UI to abort an unfinished upload; suggested in #77
to abort an upload, refresh the page and access the unpost tab,
which now includes unfinished uploads (sorted before completed ones)

can be configured through u2abort (global or volflag);
by default it requires both the IP and account to match

https://a.ocv.me/pub/g/nerd-stuff/2024-0310-stoltzekleiven.jpg
2024-03-11 01:32:02 +01:00
ed 51a83b04a0 fix upload/filesearch default when preference is not set;
ui would enter a confusing state when hopping between a
folder with write-permissions and one without
2024-03-09 22:14:15 +00:00
ed 0c03921965 mention that restart is required for changes to global config params in the controlpanel tooltip 2024-03-09 22:12:57 +00:00
ed 2527e90325 sharex: backport to v12.1 due to controversial changes in sharex v12.2, something about removing ctrl-scrolling through options while capturing, idk 2024-03-09 22:11:35 +00:00
ed 7f08f10c37 stop recommending --xff-src=any;
running behind cloudflare doesn't necessarily
mean being accessible ONLY through cloudflare

also include a general warning about optimal
configuration for non-cloudflare intermediates
2024-03-09 20:30:20 +00:00
ed 1c011ff0bb hide k304 config from controlpanel by default;
as this option is very rarely useful, add global-option `--k304` to
unhide the button and/or set it default-enabled

the toggle will still appear when the feature was previously enabled by
a client, and the feature is still default-enabled for all IE clients
2024-03-09 17:50:24 +00:00
ed a1ad608267 add TODO.md, closes #78 2024-03-09 09:02:16 +00:00
ed 547a486387 defer final up2k redraw until dedups resolved
fixes busy-tab still showing dupes as rejected
2024-03-08 21:55:07 +00:00
ed 7741870dc7 make cloudflare outages non-fatal to uploads
if a reverse-proxy starts hijacking requests and replying with HTML,
don't panic when it fails to decode as a handshake json

fix this for most other json-expecting gizmos too,
and take the opportunity to cleanup some text formatting
2024-03-08 21:33:39 +00:00
ed 8785d2f9fe add volflag sparse to force use of sparse files;
this improves performance on s3-backed volumes

noktuas reported on discord that the upload performance was
unexpectedly poor when writing to an s3 bucket through a JuiceFS
fuse-mount, only getting 1.5 MiB/s with copyparty, meanwhile a
regular filecopy averaged 30 MiB/s plus

the issue was that s3 does not support sparse files, so copyparty
would fall back to sequential uploading, and also disable fpool,
causing JuiceFS to repeatedly commit the same 5 MiB range to
the storage provider as each chunk arrived from the client

by forcing use of sparse files, s3 adapters such as JuiceFS and
geesefs will "only" write the entire file to s3 *twice*, initially
it writes the full filesize of zerobytes (depending on adapter,
hopefully using gzip compression to reduce the bandwidth necessary)
and then the actual file data in an adapter-specific chunksize

with this volflag, copyparty appears to reach the full expected speed
2024-03-08 18:20:29 +00:00
ed d744f3ff8f improve smoketests, warnings and error-messages:
* docker: warn if there are config-files in ~/.config/copyparty
   because somebody copied their config into
   /cfg/copyparty instead of /cfg as intended

* docker: warn if there are no config-files in an included directory

* make misconfigured reverse-proxies more obvious
  * explain cors rejections in server log
  * indicate cors rejection in error toast
2024-03-07 19:47:38 +00:00
ed 8ca996e2f7 as seen on codeberg 2024-02-29 21:21:41 +00:00
ed 096de50889 fix race in config reloader
nothing dangerous, just confusing log messages if an
admin hammers the reload button 100+ times per second,
or another linux process rapidly sends SIGUSR1
2024-02-28 20:08:20 +00:00
ed bec3fee9ee idp(#62): add unfinished docker-compose attempts 2024-02-27 02:01:06 +00:00
ed 8413ed6d1f add toggle to disable autoplay on page load 2024-02-26 23:51:46 +00:00
ed 055302b5be faq: repairing firefox certstore corruption 2024-02-26 22:31:28 +00:00
ed 8016e6711b md-sandbox: fix css url rewriter; closes #74
`@import url(https://...)` would get rewritten to baseURL + https://...

also reorder the generated csstext so that @imports appear first;
necessary for stuff like googlefonts to take effect
2024-02-26 22:13:40 +00:00
ed c8ea4066b1 less confusing explanation hopefully 2024-02-25 04:43:32 +00:00
ed 6cc7101d31 custom-fonts: add config file example (#74) 2024-02-25 00:15:57 +00:00
ed 263adec70a add support for custom fonts; closes #74 2024-02-24 23:30:17 +00:00
ed ac96fd9c96 get rid of brotli due to poor support; closes #73
some reverse-proxies expect plaintext replies, and
we don't have a brotli decompressor to satisfy this

additionally, because brotli is https-gated (thx google),
it was already an impractical mess anyways

the sfx is now 7 KiB larger
2024-02-24 22:24:44 +00:00
ed e5582605cd fix md-editor preview on small screens;
the left side of the preview pane would go off-screen
2024-02-24 21:22:55 +00:00
ed 1b52ef1f8a Merge branch 'hovudstraum' into idp 2024-02-23 22:25:48 +00:00
ed 503face974 update pkgs to 1.10.2 2024-02-21 21:58:46 +00:00
ed 13e77777d7 v1.10.2 2024-02-21 21:32:11 +00:00
ed 89c6c2e0d9 "upload only" icon on write-only folders 2024-02-21 20:57:18 +00:00
ed 14af136fcd force generic "folder" icon when image-thumbs are disabled
fixes the "unk" that would be shown if a subfolder contains images
2024-02-21 19:19:30 +00:00
ed d39a99c929 add trailing empty line to jinja templates;
jinja strips the trailing newline which makes the
responses annoying to parse in bulk
2024-02-21 18:51:10 +00:00
ed 43ee6b9f5b stop cloudflare from jumbling up png/svg icons;
chrome crashes if there's more than 2000 unique SVGs on one page, so
there was serverside useragent-sniffing to determine if the icon should
be an svg or a raster

however since the useragent is not in our vary, cloudflare wouldn't see
the difference and cache everything equally, meaning most folders would
display a random mix of png and svg thumbnails

move browser detection to the clientside to ensure unique URLs
2024-02-21 18:44:56 +00:00
ed 8a38101e48 return icon that says 403/404 if file inaccessible 2024-02-21 08:39:23 +00:00
ed 5026b21226 gridview: uncropped tall pics are tall + more granular zoom 2024-02-21 08:27:03 +00:00
ed d07859e8e6 fix a handful of tftp crashes:
* if a nic was restarted mid-transfer, the server could crash
  * this workaround will probably fix a bunch of similar issues too

* fix resource leak if dualstack fails the ipv4 bind
2024-02-21 00:06:47 +00:00
ed df7219d3b6 cropping folder icons is dumb 2024-02-19 19:42:39 +00:00
ed ad9be54f55 update pkgs to 1.10.1 2024-02-18 16:17:28 +00:00
ed eeecc50757 v1.10.1 2024-02-18 15:54:38 +00:00
ed 8ff7094e4d fix sharex config example 2024-02-18 15:44:54 +00:00
ed 58ae38c613 enforce thumbnail config serverside 2024-02-18 15:36:59 +00:00
ed 7f1c992601 prevent scrolling while gallery is open +
firefox52/winxp: fix gridview margins
2024-02-18 14:50:59 +00:00
ed fbfdd8338b respect prefers-reduced-motion some more places 2024-02-18 14:11:48 +00:00
ed bbc379906a jump to last viewed pic on viewer close 2024-02-18 14:11:01 +00:00
ed 33f41f3e61 add hi-res thumbs (togglebtn/servercfg) 2024-02-18 13:04:22 +00:00
ed 655f6d00f8 faster tagscanning of zerobyte files 2024-02-17 23:24:31 +00:00
ed fd552842d4 fix other possible division-by-zeros;
u2c: also fix exe detection
2024-02-17 23:19:11 +00:00
ed 6bd087ddc5 fix #72 (error deleting zerobyte files if db disabled) 2024-02-17 22:59:56 +00:00
ed 0504b010a1 tftp: support ipv6 and utf-8 filenames + ...
* fix winexe
* missing newline after dirlist
* optimizations
2024-02-17 21:31:58 +00:00
ed 39cc92d4bc update pkgs to 1.10.0 2024-02-15 00:56:37 +00:00
ed a0da0122b9 v1.10.0 2024-02-15 00:00:41 +00:00
ed 879e83e24f ignore easymde errors
it randomly throws when clicking inside the preview pane
2024-02-14 23:26:06 +00:00
ed 64ad585318 ie11: file selection hotkeys 2024-02-14 23:08:32 +00:00
ed f262aee800 change folders to preload music when necessary:
on phones especially, hitting the end of a folder while playing music
could permanently stop audio playback, because the browser will
revoke playback privileges unless we have a song ready to go...
there's no time to navigate through folders looking for the next file

the preloader will now start jumping through folders ahead of time
2024-02-14 22:44:33 +00:00
ed d4da386172 add watchdog for sqlite deadlock on db init:
some cifs servers cause sqlite to fail in interesting ways; any attempt
to create a table can instantly throw an exception, which results in a
zerobyte database being created. During the next startup, the db would
be determined to be corrupted, and up2k would invoke _backup_db before
deleting and recreating it -- except that sqlite's connection.backup()
will hang indefinitely and deadlock up2k

add a watchdog which fires if it takes longer than 1 minute to open the
database, printing a big warning that the filesystem probably does not
support locking or is otherwise sqlite-incompatible, then writing a
stacktrace of all threads to a textfile in the config directory
(in case this deadlock is due to something completely different),
before finally crashing spectacularly

additionally, delete the database if the creation fails, which should
prevents the deadlock on the next startup, so combine that with a
message hinting at the filesystem incompatibility

the 1-minute limit may sound excessively gracious, but considering what
some of the copyparty instances out there is running on, really isn't

this was reported when connecting to a cifs server running alpine

thx to abex on discord for the detailed bug report!
2024-02-14 20:18:36 +00:00
ed 5d92f4df49 mention why -j0 can be a bad idea to enable,
and that `--hist` can also help for loading thumbnails faster
2024-02-13 19:47:42 +00:00
ed 6f8a588c4d up2k: fix a mostly-harmless race
as each chunk is written to the file, httpcli calls
up2k.confirm_chunk to register the chunk as completed, and the reply
indicates whether that was the final outstanding chunk, in which case
httpcli closes the file descriptors since there's nothing more to write

the issue is that the final chunk is registered as completed before the
file descriptors are closed, meaning there could be writes that haven't
finished flushing to disk yet

if the client decides to issue another handshake during this window,
up2k sees that all chunks are complete and calls up2k.finish_upload
even as some threads might still be flushing the final writes to disk

so the conditions to hit this bug were as follows (all must be true):
* multiprocessing is disabled
* there is a reverse-proxy
* a client has several idle connections and reuses one of those
* the server's filesystem is EXTREMELY slow, to the point where
   closing a file takes over 30 seconds

the fix is to stop handshakes from being processed while a file is
being closed, which is unfortunately a small bottleneck in that it
prohibits initiating another upload while one is being finalized, but
the required complexity to handle this better is probably not worth it
(a separate mutex for each upload session or something like that)

this issue is mostly harmless, partially because it is super tricky to
hit (only aware of it happening synthetically), and because there is
usually no harmful consequences; the worst-case is if this were to
happen exactly as the server OS decides to crash, which would make the
file appear to be fully uploaded even though it's missing some data
(all extremely unlikely, but not impossible)

there is no performance impact; if anything it should now accept
new tcp connections slightly faster thanks to more granular locking
2024-02-13 19:24:06 +00:00
ed 7c8e368721 lol markdown 2024-02-12 06:01:09 +01:00
ed f7a43a8e46 fix grid layout on first toggle from listview 2024-02-12 05:40:18 +01:00
ed 02879713a2 tftp: update readme + small py2 fix 2024-02-12 05:39:54 +01:00
ed acbb8267e1 tftp: add directory listing 2024-02-10 23:50:17 +00:00
ed 8796c09f56 add --tftp-pr to specify portrange instead of ephemerals 2024-02-10 21:45:57 +00:00
ed d636316a19 add tftp server 2024-02-10 18:37:21 +00:00
ed a96d9ac6cb idp: users can be in multiple groups 2024-02-08 20:25:32 +00:00
ed 643e222986 Merge branch 'hovudstraum' into idp 2024-02-08 19:22:00 +00:00
ed ed524d84bb /np: exclude uploader ip and trim dot-prefix 2024-02-07 23:02:47 +00:00
ed f0cdd9f25d upgrade copyparty.exe to python 3.11.8 2024-02-07 20:39:51 +00:00
ed 4e797a7156 docker: mention debian issue from discord 2024-02-05 20:11:04 +00:00
ed 136c0fdc2b detect reverse-proxies stripping URL params:
if a reverseproxy decides to strip away URL parameters, show an
appropriate error-toast instead of silently entering a bad state

someone on discord ended up in an infinite page-reload loop
since the js would try to recover by fully navigating to the
requested dir if `?ls` failed, which wouldn't do any good anyways
if the dir in question is the initial dir to display
2024-02-05 19:17:36 +00:00
ed 35165f8472 Merge branch 'hovudstraum' into idp 2024-02-03 19:14:49 +00:00
ed cab999978e update pkgs to 1.9.31 2024-02-03 16:02:59 +00:00
ed fabeebd96b v1.9.31 2024-02-03 15:33:11 +00:00
ed b1cf588452 add lore 2024-02-03 15:05:27 +00:00
ed c354a38b4c up2k: warn about browser cap on num connections 2024-02-02 23:46:00 +00:00
ed a17c267d87 bbox: unload pics/vids from DOM; closes #71
videos unloaded correctly when switching between files, but not when
closing the lightbox while playing a video and then clicking another

now, only media within the preload window (+/- 2 from current file)
is kept loaded into DOM, everything else gets ejected, both on
navigation and when closing the lightbox
2024-02-02 23:16:50 +00:00
ed c1180d6f9c up2k: include inflight bytes in eta calculation;
much more accurate total-ETA when uploading with many connections
and/or uploading huge files to really slow servers

the titlebar % still only does actually confirmed bytes,
partially because that makes sense, partially because
that's what happened by accident
2024-02-02 22:46:24 +00:00
ed d3db6d296f disable mkdir and new-doc buttons if no name is provided
also fixes toast.hide() unintentionally stopping events from bubbling
2024-02-01 21:41:48 +00:00
ed caf7e93f5e IdP (#62): add groups + dynamic vols (non-persistent)
features which should be good to go:
* user groups
* assigning permissions by group
* dynamically created volumes based on username/groupname
* rebuild vfs when new users/groups appear

but several important features still pending;
* detect dangerous configurations
   * dynamic vol below readable path
* remember volumes created during previous runs
   * helps prevent unintended access
   * correct filesystem-scan on startup
2024-01-30 19:13:42 +01:00
ed eefa0518db change FFmpeg from BtbN to gyan/codex;
deps are more up-to-date and slightly better codec selection
2024-01-28 22:04:01 +00:00
ed 945170e271 fix umod/touching zerobyte files 2024-01-27 20:26:27 +00:00
ed 6c2c6090dc notes: hardlink/symlink conversion + phone cam sync 2024-01-27 18:52:08 +00:00
ed b2e233403d u2c: apply exclude-filter to deletion too
if a file gets synced and you later add an exclude-filter for it,
delete the file from the server as if it doesn't exist locally
2024-01-27 18:49:25 +00:00
ed e397ec2e48 update pkgs to 1.9.30 2024-01-25 23:18:21 +00:00
ed fade751a3e v1.9.30 2024-01-25 22:52:42 +00:00
ed 0f386c4b08 also sanitize histpaths in client error messages;
previously it only did volume abspaths
2024-01-25 21:40:41 +00:00
ed 14bccbe45f backports from IdP branch:
* allow mounting `/` (the entire filesystem) as a volume
  * not that you should (really, you shouldn't)
* improve `-v` helptext
* change IdP group symbol to @ because % is used for file inclusion
  * not technically necessary but is less confusing in docs
2024-01-25 21:39:30 +00:00
ed 55eb692134 up2k: add option to touch existing files to match local 2024-01-24 20:36:41 +00:00
ed b32d65207b fix js-error on older chromes in incognito mode;
window.localStorage was null, so trying to read would fail

seen on falkon 23.08.4 with qtwebengine 5.15.12 (fedora39)

might as well be paranoid about the other failure modes too
(sudden exceptions on reads and/or writes)
2024-01-24 02:24:27 +00:00
ed 64cac003d8 add missing historic changelog entries 2024-01-24 01:28:29 +00:00
ed 6dbfcddcda don't print indexing progress to stdout if -q 2024-01-20 17:26:52 +00:00
ed b4e0a34193 ensure windows-safe filenames during batch rename
also handle ctrl-click in the navpane float
2024-01-19 21:41:56 +00:00
ed 01c82b54a7 audio player: add shuffle 2024-01-18 22:59:47 +00:00
ed 4ef3106009 more old-browser support:
* polyfill Set() for gridview (ie9, ie10)
* navpane: do full-page nav if history api is ng (ie9)
* show markdown as plaintext if rendering fails (ie*)
* text-editor: hide preview pane if it doesn't work (ie*)
* explicitly hide toasts on close (ie9, ff10)
2024-01-18 22:56:39 +00:00
ed aa3a971961 windows: safeguard against parallel deletes
st_ino is valid for NTFS on python3, good enough
2024-01-17 23:32:37 +00:00
ed b9d0c8536b avoid sendfile bugs on 32bit machines:
https://github.com/python/cpython/issues/114077
2024-01-17 20:56:44 +00:00
ed 3313503ea5 retry deleting busy files on windows:
some clients (clonezilla-webdav) rapidly create and delete files;
this fails if copyparty is still hashing the file (usually the case)

and the same thing can probably happen due to antivirus etc

add global-option --rm-retry (volflag rm_retry) specifying
for how long (and how quickly) to keep retrying the deletion

default: retry for 5sec on windows, 0sec (disabled) on everything else
because this is only a problem on windows
2024-01-17 20:27:53 +00:00
ed d999d3a921 update pkgs to 1.9.29 2024-01-14 07:03:47 +00:00
ed e7d00bae39 v1.9.29 2024-01-14 06:29:31 +00:00
ed 650e41c717 update deps:
* web: hashwasm 4.9 -> 4.10
* web: dompurify 3.0.5 -> 3.0.8
* web: codemirror 5.65.12 -> 5.65.16
* win10exe: pillow 10.1 -> 10.2
2024-01-14 05:57:28 +00:00
ed 140f6e0389 add contextlet + igloo irc config + upd changelog 2024-01-14 04:58:24 +00:00
ed 5e111ba5ee only show the unpost hint if unpost is available (-e2d) 2024-01-14 04:24:32 +00:00
ed 95a599961e add RAM usage tracking to thumbnailer;
prevents server OOM from high RAM usage by FFmpeg when generating
spectrograms and waveforms: https://trac.ffmpeg.org/ticket/10797
2024-01-14 04:15:09 +00:00
ed a55e0d6eb8 add button to bust music player cache,
useful on phones when the server was OOM'ing and
butchering the responses (foreshadowing...)
2024-01-13 04:08:40 +00:00
ed 2fd2c6b948 ie11 fixes (2024? haha no way dude it's like 2004 right)
* fix crash on keyboard input in modals
* text editor works again (but without markdown preview)
* keyboard hotkeys for the few features that actually work
2024-01-13 02:31:50 +00:00
ed 7a936ea01e js: be careful with allocations in crash handler 2024-01-13 01:22:20 +00:00
ed 226c7c3045 fix confusing behavior when reindexing files:
when a file was reindexed (due to a change in size or last-modified
timestamp) the uploader-IP would get removed, but the upload timestamp
was ported over. This was intentional so there was probably a reason...

new behavior is to keep both uploader-IP and upload timestamp if the
file contents are unchanged (determined by comparing warks), and to
discard both uploader-IP and upload timestamp if that is not the case
2024-01-13 00:18:46 +00:00
ed a4239a466b immediately perform search if a checkbox is toggled 2024-01-12 00:20:38 +01:00
ed d0eb014c38 improve applefilters + add missing newline in curl 404
* webdav: extend applesan regex with more stuff to exclude
* on macos, set applesan as default `--no-idx` to avoid indexing them
   (they didn't show up in search since they're dotfiles, but still)
2024-01-12 00:13:35 +01:00
ed e01ba8552a warn if a user doesn't have privileges anywhere
(since the account system isn't super-inutitive and at least
 one dude figured that -a would default to giving admin rights)
2024-01-11 00:24:34 +00:00
ed 024303592a improved logging when a client dies mid-POST;
igloo irc has an absolute time limit of 2 minutes before it just
disconnects mid-upload and that kinda looked like it had a buggy
multipart generator instead of just being funny

anticipating similar events in the future, also log the
client-selected boundary value to eyeball its yoloness
2024-01-10 23:59:43 +00:00
ed 86419b8f47 suboptimizations and some future safeguards 2024-01-10 23:20:42 +01:00
ed f1358dbaba use scandir for volume smoketests during up2k init;
gives much faster startup on filesystems that are extremely slow
(TLNote: android sdcardfs)
2024-01-09 21:47:02 +01:00
ed e8a653ca0c don't block non-up2k uploads during indexing;
due to all upload APIs invoking up2k.hash_file to index uploads,
the uploads could block during a rescan for a crazy long time
(past most gateway timeouts); now this is mostly fire-and-forget

"mostly" because this also adds a conditional slowdown to
help the hasher churn through if the queue gets too big

worst case, if the server is restarted before it catches up, this
would rely on filesystem reindexing to eventually index the files
after a restart or on a schedule, meaning uploader info would be
lost on shutdown, but this is usually fine anyways (and this was
also the case until now)
2024-01-08 22:10:16 +00:00
ed 9bc09ce949 accept file POSTs without specifying the act field;
primarily to support uploading from Igloo IRC but also generally useful
(not actually tested with Igloo IRC yet because it's a paid feature
so just gonna wait for spiky to wake up and tell me it didn't work)
2024-01-08 19:09:53 +00:00
ed dc8e621d7c increase OOM kill-score for FFmpeg and mtp's;
discourage Linux from killing innocent processes
when FFmpeg decides to allocate 1 TiB of RAM
2024-01-07 17:52:10 +00:00
ed dee0950f74 misc;
* scripts: add log repacker
* bench/filehash: msys support + add more stats
2024-01-06 01:15:43 +00:00
ed 143f72fe36 bench/filehash: fix locale + add more stats 2024-01-03 02:41:18 +01:00
ed a7889fb6a2 update pkgs to 1.9.28 2023-12-31 19:44:24 +00:00
ed 987caec15d v1.9.28 2023-12-31 18:49:42 +00:00
ed ab40ff5051 add permission "A" (alias of "rwmda."); closes #70 2023-12-31 18:20:24 +00:00
ed bed133d3dd pad log source when logging to file too 2023-12-31 17:21:02 +00:00
ed 829c8fca96 curl/CLI-friendly 403/404 2023-12-31 17:20:45 +00:00
ed 5b26ab0096 add option to specify default num parallel uploads 2023-12-28 01:41:17 +01:00
ed 39554b4bc3 guard against unintended access if user-db is corrupted 2023-12-24 16:12:18 +01:00
ed 97d9c149f1 IdP config draft (#62) 2023-12-24 13:46:26 +01:00
ed 59688bc8d7 * rename hdr-au-usr to idp-h-usr
* ensure lowercase idp-h-*, xff-hdr
* more macos support in tooling
2023-12-24 13:46:12 +01:00
ed a18f63895f fix resource leak on macos 2023-12-21 00:48:51 +01:00
ed 27433d6214 remove fedora/pypi-copr mention because copr has died;
https://github.com/fedora-copr/copr/issues/3056
2023-12-20 22:35:52 +00:00
ed 374c535cfa fix cors-checker so it behaves like the readme says;
any custom header (`pw` in our case) is sufficient validation
2023-12-20 20:03:08 +00:00
ed ac7815a0ae ensure file can be opened before replying 200 and...
* make gen_tree 0.1% faster
* improve filekey warning message
* fix oversight in 0c50ea1757
* support `--xdev` on windows (the python docs mention that os.scandir
   doesn't assign st_ino, st_dev and st_nlink on win but i can't read)
2023-12-20 01:07:45 +00:00
ed 10bc2d9205 unsuccessful attempt at dirkeys (#64) 2023-12-17 22:30:22 +00:00
ed 0c50ea1757 list dotfiles only for specific volumes or users (#66):
* permission `.` grants dotfile visibility if user has `r` too
* `-ed` will grant dotfiles to all `r` accounts (same as before)
* volflag `dots` likewise

also drops compatibility for pre-0.12.0 `-v` syntax
(`-v .::red` will no longer translate to `-v .::r,ed`)
2023-12-16 15:38:48 +00:00
ed c057c5e8e8 extend --th-covers with dotfiles; closes #67 2023-12-14 10:53:15 +00:00
ed 46d667716e support python 3.15 2023-12-14 10:49:10 +00:00
ed cba2e10d29 cleanup 2023-12-14 10:47:52 +00:00
ed b1693f95cb alternative fedora packages for when copr breaks 2023-12-09 02:05:06 +00:00
ed 3f00073256 update pkgs to 1.9.27 2023-12-08 21:58:59 +00:00
ed d15000062d v1.9.27 2023-12-08 21:33:12 +00:00
ed 6cb3b35a54 fix #65 (symlinks die when moved) 2023-12-08 21:28:20 +00:00
ed b4031e8d43 forgot to bump this... oh well, at least the exe is correct 2023-12-08 02:16:40 +00:00
ed a3ca0638cb update pkgs to 1.9.26 2023-12-08 02:10:06 +00:00
ed a360ac29da v1.9.26 2023-12-08 01:36:01 +00:00
ed 9672b8c9b3 ensure nested symlinks are not broken during deletes;
when moving/deleting a file, all symlinked dupes are verified to ensure
this action does not break any symlinks, however it did this by checking
the realpath of each link. This was not good enough, since the deleted
file may be a part of a series of nested symlinks

this situation occurs because the deduper tries to keep relative
symlinks as close as possible, only traversing into parent/sibling
folders as required, which can lead to several levels of nested links
2023-12-08 01:11:03 +00:00
ed e70ecd98ef don't freak out when deleting a broken symlink,
also invoke the hooks with the corret lastmod time
2023-12-08 01:01:10 +00:00
ed 5f7ce78d7f avoid duplicate database entries when replacing files,
either from --daw, or by using u2c with --dr
2023-12-08 01:00:01 +00:00
ed 2077dca66f u2c: when deleting from server, heed request size limit 2023-12-08 00:54:57 +00:00
ed 91f010290c improve --help descriptions 2023-12-03 02:35:38 +00:00
ed 395e3386b7 mention --help for features not documented in readme
plus some small fixes to the packaging section
2023-12-02 23:32:31 +00:00
ed a1dce0f24e update pkgs to 1.9.25 2023-12-01 23:51:35 +00:00
ed c7770904e6 v1.9.25 2023-12-01 23:26:16 +00:00
ed 1690889ed8 remember scroll position when leaving the textfile viewer 2023-12-01 23:15:48 +00:00
ed 842817d9e3 improve handling of malicious clients;
* start banning malicious clients according to --ban-422
* reply with a blank 500 to stop firefox from retrying like 20 times
* allow Cc's in a few specific URL params (filenames, dirnames)
2023-12-01 23:08:16 +00:00
ed 5fc04152bd also handle NumpadEnter 2023-12-01 21:10:51 +00:00
ed 1be85bdb26 fix modal focus even more (now works on phones too) 2023-12-01 21:02:05 +00:00
ed 2eafaa88a2 update pkgs to 1.9.24 2023-12-01 02:16:24 +00:00
ed 900cc463c3 v1.9.24 2023-12-01 02:10:20 +00:00
ed 97b999c463 update pkgs to 1.9.23 2023-12-01 01:54:23 +00:00
ed a7cef91b8b v1.9.23 2023-12-01 00:39:49 +00:00
ed a4a112c0ee update pkgs to 1.9.22 2023-12-01 01:14:18 +00:00
ed e6bcee28d6 v1.9.22 2023-12-01 00:31:02 +00:00
ed 626b5770a5 add --ftp-ipa 2023-11-30 23:36:46 +00:00
ed c2f92cacc1 mention the new auth feature 2023-11-30 23:01:05 +00:00
ed 4f8a1f5f6a allow free text selection in modals by deferring focus 2023-11-30 22:41:16 +00:00
ed 4a98b73915 fix a bug previouly concealed by window.event;
hitting enter would clear out an entire chain of modals,
because the event didn't get consumed like it should,
so let's make double sure that will be the case
2023-11-30 22:40:30 +00:00
ed 00812cb1da new option --ipa; client IP allowlist:
connections from outside the specified list of IP prefixes are rejected
(docker-friendly alternative to -i 127.0.0.1)

also mkdir any missing folders when logging to file
2023-11-30 20:45:43 +00:00
ed 16766e702e add basic-docker-compose (#59) 2023-11-30 20:14:38 +00:00
ed 5e932a9504 hilight metavars in help text 2023-11-30 18:19:34 +00:00
ed ccab44daf2 initial support for identity providers (#62):
add argument --hdr-au-usr which specifies a HTTP header to read
usernames from; entirely bypasses copyparty's password checks
for http/https clients (ftp/smb are unaffected)

users must exist in the copyparty config, passwords can be whatever

just the first step but already a bit useful on its own,
more to come in a few months
2023-11-30 18:18:47 +00:00
ed 8c52b88767 make linters happier 2023-11-30 17:33:07 +00:00
ed c9fd26255b support environment variables mostly everywhere,
useful for docker/systemd stuff

also makes logfiles flush to disk per line by default;
can be disabled for a small performance gain with --no-logflush
2023-11-30 10:22:52 +00:00
ed 0b9b8dbe72 systemd: get rid of nftables portforwarding;
suggest letting copyparty bind 80/443 itself because nft hard
2023-11-30 10:13:14 +00:00
ed b7723ac245 rely on filekeys for album-art over bluetooth;
will probably fail when some devices (sup iphone) stream to car stereos
but at least passwords won't end up somewhere unexpected this way
(plus, the js no longer uses the jank url to request waveforms)
2023-11-29 23:20:59 +00:00
ed 35b75c3db1 avoid palemoon bug on dragging a text selection;
"permission denied to access property preventDefault"
2023-11-26 20:22:59 +00:00
ed f902779050 avoid potential dom confusion (ie8 is already no-js) 2023-11-26 20:08:52 +00:00
ed fdddd36a5d update pkgs to 1.9.21 2023-11-25 14:48:41 +00:00
ed c4ba123779 v1.9.21 2023-11-25 14:17:58 +00:00
ed 72e355eb2c prisonparty: prevent overlapping setup/teardown 2023-11-25 14:03:41 +00:00
ed 43d409a5d9 prisonparty accepts user/group names 2023-11-25 13:40:21 +00:00
ed b1fffc2246 open textfiles inline in grid-view, closes #63;
also fix the Y hotkey (which converts all links in the list-view into
download links), making that apply to the grid-view as well
2023-11-25 13:09:12 +00:00
ed edd3e53ab3 prisonparty: support zfs-ubuntu
* when bind-mounting, resolve any symlinks ($v/) and read target inode;
   for example merged /bin and /usr/bin
* add failsafe in case this test should break in new exciting ways;
   inspect `mount` for any instances of the jailed path
   (not /proc/mounts since that has funny space encoding)
* unmount in a while-loop because xargs freaks out if one of them fail
   * and systemd doesn't give us a /dev/stderr to write to anyways
2023-11-25 02:16:48 +00:00
ed aa0b119031 update pkgs to 1.9.20 2023-11-21 23:44:56 +00:00
ed eddce00765 v1.9.20 2023-11-21 23:25:41 +00:00
ed 6f4bde2111 fix infinite backspin on "previous track";
when playing the first track in a folder and hitting the previous track
button, it would keep switching through the previous folders inifinitely
2023-11-21 23:23:51 +00:00
ed f3035e8869 clear load-more buttons upon navigation (thx icxes) 2023-11-21 22:53:46 +00:00
ed a9730499c0 don't suggest loading more search results beyond server cap 2023-11-21 22:38:35 +00:00
ed b66843efe2 reduce cpu priority of ffmpeg, hooks, parsers 2023-11-21 22:21:33 +00:00
ed cc1aaea300 update pkgs to 1.9.19 2023-11-19 12:45:32 +00:00
ed 9ccc238799 v1.9.19 2023-11-19 12:29:19 +00:00
ed 8526ef9368 srch-dbg: handle jumpvols correctly 2023-11-19 11:35:13 +00:00
ed 3c36727d07 fix filekeys not appearing in up2k in world-writable vols 2023-11-19 11:19:08 +00:00
ed ef33ce94cd filter shadowed files from search results (#61),
also adds optimization to stop opening cursors
when max results has already been hit
2023-11-19 11:04:36 +00:00
ed d500baf5c5 update pkgs to 1.9.18 2023-11-18 21:16:10 +00:00
ed deef32335e v1.9.18 2023-11-18 21:06:55 +00:00
ed fc4b51ad00 make dhash more volatile; probably fixes #61:
if any volumes were added or removed since last use,
drop dhash to verify that there are no files to shadow
2023-11-18 20:48:56 +00:00
ed fa762754bf fix close/more thumbs in search results for pillow 10.x 2023-11-18 13:57:35 +00:00
ed 29bd8f57c4 fix js error when ctrl-clicking a search result; closes #60 2023-11-18 13:47:00 +00:00
ed abc37354ef update pkgs to 1.9.17 2023-11-11 18:22:51 +00:00
ed ee3333362f v1.9.17 2023-11-11 17:38:43 +00:00
ed 7c0c6b94a3 drop asyncore; pyftpdlib has vendored it 2023-11-11 17:20:00 +00:00
ed bac733113c up2k-hasher robustness:
webdav clients tend to upload and then immediately delete
files to test for write-access and available disk space,
so don't crash and burn when that happens
2023-11-11 16:21:54 +00:00
ed 32ab65d7cb add cfssl to packaging + improve certgen expiration check 2023-11-11 15:30:03 +00:00
ed c6744dc483 u2c: configurable retry delay 2023-11-11 14:46:00 +00:00
ed b9997d677d u2c: give up on files with bitflips 2023-11-11 14:30:46 +00:00
ed 10defe6aef u2c: make -x case-insensitive 2023-11-11 14:02:01 +00:00
ed 736aa125a8 fix dumb 2023-11-11 13:52:06 +00:00
ed eb48373b8b mention fpm 2023-11-08 00:55:16 +00:00
ed d4a7b7d84d add contribution ideas 2023-11-06 15:33:29 +00:00
ed 2923a38b87 update pkgs to 1.9.16 2023-11-04 23:30:07 +00:00
ed dabdaaee33 v1.9.16 2023-11-04 21:58:01 +00:00
ed 65e4d67c3e mkdir with leading slash works as expected 2023-11-04 22:21:56 +00:00
ed 4b720f4150 add more prometheus metrics; breaking changes:
* cpp_uptime is now a gauge
* cpp_bans is now cpp_active_bans (and also a gauge)

and other related fixes:
* stop emitting invalid cpp_disk_size/free for offline volumes
* support overriding the spec-mandatory mimetype with ?mime=foo
2023-11-04 20:32:34 +00:00
ed 2e85a25614 improve service listing 2023-11-04 10:23:37 +00:00
ed 713fffcb8e also mkdir missing intermediates,
unless requester is a webdav client (those expect a 409)
2023-11-03 23:23:49 +00:00
ed 8020b11ea0 improve/simplify validation/errorhandling:
* some malicious requests are now answered with HTTP 422,
   so that they count against --ban-422
* do not include request headers when replying to invalid requests,
   in case there is a reverse-proxy inserting something interesting
2023-11-03 23:07:16 +00:00
ed 2523d76756 windows: fix symlinks 2023-11-03 17:16:12 +00:00
ed 7ede509973 nginx: reduce cost of spurious connectivity loss;
default value of fail_timeout (10sec) makes server unavailable for that
amount of time, even if the server is just down for a quick restart
2023-11-03 17:13:11 +00:00
ed 7c1d97af3b slightly better pyinstaller loader 2023-11-03 17:09:34 +00:00
ed 95566e8388 cosmetics:
* fix toast/tooltip colors on splashpage
* properly warn if --ah-cli or --ah-gen is used without --ah-alg
* support ^D during --ah-cli
* improve flavor texts
2023-11-03 16:52:43 +00:00
ed 76afb62b7b make each segment of links separately selectable 2023-10-25 12:21:39 +00:00
ed 7dec922c70 update pkgs to 1.9.15 2023-10-24 16:56:57 +00:00
ed c07e0110f8 v1.9.15 2023-10-24 16:43:26 +00:00
ed 2808734047 drc: further reduce volume skip between songs 2023-10-24 16:38:29 +00:00
ed 1f75314463 placeholder expansion in readme and logues; closes #56
also fixes the "scan" volflag which broke in v1.9.14
2023-10-24 16:37:32 +00:00
ed 063fa3efde drc: fix volume jump on song change
(in exchange for a chance of clipping, which should be fine because
all browsers appear to have a limiter on the output anyways)
2023-10-23 09:05:31 +00:00
ed 44693d79ec update pkgs to 1.9.14 2023-10-21 14:52:22 +00:00
ed cea746377e v1.9.14 2023-10-21 14:43:11 +00:00
ed 59a98bd2b5 update pkgs to 1.9.13 2023-10-21 13:34:50 +00:00
ed 250aa28185 v1.9.13 2023-10-21 13:14:41 +00:00
ed 5280792cd7 list existing tags even if tagscanning is disabled 2023-10-21 13:09:37 +00:00
ed 2529aa151d tersen volume listing on startup 2023-10-21 12:11:49 +00:00
ed fc658e5b9e utcfromtimestamp was deprecated and nobody told me,
not even the deprecationwarning that got silently generated burning
20~30% of all CPU-time without actually displaying it anywhere, nice

python 3.12.0 is now only 5% slower than 3.11.6

also fixes some other, less-performance-fatal deprecations
2023-10-20 23:41:58 +00:00
ed a4bad62b60 add clientside DRC / dynamic range compressor 2023-10-20 20:51:00 +00:00
ed e1d78d8b23 increase timeout of unfinished uploads from 6 to 24 hours
plus make it configurable
2023-10-20 18:31:28 +00:00
ed c7f826dbbe search by upload time 2023-10-19 23:57:27 +00:00
ed 801da8079b only 404-ban accounts with permission [gGh]:
never bonk anyone with read-access (able to see directory-listing)
or write-only (not able to retrieve any files at all) due to
either --ban-404 or --ban-url

fixes accidental ban when webdav-uploading files which
match any of the --ban-url patterns (#55)

also default-enables --ban-404 since it is now generally safe
(even when up2k is in turbo mode), plus make turbo smart enough to
disengage when necessary
2023-10-18 22:14:09 +00:00
ed 7d797dba3f strip filekeys from -txt- links;
accessing the syntax hilighter using a filekey is impossible anyways
because the client expects to build its state from the folder listing
and the backend refuses to return a listing given just a filekey
2023-10-18 20:57:53 +00:00
ed cda90c285e mention lack of EINTR handling in older pytjons 2023-10-17 17:58:01 +00:00
ed 4b5a0787ab option to show upload timestamps in directory listing;
enable with -mte +.ip_at
or volflag mte=+.ip_at

worst-case performance impact: 18%
2023-10-17 17:51:27 +00:00
ed 2048b7538e update pkgs to 1.9.12 2023-10-15 20:22:15 +00:00
ed ac40dccc8f v1.9.12 2023-10-15 20:06:46 +00:00
ed 9ca8154651 prefer the new TTF in pillow 10.1 + pyinstaller 6.1 fixes 2023-10-15 18:47:34 +00:00
ed db668ba491 spectrograms are never cropped; share thumbcache 2023-10-15 11:42:57 +00:00
ed edbafd94c2 avoid iphone jank:
safari can immediately popstate when alt-tabbing back to the browser,
causing the page to load twice in parallel:

2174 log-capture ok
2295 h-repl $location
2498 h-pop $location <==
2551 sha-ok  # from initial load
2023-10-15 11:27:27 +00:00
ed 2df76eb6e1 client decides if thumbnails should be cropped or not
this carries some intentional side-effects; each thumbnail format will
now be stored in its own subfolder under .hist/th/ making cleanup more
effective (jpeg and webm are dropped separately)
2023-10-15 10:21:25 +00:00
ed 9b77c9ce7d more intuitive upload/filesearch toggle:
restore preferred mode after leaving a restricted folder
2023-10-15 09:00:57 +00:00
ed dc2b67f155 ui-button to use upload-time instead of local last-modified 2023-10-15 08:46:23 +00:00
ed 9f32e9e11d set default sort order; --sort or volflag "sort" 2023-10-14 22:17:37 +00:00
ed 7086d2a305 ie9 support 2023-10-14 10:01:03 +00:00
ed 575615ca2d slight refactor; 7% faster, 1% more maintainable 2023-10-14 09:54:49 +00:00
kipukun ;_ c0da4b09bf contrib: bump python version in rc script
the default version of Python is now 3.9 as of FreeBSD 13.2-RELEASE
2023-10-13 10:15:27 +02:00
ed 22880ccc9a update pkgs to 1.9.11 2023-10-09 00:51:41 +00:00
ed e4001550c1 v1.9.11 2023-10-09 00:36:54 +00:00
ed e9f65be86a add cachebuster for dynamically loaded js files 2023-10-09 00:22:16 +00:00
ed 3b9919a486 update pkgs to 1.9.10 2023-10-08 21:16:12 +00:00
ed acc363133f v1.9.10 2023-10-08 20:51:49 +00:00
ed 8f2d502d4d configurable printing of failed login attempts 2023-10-08 20:41:02 +00:00
ed 2ae93ad715 clear response headers for each request 2023-10-08 20:38:51 +00:00
ed bb590e364a update pkgs to 1.9.9 2023-10-07 22:49:12 +00:00
ed e7fff77735 v1.9.9 2023-10-07 22:29:37 +00:00
ed 753e3cfbaf revert 68c6794d (v1.6.2) and fix it better:
moving deduplicated files between volumes could drop some links
2023-10-07 22:25:44 +00:00
ed 99e9cba1f7 update pkgs to 1.9.8 2023-10-06 18:22:01 +00:00
ed fcc3336760 v1.9.8 2023-10-06 17:50:35 +00:00
ed 0dc3c23b42 add alternative filekey generator; closes #52 2023-10-06 13:41:22 +00:00
ed 6aa10ecedc mention streaming unzip with bsdtar 2023-10-02 07:40:40 +02:00
ed 93125bba4d update pkgs to 1.9.7 2023-09-30 23:56:35 +00:00
ed fae5a36e6f v1.9.7 2023-09-30 23:32:51 +00:00
ed fc9b729fc2 fix #51:
* handle unexpected localstorage values
* handle unsupported --lang values
2023-09-30 22:54:21 +00:00
ed 8620ae5bb7 fix column-hiding ux on phones:
table header click-handler didn't cover the entire cell so it was
easy to sort the table by accident; also do not exit hiding mode
automatically since you usually want to hide several columns
(so also adjust css to make it obvious you're in hiding mode)
2023-09-28 09:28:26 +02:00
ed 01a851da28 mtp-deps: fix building on archlinux 2023-09-24 23:17:26 +00:00
ed 309895d39d docker: exploring alternative base images for performance 2023-09-24 22:26:51 +00:00
ed 7ac0803ded update pkgs to 1.9.6 2023-09-23 12:56:47 +00:00
ed cae5ccea62 v1.9.6 2023-09-23 12:15:24 +00:00
ed 3768cb4723 add chat 2023-09-23 11:34:32 +00:00
ed 0815dce4c1 ensure indexing runs with --ign-ebind-all 2023-09-22 23:20:57 +00:00
ed a62f744a18 prevent losing an out-of-volume index
if the server is started while an external drive is not mounted,
it would drop the database because all the files are missing
2023-09-22 23:05:07 +00:00
ed 163e3fce46 improve reverse-proxy support when containerized:
the x-forwarded-for header would get rejected since the reverse-proxy
is not asking from 127.0.0.1 or ::1, so make this allowlist configurable
2023-09-22 22:39:20 +00:00
ed e76a50cb9d add indexer benchmark + bump default num cores from 4 to 5
and make the mtag deps build better on fedora
2023-09-22 20:40:52 +00:00
ed 72fc76ef48 golf / normalize window.location 2023-09-20 22:07:40 +00:00
ed c47047c30d configurable real-ip header from reverse proxy 2023-09-20 21:56:39 +00:00
ed 3b8f66c0d5 fix a client crash when uploading from glitchy net
prevent reattempting chunks / handshakes after an upload has completed
since that is both pointless and crashy

bugreport ocr'ed from deepfried pic (thx kipu):
stack: exec_handshake -> xhr.onload -> tasked -> exec_upload -> do_send

529226 crash: t.fobj is null; firefox 117, win64
529083 zombie handshake onerror, some.flac
529081 chunkpit onerror,, 1, another.flac
528933 retrying stuck handshake
498842 ^
464213 zombie handshake onload, some.flac
464208 ^
462858 ignoring dupe-segment error, some.flac
462766 ^
462751 ^
462667 ^
462403 ^
462316 ^
461321 zombie handshake onload, some.flac
461302 ^
461152 ^
461114 ^
461110 ^
460769 ^
459954 ^
459492 ignoring dupe-segment error, some.flac
2023-09-20 21:25:59 +00:00
ed aa96a1acdc misc optimizations / cleanup:
* slightly faster startup / shutdown
* forgot a jinja2 golf
* waste 4KiB changing prismjs back to gz since brotli is https-gated ;_;
* broke support for firefox<52 (non-var functions must be toplevel
   or immediately within another function), now even firefox 10 /
   centos 6 is somewhat supported again
2023-09-17 13:02:18 +00:00
ed 91cafc2511 faster startup on windows by asking for ffmpeg.exe explicitly
rather than just "ffmpeg" which makes windows try to open each of
ffmpeg.BAT,CMD,COM,EXE,JS,JSE,MSC,VBE,VBS,WSF,WSH one by one
(ffmpeg.js? hello??)
2023-09-13 23:32:19 +00:00
ed 23ca00bba8 support jython and graalpy 2023-09-13 23:24:56 +00:00
ed a75a992951 golf the sfx-gz by ~27.6 kB;
* 11 kB webdeps: brotli easymde+prism instead of zopfli
* 8 kB jinja2
* 5 kB ftp
* 3 kB improve uncommenter
2023-09-13 23:21:22 +00:00
ed 4fbd6853f4 add msg-log.py initially by @clach04, closes #35 2023-09-12 19:56:05 +00:00
ed 71c3ad63b3 fix tests 2023-09-11 01:46:25 +00:00
ed e1324e37a5 update pkgs to 1.9.5 2023-09-09 14:15:46 +00:00
ed a996a09bba v1.9.5 2023-09-09 13:36:56 +00:00
ed 18c763ac08 smb: upgrade to impacket 0.11, full user account support,
permissions are now per-account instead of coalescing

also stops windows from freaking out if there's an offline volume
2023-09-09 12:46:37 +00:00
ed 3d9fb753ba stuff 2023-09-08 21:42:05 +00:00
ed 714fd1811a add option to generate pax-format tar archives
and forgot to commit the nix module
2023-09-08 21:13:23 +00:00
ed 4364581705 fix accidental 422-ban when uploading lots of dupes 2023-09-08 19:49:29 +00:00
ed ba02c9cc12 readme fix + make hacker theme more hacker 2023-09-08 19:35:12 +00:00
ed 11eefaf968 create / edit non-markdown textfiles (if user has delete-access)
also enables the ansi escape code parser if the text looks like ansi
2023-09-08 18:47:31 +00:00
ed 5a968f9e47 add permission 'h': folders redirect to index.html;
safest way to make copyparty like a general-purpose webserver where
index.html is returned as expected yet directory listing is entirely
disabled / unavailable
2023-09-07 23:30:01 +00:00
ed 6420c4bd03 up to 2.6x faster download-as-zip
when there's lots of files, and especially small ones
and also reduces cpu load by at least 15%
2023-09-05 22:57:03 +00:00
ed 0f9877201b support cache directives in --css-browser, --js-browser;
for example --css-browser=/the.css?cache=600 (seconds)
or --js-browser=/.res/the.js?cache=i (7 days)
2023-09-03 19:50:31 +00:00
ed 9ba2dec9b2 lightbox: fix ccw rotation hotkey 2023-09-03 19:23:29 +00:00
ed ae9cfea939 update pkgs to 1.9.4 2023-09-02 00:45:57 +00:00
ed cadaeeeace v1.9.4 2023-09-02 00:18:53 +00:00
ed 767696185b add ?tar=gz, ?tar=bz2, ?tar=xz with optional level;
defaults are ?tar=gz:3, ?tar=bz2:9, ?tar=xz:1
2023-09-01 23:44:10 +00:00
ed c1efd227b7 fix inconsistent use of symlink mtimes in database;
on upload, dupes are by default handled by symlinking to the existing
copy on disk, writing the uploader's local mtime into the symlink mtime,
which is also what gets indexed in the db

this worked as intended, however during an -e2dsa rescan on startup the
symlink destination timestamps would be used instead, causing a reindex
and the resulting loss of uploader metadata (ip, timestamp)

will now always use the symlink's mtime;
worst-case 1% slower startup (no dhash)

this change will cause a reindex of incorrectly indexed files, however
as this has already happened at least once due to the bug being fixed,
there will be no additional loss of metadata
2023-09-01 20:29:55 +00:00
ed a50d0563c3 instantly perform search when URL contains a raw query 2023-09-01 20:16:19 +00:00
ed e5641ddd16 update pkgs to 1.9.3 2023-08-31 23:08:32 +00:00
ed 700111ffeb v1.9.3 2023-08-31 22:11:31 +00:00
ed b8adeb824a misc http correctness;
some of this looks shady af but appears to have been harmless
(decent amount of testing came out ok)

* some location normalization happened before unquoting; however vfs
   handled this correctly so the outcome was just confusing messages
* some url parameters were double-decoded (unpost filter, move
   destinations), causing some operations to fail unexpectedly
* invalid cache-control headers could be generated,
   but not in a maliciously-beneficial way
   (there are safeguards stripping newlines and control-characters)

also adds an exception-message cleanup step to strip away the
filesystem path that copyparty's python files are located at,
in case that could be interesting knowledge
2023-08-31 21:51:58 +00:00
ed 30cc9defcb cosmetics:
* in case someone gets a confusing access-related error message,
  include more context in serverlogs (exact path)
* fix js console spam in search results
* same markdown line-height in viewer and browser
2023-08-31 21:27:14 +00:00
ed 61875bd773 slightly reduce flickering during page load on chrome 2023-08-31 20:02:33 +00:00
ed 30905c6f5d add convenient debugs in case the fight is not over 2023-08-31 20:00:14 +00:00
ed 9986136dfb apple/ios/iphone: maybe fix background album playback
good news: apple finally added support for samplerates other than
44100 for AudioContext, meaning it would now have been possible to
set non-100% volume for audio files including opus files

bad news: apple broke AudioContext in a way that makes it bug out
mediaSessions, causing lockscreen controls to become mostly useless

bad news: apple broke AudioContext additionally where it randomly
causes playback issues, blocking playback of audio files, even if
the AudioContext is sitting idle doing nothing (which is a
requirement for reliable upload speeds on other platforms)

disable AudioContext on iOS
2023-08-31 19:57:05 +00:00
ed 1c0d978979 ios/iphone: autoreplace smart-quotes with sane quotes,
as the iphone keyboard is not able to produce ' or "
2023-08-31 19:29:37 +00:00
ed 0a0364e9f8 FTPd: fix py3.12 support; workaround until next release:
run sfx twice with PYTHONPATH=/tmp/pe-copyparty.$(id -u)/copyparty/vend
2023-08-28 00:25:33 +00:00
ed 3376fbde1a update pkgs to 1.9.2 2023-08-26 22:09:43 +00:00
ed ac21fa7782 v1.9.2 2023-08-26 21:16:30 +00:00
ed c1c8dc5e82 ok lets try that again 2023-08-26 19:07:23 +00:00
ed 5a38311481 mark offline volumes in directory tree sidebar 2023-08-26 19:00:46 +00:00
ed 9f8edb7f32 make markdown slightly safer without the nohtml volflag
by running dompurify after marked.parse if plugins are not enabled;
adds no protection against the more practical approach of just
putting a malicious <script> in an html file and uploading that,
but one footgun less is one less footgun
2023-08-26 17:37:02 +00:00
ed c5a6ac8417 persist dotfile preference as cookie for initial listing 2023-08-26 15:50:57 +00:00
ed 50e01d6904 add more autoban triggers:
* --ban-url: URLs which 404 and also match --sus-urls (bot-scan)
* --ban-403: trying to access volumes that dont exist or require auth
* --ban-422: invalid POST messages, fuzzing and such
* --nonsus-urls: regex of 404s which  shouldn't trigger --ban-404

in may situations it makes sense to handle this logic inside copyparty,
since stuff like cloudflare and running copyparty on another physical
box than the nginx frontend is on becomes fairly clunky
2023-08-26 13:52:24 +00:00
ed 9b46291a20 add option to force-disable turbo,
making it safer to enable --ban-404
(u2c can still get banned inadvertently)
2023-08-26 13:19:38 +00:00
ed 14497b2425 docs:
* mention cloudflare-specific nginx config

versus.md:
* seafile has a size limit on zip downloads
* seafile and nextcloud are slow at uploading many small files

u2c: improve error message in funky environments
2023-08-25 21:57:26 +00:00
ed f7ceae5a5f add filetable range-select with shift-pgup/pgdn,
and retain file selection cursor when lazyloading more files
2023-08-25 19:34:37 +00:00
ed c9492d16ba fix textfile navigation hotkeys (broke in 5d13ebb4) 2023-08-25 18:41:45 +00:00
ed 9fb9ada3aa dont whine about inaccessible root on rootless configs,
and make it easier for on403 to invoke the homepage-redirect
2023-08-25 18:33:15 +00:00
ed db0abbfdda typo 2023-08-21 00:05:39 +00:00
ed e7f0009e57 update pkgs to 1.9.1 2023-08-20 23:53:58 +00:00
ed 4444f0f6ff v1.9.1 2023-08-20 23:38:42 +00:00
ed 418842d2d3 update pkgs to 1.9.0 2023-08-20 23:11:44 +00:00
ed cafe53c055 v1.9.0 2023-08-20 22:02:40 +00:00
ed 7673beef72 actually impl --mc-hop (and improve --zm-spam) 2023-08-20 21:27:28 +00:00
ed b28bfe64c0 explain apple bullshit 2023-08-20 22:09:00 +02:00
ed 135ece3fbd immediately allow uploading an interrupted and
deleted incomplete upload to another location
2023-08-20 19:16:35 +00:00
ed bd3640d256 change to openmetrics 2023-08-20 18:50:14 +00:00
ed fc0405c8f3 add prometheus metrics; closes #49 2023-08-20 17:58:06 +00:00
ed 7df890d964 wget: only allow http/https/ftp/ftps (#50):
these are all the protocols that are currently supported by wget,
so this has no practical effect aside from making sure we won't
suddenly get file:// support or something (which would be bad)
2023-08-20 09:47:50 +00:00
ed 8341041857 mdns: option to ignore spec to avoid issues on
networks where clients have multiple IPs of which some are subnets that
the copyparty server is not
2023-08-19 21:45:26 +00:00
ed 1b7634932d tar/zip-download: add opus transcoding filter 2023-08-19 19:40:46 +00:00
ed 48a3898aa6 suggest enabling the database on startup 2023-08-16 19:57:19 +00:00
ed 5d13ebb4ac avoid firefox-android quirk(?):
when repeatedly tapping the next-folder button, occasionally it will
reload the entire page instead of ajax'ing the directory contents.

Navigation happens by simulating a click in the directory sidebar,
so the incorrect behavior matches what would happen if the link to the
folder didn't have its onclick-handler attached, so should probably
double-check if there's some way for that to happen

Issue observed fairly easily in firefox on android, regardless if
copyparty is running locally or on a server in a different country.
Unable to reproduce with android-chrome or desktop-firefox

Could also be due to an addon (dark-reader, noscript, ublock-origin)

anyways, avoiding this by doing the navigation more explicitly
2023-08-16 19:56:47 +00:00
ed 015b87ee99 performance / cosmetic:
* js: use .call instead of .bind when possible
* when running without e2d, the message on startup regarding
  unfinished uploads didn't show the correct filesystem path
2023-08-16 19:32:43 +00:00
ed 0a48acf6be limit each column of the files table to screen width 2023-08-16 03:55:53 +00:00
ed 2b6a3afd38 fix iOS randomly increasing fontsize of some things:
* links which are wider than the display width
* probably input fields too
2023-08-16 03:47:19 +00:00
ed 18aa82fb2f make browser resizing smoother / less expensive 2023-08-15 16:55:19 +00:00
ed f5407b2997 docker: persist autogenerated seeds, disable certgen, and
mention how to run the containers with selinux enabled
* assumes that a /cfg docker volume is provided
2023-08-15 15:07:33 +00:00
ed 474d5a155b android's got hella strict filename rules 2023-08-15 06:46:57 +02:00
ed afcd98b794 mention some gotchas (thx noktuas) 2023-08-15 03:38:51 +02:00
ed 4f80e44ff7 option to exactly specify browser title prefix 2023-08-15 03:17:01 +02:00
ed 406e413594 hint at additional context in exceptions 2023-08-15 01:42:13 +02:00
ed 033b50ae1b u2c: exclude files by regex 2023-08-15 00:45:12 +02:00
ed bee26e853b show server hostname in html titles:
* --doctitle defines most titles, prefixed with "--name: " by default
* the file browser is only prefixed with the --name itself
* --nth ("no-title-hostname") removes it
* also removed by --nih ("no-info-hostname")
2023-08-14 23:50:13 +02:00
ed 04a1f7040e adjustable timestamp resolution in log messages 2023-08-14 17:22:22 +02:00
ed f9d5bb3b29 support upload by dragdrop from other browser windows,
hello from LO484 https://ocv.me/stuff/aircode.jpg
2023-07-28 21:43:40 +02:00
ed ca0cd04085 update pkgs to 1.8.8 2023-07-25 16:25:27 +00:00
ed 999ee2e7bc v1.8.8 2023-07-25 15:50:48 +00:00
ed 1ff7f968e8 fix tls-cert regeneration on windows 2023-07-25 15:27:27 +00:00
ed 3966266207 remember ?edit and trailing-slash during login redirect 2023-07-25 15:14:47 +00:00
ed d03e96a392 html5 strips the first leading LF in textareas; stop it 2023-07-25 14:16:54 +00:00
ed 4c843c6df9 fix md-editor lastmod cmp when browsercache is belligerent 2023-07-25 14:06:53 +00:00
ed 0896c5295c range-select fixes:
* dont crash when shiftclicking between folders
* remember origin when lazyloading more files
2023-07-25 14:06:31 +02:00
ed cc0c9839eb update pkgs to 1.8.7 2023-07-23 16:16:49 +00:00
ed d0aa20e17c v1.8.7 2023-07-23 15:43:38 +00:00
ed 1a658dedb7 fix infinite playback spin on servers with one single file 2023-07-23 14:52:42 +00:00
ed 8d376b854c this is the wrong way around 2023-07-23 14:10:23 +00:00
ed 490c16b01d be even stricter with ?hc 2023-07-23 13:23:52 +00:00
ed 2437a4e864 the CVE-2023-37474 fix was overly strict; loosen 2023-07-23 11:31:11 +00:00
ed 007d948cb9 fix GHSA-f54q-j679-p9hh: reflected-XSS in cookie-setters;
it was possible to set cookie values which contained newlines,
thus terminating the http header and bleeding into the body.

We now disallow control-characters in queries,
but still allow them in paths, as copyparty supports
filenames containing newlines and other mojibake.

The changes in `set_k304` are not necessary in fixing the vulnerability,
but makes the behavior more correct.
2023-07-23 10:55:08 +00:00
ed 335fcc8535 update pkgs to 1.8.6 2023-07-21 01:12:55 +00:00
ed 9eaa9904e0 v1.8.6 2023-07-21 00:36:37 +00:00
ed 0778da6c4d fix GHSA-cw7j-v52w-fp5r: reflected-XSS through /?hc 2023-07-21 00:35:43 +00:00
ed a1bb10012d update pkgs to 1.8.4 2023-07-18 08:26:39 +00:00
ed 1441ccee4f v1.8.4 2023-07-18 07:46:22 +00:00
ed 491803d8b7 update pkgs to 1.8.3 2023-07-16 23:03:30 +00:00
ed 3dcc386b6f v1.8.3 2023-07-16 22:00:04 +00:00
ed 5aa54d1217 shift/ctrl-click improvements:
* always enable shift-click selection in list-view
* shift-clicking thumbnails opens in new window by default as expected
* enable shift-select in grid-view when multiselect is on
* invert select when the same shift-select is made repeatedly
2023-07-16 18:15:56 +00:00
ed 88b876027c option to range-select files with shift-click; closes #47
also restores the browser-default behavior of
opening links in a new tab with CTRL / new window with SHIFT
2023-07-16 14:05:09 +00:00
ed fcc3aa98fd add path-traversal scanners 2023-07-16 13:09:31 +00:00
ed f2f5e266b4 support listing uploader IPs in d2t volumes 2023-07-15 18:50:35 +00:00
ed e17bf8f325 require the new admin permission for the admin-panel 2023-07-15 18:39:41 +00:00
ed d19cb32bf3 update pkgs to 1.8.2 2023-07-14 16:05:57 +00:00
ed 85a637af09 v1.8.2 2023-07-14 15:58:39 +00:00
ed 043e3c7dd6 fix traversal vulnerability GHSA-pxfv-7rr3-2qjg:
the /.cpr endpoint allowed full access to server filesystem,
unless mitigated by prisonparty
2023-07-14 15:55:49 +00:00
ed 8f59afb159 fix another race (unpost):
unposting could collide with most other database-related activities,
causing one or the other to fail.
luckily the unprotected query performed by the unpost API happens to be
very cheap, so also the most likely to fail, and would succeed upon a
manual reattempt from the UI.
even in the worst case scenario, there would be no unrecoverable damage
as the next rescan would auto-repair any resulting inconsistencies.
2023-07-14 15:21:14 +00:00
ed 77f1e51444 fix unlikely race (e2tsr):
if someone with admin rights refreshes the homepage exactly as the
directory indexer decides to `_drop_caches`, the indexer thread would
die and the up2k instance would become inoperable...
luckily the probability of hitting this by chance is absolutely minimal,
and the worst case scenario is having to restart copyparty if this
happens immediately after startup; there is no risk of database damage
2023-07-14 15:20:25 +00:00
ed 22fc4bb938 add event-hook for banning users 2023-07-13 22:29:32 +00:00
ed 50c7bba6ea volflag "nohtml" to never return html or rendered markdown from potentially unsafe volumes 2023-07-13 21:57:52 +00:00
ed 551d99b71b add permission "a" to show uploader IPs (#45) 2023-07-12 21:36:55 +00:00
ed b54b7213a7 more thumbnailer configs available as volflags:
--th-convt = convt
--th-no-crop = nocrop
--th-size = thsize
2023-07-11 22:15:37 +00:00
ed a14943c8de update pkgs to 1.8.1 2023-07-07 23:58:16 +00:00
ed a10cad54fc v1.8.1 2023-07-07 22:20:01 +00:00
ed 8568b7702a add pillow10 support + improve text rendering 2023-07-07 22:13:04 +00:00
ed 5d8cb34885 404/403 can be handled with plugins 2023-07-07 21:33:40 +00:00
ed 8d248333e8 dont disable quickedit when hashing passwords interactively 2023-07-07 18:29:30 +00:00
ed 99e2ef7f33 ux: fix tabs clipping in fedora-ff, hackertheme up2k flags 2023-07-07 18:24:58 +00:00
ed e767230383 very-bad-idea: prefer mpv / streamlink; closes #42 2023-06-28 21:25:40 +00:00
ed 90601314d6 better explain why very-bad-idea is a very bad idea 2023-06-27 22:30:14 +00:00
ed 9c5eac1274 add fedora package 2023-06-27 22:22:42 +00:00
ed 50905439e4 update pkgs to 1.8.0 2023-06-26 00:46:55 +00:00
ed a0c1239246 v1.8.0 2023-06-26 00:05:12 +00:00
ed b8e851c332 cloudflare update + cosmetics:
* toastb padding fixes scrollbar on norwegian 403 in firefox
* fix text aspect ratio in seekbaron compact toggle
* crashpage had link overlaps on homepage
2023-06-25 23:09:29 +00:00
ed baaf2eb24d include mdns names in tls cert 2023-06-25 22:06:35 +00:00
ed e197895c10 support hashed passwords; closes #39 2023-06-25 21:50:33 +00:00
ed cb75efa05d md-editor: index file and trigger upload hooks 2023-06-20 18:11:35 +00:00
ed 8b0cf2c982 volflags to limit volume size / num files; closes #40 2023-06-19 00:42:45 +00:00
ed fc7d9e1f9c update pkgs to 1.7.6 2023-06-11 09:13:58 +00:00
ed 10caafa34c v1.7.6 2023-06-11 08:14:45 +00:00
ed 22cc22225a v1.7.5 2023-06-11 01:32:56 +00:00
ed 22dff4b0e5 update pkgs to 1.7.4 2023-06-11 01:26:25 +00:00
ed a00ff2b086 v1.7.4 2023-06-11 00:07:38 +00:00
ed e4acddc23b v1.7.3 2023-06-11 00:03:03 +00:00
ed 2b2d8e4e02 tls / gencert fixes 2023-06-10 23:34:34 +00:00
ed 5501d49032 prefer urandom for fk-salt unless cert.pem exists 2023-06-10 22:47:39 +00:00
ed fa54b2eec4 generate tls certs 2023-06-10 22:46:24 +00:00
ed cb0160021f upgrade pyinstaller env/deps 2023-06-10 11:58:58 +00:00
ed 93a723d588 add --ansi to systemd, fix grid controls bg,
mention folder thumbs dependency on -e2d,
improve make-sfx warnings,
update changelog
2023-06-06 22:04:39 +00:00
ed 8ebe1fb5e8 mention cfssl.sh in the default-certificate warning,
and improve documentation inside cfssl.sh
2023-06-06 21:41:19 +00:00
clach04 2acdf685b1 Fix issue #33 - no color output expected when redirecting stdout 2023-06-05 01:58:49 +02:00
ed 9f122ccd16 make-sfx: option to auto-obtain webdeps 2023-06-04 23:46:38 +00:00
ed 03be26fafc improve check for type-hint support 2023-06-04 22:59:25 +00:00
ed df5d309d6e document the make-sfx.sh fast option 2023-06-04 14:13:35 +00:00
ed c355f9bd91 catch common environment issues (#32):
* error-message which explains how to run on py2 / older py3
   when trying to run from source
* check compatibility between jinja2 and cpython on startup
* verify that webdeps are present on startup
* verify that webdeps are present when building sfx
* make-sfx.sh grabs the strip-hints dependency
2023-06-04 13:13:36 +00:00
ed 9c28ba417e option to regex-exclude files in browser listings 2023-06-02 21:54:25 +00:00
ed 705b58c741 support the NO_COLOR environment variable
https://no-color.org/ and more importantly
https://youtu.be/biW5UVGkPMA?t=150
2023-06-02 20:22:57 +00:00
ed 510302d667 support ftps-only; closes #30 2023-06-02 19:02:50 +00:00
ed 025a537413 add option to show thumbs by default; closes #31 2023-06-02 18:41:21 +00:00
ed 60a1ff0fc0 macos: mute select() noise on wake from suspend 2023-05-19 16:37:52 +02:00
ed f94a0b1bff update pkgs to 1.7.2 2023-05-13 00:49:46 +00:00
ed 4ccfeeb2cd v1.7.2 2023-05-13 00:00:07 +00:00
ed 2646f6a4f2 oh nice, looks like 3.18 fixed whatever broke in 3.17 2023-05-12 23:38:10 +00:00
ed b286ab539e readme: add more examples 2023-05-12 22:41:06 +00:00
ed 2cca6e0922 warn when sharing certain system locations 2023-05-12 21:38:16 +00:00
ed db51f1b063 cfg: allow trailing colon on category headers 2023-05-12 21:01:34 +00:00
ed d979c47f50 optimize clearTimeout + always shrink upload panes after completion + fix GET alignment 2023-05-12 20:46:45 +00:00
ed e64b87b99b dont hardlink symlinks (they could be relative) 2023-05-12 20:41:09 +00:00
ed b985011a00 upgrade docker to alpine 3.18:
* enables chiptune player
* smaller containers (generate pycache at runtime)
2023-05-11 06:56:21 +00:00
ed c2ed2314c8 pkg/arch: add setuptools 2023-05-08 22:24:46 +00:00
ed cd496658c3 update pkgs to 1.7.1 2023-05-07 19:51:59 +00:00
ed deca082623 v1.7.1 2023-05-07 18:34:39 +00:00
ed 0ea8bb7c83 forgot the u2c symlink + sfx listing 2023-05-07 15:45:20 +00:00
ed 1fb251a4c2 was moved to pyproject 2023-05-07 15:41:00 +00:00
ed 4295923b76 rename up2k.py (client) to u2c.py 2023-05-07 15:37:52 +00:00
ed 572aa4b26c rename up2k.py (client) to u2c.py 2023-05-07 15:35:56 +00:00
ed b1359f039f linter cleanup 2023-05-07 14:38:30 +00:00
ed 867d8ee49e replace setup.py with pyproject.toml + misc cleanup 2023-05-07 14:37:57 +00:00
ed 04c86e8a89 webdav: support write-only folders + force auth option 2023-05-06 20:33:29 +00:00
ed bc0cb43ef9 include usernames in request logs 2023-05-06 20:17:56 +00:00
ed 769454fdce ftpd: only log invalid passwords 2023-05-06 19:16:52 +00:00
ed 4ee81af8f6 support ';' in passwords 2023-05-06 18:54:55 +00:00
ed 8b0e66122f smoother playback cursor on short songs + optimize 2023-05-06 16:31:04 +00:00
ed 8a98efb929 adapt to new archpkg layout 2023-05-05 20:51:18 +00:00
ed b6fd555038 panic if two accounts have the same password 2023-05-05 20:24:24 +00:00
ed 7eb413ad51 doc tweaks 2023-05-05 19:39:10 +00:00
ixces 4421d509eb update PKGBUILD 2023-05-02 17:21:12 +02:00
ed 793ffd7b01 update pkgs to 1.7.0 2023-04-29 22:50:36 +00:00
ed 1e22222c60 v1.7.0 2023-04-29 21:14:38 +00:00
ed 544e0549bc make xvol and xdev apply at runtime (closes #24):
* when accessing files inside an xdev volume, verify that the file
   exists on the same device/filesystem as the volume root

* when accessing files inside an xvol volume, verify that the file
   exists within any volume where the user has read access
2023-04-29 21:10:02 +00:00
ed 83178d0836 preserve empty folders (closes #23):
* when deleting files, do not cascade upwards through empty folders
* when moving folders, also move any empty folders inside

the only remaining action which autoremoves empty folders is
files getting deleted as they expire volume lifetimes

also prevents accidentally moving parent folders into subfolders
(even though that actually worked surprisingly well)
2023-04-29 11:30:43 +00:00
ed c44f5f5701 nit 2023-04-29 09:44:46 +00:00
ed 138f5bc989 warn about android powersave settings on music interruption + fix eq on folder change 2023-04-29 09:31:53 +00:00
ed e4759f86ef ftpd correctness:
* winscp mkdir failed because the folder-not-found error got repeated
* rmdir fails after all files in the folder have poofed; that's OK
* add --ftp4 as a precaution
2023-04-28 20:50:45 +00:00
ed d71416437a show file selection summary 2023-04-27 19:33:52 +00:00
ed a84c583b2c ok that wasn't enough 2023-04-27 19:06:35 +00:00
ed cdacdccdb8 update pkgs to 1.6.15 2023-04-27 00:36:56 +00:00
ed d3ccd3f174 v1.6.15 2023-04-26 23:00:55 +00:00
ed cb6de0387d a bit faster 2023-04-26 19:56:27 +00:00
ed abff40519d eyecandy: restore playback indicator on folder hop 2023-04-26 19:09:16 +00:00
ed 55c74ad164 30% faster folder listings (wtf...) 2023-04-26 18:55:53 +00:00
ed 673b4f7e23 option to show symlink's lastmod instead of deref;
mainly motivated by u2cli's folder syncing in turbo mode
which would un-turbo on most dupes due to wrong lastmod

disabled by default for regular http listings
(to avoid confusion in most regular usecases),
enable per-request with urlparam lt

enabled by default for single-level webdav listings
(because rclone hits the same issue as u2cli),
can be disabled with arg --dav-rt or volflag davrt

impossible to enable for recursive webdav listings
2023-04-26 18:54:21 +00:00
ed d11e02da49 u2cli: avoid dns lookups while uploading 2023-04-26 18:46:42 +00:00
ed 8790f89e08 fix installing from source tarball 2023-04-26 18:40:47 +00:00
ed 33442026b8 try to discourage android from stopping playback...
...when continuing into the next folder

accidentally introduces a neat bonus feature where the music
no longer stops while you go looking for stuff to play next
2023-04-26 18:33:30 +00:00
ed 03193de6d0 socket read/write timeout 2023-04-24 20:04:22 +00:00
ed 8675ff40f3 update pkgs to 1.6.14 2023-04-24 07:52:12 +00:00
ed d88889d3fc v1.6.14 2023-04-24 06:09:44 +00:00
ed 6f244d4335 update pkgs to 1.6.13 2023-04-24 00:46:47 +00:00
ed cacca663b3 v1.6.13 2023-04-23 23:05:31 +00:00
ed d5109be559 ftp: track login state isolated from pyftpdlib;
for convenience, the password can be provided as the username
but that confuses pyftpd a little so let's do this
2023-04-23 21:06:19 +00:00
ed d999f06bb9 volflags can be -unset 2023-04-23 21:05:29 +00:00
ed a1a8a8c7b5 configurable tls-certificate location 2023-04-23 20:56:55 +00:00
ed fdd6f3b4a6 tar/zip: use volume name as toplevel fallback 2023-04-23 20:55:34 +00:00
ed f5191973df docs cleanup:
* mostly deprecate --http-only and --https-only since there is zero
   performance gain in recent python versions, however could still be
   useful for avoiding limitations in alternative python interpreters
   (and forcing http/https with mdns/ssdp/qr)

* mention antivirus being useless as usual
2023-04-23 20:25:44 +00:00
ed ddbaebe779 update pkgs to 1.6.12 2023-04-20 22:47:37 +00:00
ed 42099baeff v1.6.12 2023-04-20 21:41:47 +00:00
ed 2459965ca8 u2cli: dont enter delete stage if something failed 2023-04-20 20:40:09 +00:00
ed 6acf436573 u2idx pool instead of per-socket;
prevents running out of FDs thanks to thousands of sqlite3 sessions
and neatly sidesteps what could possibly be a race in python's
sqlite3 bindings where it sometimes forgets to close the fd
2023-04-20 20:36:13 +00:00
ed f217e1ce71 correctly ignore multirange requests 2023-04-20 19:14:38 +00:00
ed 418000aee3 explain tus incompatibility + update docs 2023-04-19 21:46:33 +00:00
ed dbbba9625b nix: make deps optional + update docs 2023-04-17 13:17:53 +02:00
Chinpo Nya 397bc92fbc rewrite the nix module config with nix options 2023-04-17 00:26:57 +02:00
Chinpo Nya 6e615dcd03 fix: remove ffmpeg from python env build inputs 2023-04-17 00:26:57 +02:00
Chinpo Nya 9ac5908b33 refactor: remove unnecessary use of 'rec' 2023-04-17 00:26:57 +02:00
Chinpo Nya 50912480b9 automate nix package updates 2023-04-17 00:26:57 +02:00
Chinpo Nya 24b9b8319d nix/nixos documentation 2023-04-17 00:26:57 +02:00
Chinpo Nya b0f4f0b653 nixos module 2023-04-17 00:26:57 +02:00
Chinpo Nya 05bbd41c4b nix package 2023-04-17 00:26:57 +02:00
ed 8f5f8a3cda expand userhomes everywhere:
* -c
* -lo
* --hist
* hist volflag
* --ssl-log
2023-04-14 18:55:19 +02:00
ed c8938fc033 fix ipv4 location header on dualstack 2023-04-14 14:06:44 +02:00
ed 1550350e05 update docs (performance tips, windows example) 2023-04-13 21:36:55 +00:00
ed 5cc190c026 better 2023-04-12 22:09:46 +00:00
ed d6a0a738ce add windows example + update docs + some cosmetics 2023-04-12 22:06:44 +00:00
ed f5fe3678ee more safari-on-touchbar-macbook workarounds:
* safari invokes pause on the mediasession
   whenever any Audio loads a new src (preload)

* ...and on some(?) seeks
2023-04-07 23:04:01 +02:00
ed f2a7925387 avoid safari bugs on touchbar macbooks:
* songs would play backwards
* playback started immediately on folder change
2023-04-07 12:38:37 +02:00
ed fa953ced52 update archpkg to 1.6.11 2023-04-01 22:59:20 +00:00
ed f0000d9861 v1.6.11 2023-04-01 21:12:54 +00:00
ed 4e67516719 last.fm web-scrobbler support 2023-04-01 21:02:03 +00:00
ed 29db7a6270 deps: automate prismjs build 2023-04-01 17:46:42 +00:00
ed 852499e296 dont panic in case of extension-injected css 2023-04-01 16:08:45 +00:00
ed f1775fd51c update deps 2023-04-01 15:15:53 +00:00
ed 4bb306932a update systemd notes 2023-04-01 10:32:12 +00:00
ed 2a37e81bd8 add rclone optimization, closes #21 2023-04-01 10:21:21 +00:00
ed 6a312ca856 something dumb 2023-04-01 00:16:30 +00:00
ed e7f3e475a2 more accurate bpm detector 2023-03-31 21:20:37 +00:00
ed 854ba0ec06 add audio filter plugin thing 2023-03-31 20:20:28 +00:00
ed 209b49d771 remind sqlite we have indexes 2023-03-30 21:45:58 +00:00
ed 949baae539 integrate markdown thumbs with image gallery 2023-03-30 21:21:21 +00:00
ed 5f4ea27586 new hook: exif stripper 2023-03-26 22:19:15 +00:00
ed 099cc97247 hooks: more correct usage examples 2023-03-26 22:18:48 +00:00
ed 592b7d6315 gdi js 2023-03-26 02:06:49 +00:00
ed 0880bf55a1 markdown thumbnails 2023-03-26 01:53:41 +00:00
ed 4cbffec0ec u2cli: show more errors + drop --ws (does nothing) 2023-03-23 23:47:41 +00:00
ed cc355417d4 update docs 2023-03-23 23:37:45 +00:00
ed e2bc573e61 webdav correctness:
* generally respond without body
   (rclone likes this)
* don't connection:close on most mkcol errors
2023-03-23 23:25:00 +00:00
ed 41c0376177 update archpkg to 1.6.10 2023-03-20 23:37:20 +00:00
ed c01cad091e v1.6.10 2023-03-20 21:56:31 +00:00
ed eb349f339c update foldersync / rclone docs 2023-03-20 21:54:08 +00:00
ed 24d8caaf3e switch rclone to owncloud mode so it sends lastmod 2023-03-20 21:45:52 +00:00
ed 5ac2c20959 basic support for rclone sync 2023-03-20 21:17:53 +00:00
ed bb72e6bf30 support propfind of files (not just dirs) 2023-03-20 20:58:51 +00:00
ed d8142e866a accept last-modified from owncloud webdav extension 2023-03-20 20:28:26 +00:00
ed 7b7979fd61 add sftpgo to comparison + update docs 2023-03-19 21:45:35 +00:00
ed 749616d09d help iOS understand short audio files 2023-03-19 20:03:35 +00:00
ed 5485c6d7ca prisonparty: FFmpeg runs faster with /dev/urandom 2023-03-19 18:32:35 +00:00
ed b7aea38d77 add iOS uploader (mk.ii) 2023-03-18 18:38:37 +00:00
ed 0ecd9f99e6 update archpkg to 1.6.9 2023-03-16 22:34:09 +00:00
ed ca04a00662 v1.6.9 2023-03-16 21:06:18 +00:00
ed 8a09601be8 url-param ?v disables index.html 2023-03-16 20:52:43 +00:00
ed 1fe0d4693e fix logues bleeding into navpane 2023-03-16 20:23:01 +00:00
ed bba8a3c6bc fix truncated search results 2023-03-16 20:12:13 +00:00
ed e3d7f0c7d5 add tooltip delay to android too 2023-03-16 19:48:44 +00:00
ed be7bb71bbc add option to show index.html instead of listing 2023-03-16 19:41:33 +00:00
ed e0c4829ec6 verify covers against db instead of fs 2023-03-15 19:48:43 +00:00
ed 5af1575329 readme: ideas welcome w 2023-03-14 22:24:43 +00:00
ed 884f966b86 update archpkg to 1.6.8 2023-03-12 18:55:02 +00:00
ed f6c6fbc223 fix exe builder 2023-03-12 18:54:16 +00:00
ed b0cc396bca v1.6.8 2023-03-12 16:10:07 +00:00
ed ae463518f6 u2cli: send upload stats to server + fix py2.6 support 2023-03-11 21:39:56 +00:00
ed 2be2e9a0d8 index folder thumbs in db 2023-03-11 11:43:29 +00:00
ed e405fddf74 specify that only up2k clients will resume uploads 2023-03-09 22:47:37 +00:00
ed c269b0dd91 show an error (instead of crashing) if a pic is 404 2023-03-09 22:37:12 +00:00
ed 8c3211263a keep scanning folders for more music to play 2023-03-09 22:26:41 +00:00
ed bf04e7c089 update some docs 2023-03-09 22:11:39 +00:00
ed c7c6e48b1a didn't compress numbered logfiles 2023-03-09 21:59:59 +00:00
ed 974ca773be just to be extra sure 2023-03-09 21:49:29 +00:00
ed 9270c2df19 evict basic-browser from crawlers 2023-03-09 21:35:07 +00:00
ed b39ff92f34 u2cli: support long paths on win7 2023-03-08 22:27:13 +00:00
ed 7454167f78
add DCO PR template 2023-03-08 08:27:17 +01:00
ed 5ceb3a962f build up2k.exe 2023-03-07 22:58:14 +00:00
ed 52bd5642da update archpkg to 1.6.7 2023-03-05 20:20:15 +00:00
ed c39c93725f v1.6.7 2023-03-05 20:18:16 +00:00
ed d00f0b9fa7 ftp: support filezilla mkdir 2023-03-05 20:18:02 +00:00
ed 01cfc70982 add example for webdav automount 2023-03-05 19:52:45 +00:00
ed e6aec189bd fix flickering toast on upload finish 2023-03-05 19:49:54 +00:00
ed c98fff1647 fix chunkpost-handshake race (affects --no-dedup only);
a handshake arriving in the middle of the final chunk could cause
dupes to become empty -- worst case leading to loss of data
2023-03-05 19:45:50 +00:00
ed 0009e31bd3 heavy webworker load can park the main thread of a
background chrome tab for 10sec; piggyback some pokes off postmessage
2023-03-02 22:35:32 +00:00
ed db95e880b2 thats not how it works 2023-02-28 22:19:06 +00:00
ed e69fea4a59 exe: update screenshots 2023-02-26 22:26:40 +00:00
ed 4360800a6e update archpkg to 1.6.6 2023-02-26 22:11:56 +00:00
ed b179e2b031 prisonparty: ignore unresolvable mount paths;
allows startup even if some locations are missing,
for example if a server rebooted and some disks aren't up yet
2023-02-26 22:11:15 +00:00
ed ecdec75b4e v1.6.6 2023-02-26 20:30:17 +00:00
ed 5cb2e33353 update readmes + fix typo 2023-02-26 19:22:54 +00:00
ed 43ff2e531a add deadline for filling data into a reserved filename 2023-02-26 19:13:35 +00:00
ed 1c2c9db8f0 retain upload time (but not ip) on file reindex 2023-02-26 19:09:24 +00:00
ed 7ea183baef let http thread handle upload verification plugins 2023-02-26 19:07:49 +00:00
ed ab87fac6d8 db got the wrong lastmod when linking dupes 2023-02-26 18:52:04 +00:00
ed 1e3b7eee3b dont rmdir volume top on cleanup 2023-02-26 18:28:37 +00:00
ed 4de028fc3b let controlpanel rescan button override lack of e2dsa 2023-02-26 18:27:10 +00:00
ed 604e5dfaaf improve error handling / messages 2023-02-26 18:26:13 +00:00
ed 05e0c2ec9e add xiu (batching hook; runs on idle after uploads) +
bunch of tweaks/fixes for hooks
2023-02-26 18:23:32 +00:00
ed 76bd005bdc cgen fixes 2023-02-21 19:42:08 +00:00
ed 5effaed352 add reminder that SSDP launches IE by default 2023-02-21 19:38:35 +00:00
ed cedaf4809f add exe integrity selfcheck 2023-02-21 19:18:10 +00:00
ed 6deaf5c268 add jitter simlation 2023-02-20 21:34:30 +00:00
ed 9dc6a26472 webdav.bat and readme tweaks 2023-02-20 21:00:04 +00:00
ed 14ad5916fc freebsd: fancy console listing for fetch 2023-02-19 22:14:21 +00:00
ed 1a46738649 raise edgecases (broken envs on windows) 2023-02-19 22:13:33 +00:00
ed 9e5e3b099a add optional deps to quickstart section 2023-02-19 22:13:02 +00:00
ed 292ce75cc2 return to previous url after login 2023-02-19 19:58:15 +00:00
ed ce7df7afd4 update platform support listing 2023-02-19 15:16:50 +00:00
ed e28e793f81 whoops 2023-02-19 15:11:04 +00:00
ed 3e561976db optimize docker build times (884 to 379 sec) 2023-02-19 14:19:35 +00:00
ed 273a4eb7d0 list supported platforms 2023-02-19 01:00:37 +00:00
ed 6175f85bb6 more docker images for arm, arm64, s390x 2023-02-19 00:50:07 +00:00
ed a80579f63a build docker for x32 aarch64 armhf ppc64 s390x 2023-02-18 23:04:55 +00:00
ed 96d6bcf26e if non-TLS, show warning in the login form 2023-02-17 22:49:03 +00:00
ed 49e8df25ac ie11: support back button 2023-02-17 22:21:13 +00:00
ed 6a05850f21 also undupe search hits from overlapping volumes 2023-02-17 20:48:57 +00:00
ed 5e7c3defe3 update pypi description + docker links 2023-02-16 19:56:57 +00:00
ed 6c0987d4d0 mention --daw 2023-02-15 17:51:20 +00:00
ed 6eba9feffe condense uploads listing on view change 2023-02-14 21:58:15 +00:00
ed 8adfcf5950 win10-based copyparty64.exe 2023-02-14 21:50:14 +00:00
ed 36d6fa512a mention upcoming libopenmpt availability 2023-02-13 06:57:47 +00:00
ed 79b6e9b393 update archpkg to 1.6.5 2023-02-12 15:38:03 +00:00
ed dc2e2cbd4b v1.6.5 2023-02-12 14:11:45 +00:00
ed 5c12dac30f most ffmpeg builds dont support compressed modules 2023-02-12 14:02:43 +00:00
ed 641929191e fix reading smb shares on windows 2023-02-12 13:59:34 +00:00
ed 617321631a docker: add annotations 2023-02-11 21:10:28 +00:00
ed ddc0c899f8 update archpkg to 1.6.4 2023-02-11 21:01:45 +00:00
ed cdec42c1ae v1.6.4 2023-02-11 18:02:05 +00:00
ed c48f469e39 park all clients waiting for a transcode 2023-02-11 17:23:29 +00:00
ed 44909cc7b8 print ffmpeg download url on windows 2023-02-11 17:22:24 +00:00
ed 8f61e1568c transcode chiptunes to opus;
* new audio/MPT formats: apac bonk dfpwm ilbc it itgz itr itz mo3 mod mptm mt2 okt s3gz s3m s3r s3z xm xmgz xmr xmz xpk
* new image/PIL formats: blp dcx emf eps fits flc fli fpx im j2k j2p psd spi wmf
2023-02-11 11:17:37 +00:00
ed b7be7a0fd8 mirror docker images to ghcr 2023-02-10 23:40:30 +00:00
ed 1526a4e084 add docker packaging 2023-02-10 23:02:01 +00:00
ed dbdb9574b1 doc-browser: fix md scaling + download hotkey 2023-02-10 21:33:48 +00:00
ed 853ae6386c config load summary + safer windows defaults 2023-02-10 21:32:42 +00:00
ed a4b56c74c7 support long filepaths on win7 + misc windows fixes 2023-02-10 18:37:37 +00:00
ed d7f1951e44 fix --cgen for 'g' perms 2023-02-08 22:38:21 +00:00
ed 7e2ff9825e ensure -e2tsr takes effect by ignoring dhash 2023-02-08 22:33:02 +00:00
ed 9b423396ec better description for anonymous permissions 2023-02-07 20:12:45 +00:00
ed 781146b2fb describe all database volflags in --help-flags 2023-02-07 20:07:06 +00:00
ed 84937d1ce0 add v2 config syntax (#20) 2023-02-07 19:54:08 +00:00
ed 98cce66aa4 cgen: update set of multivalue keys 2023-02-06 07:26:23 +00:00
ed 043c2d4858 cgen: fix permissions listing 2023-02-06 07:23:35 +00:00
ed 99cc434779 add config explainer + generator (#20) 2023-02-05 22:09:17 +00:00
ed 5095d17e81 more interesting config example 2023-02-05 21:32:20 +00:00
ed 87d835ae37 dont allow multiple volumes at the same fs-path 2023-02-05 21:16:36 +00:00
ed 6939ca768b pkg/arch: add prisonparty 2023-02-05 00:07:04 +00:00
ed e3957e8239 systemd: prisonparty improvements 2023-02-05 00:03:40 +00:00
ed 4ad6e45216 only load *.conf files when including a folder 2023-02-05 00:01:10 +00:00
ed 76e5eeea3f prisonparty: fix reload signal 2023-02-05 00:00:18 +00:00
ed eb17f57761 pypi fixes 2023-02-04 17:35:20 +00:00
ed b0db14d8b0 indicate forced-randomized filenames 2023-02-04 15:18:09 +00:00
ed 2b644fa81b don't alias randomized filenames 2023-02-04 13:41:43 +00:00
ed 190ccee820 add optional version number on controlpanel 2023-02-04 13:41:34 +00:00
JeremyStarTM 4e7dd32e78
Added "wow this is better than nextcloud" (#19)
* Added "wow this is better than nextcloud"
2023-02-04 13:00:16 +00:00
john smith 5817fb66ae goddamn tabs 2023-02-03 12:50:17 +01:00
john smith 9cb04eef93 misc PKGBUILD fixes 2023-02-03 12:50:17 +01:00
john smith 0019fe7f04 indent PKGBUILD with spaces instead of tabs 2023-02-03 12:50:17 +01:00
john smith 852c6f2de1 remove unnecessary dependencies from PKGBUILD 2023-02-03 12:50:17 +01:00
john smith c4191de2e7 improve PKGBUILD based on stuff in https://github.com/9001/copyparty/issues/17 2023-02-03 12:50:17 +01:00
ed 4de61defc9 add a link exporter to the unpost ui too 2023-02-02 22:57:59 +00:00
ed 0aa88590d0 should generalize this somehow 2023-02-02 22:35:13 +00:00
ed 405f3ee5fe adjustable toast position 2023-02-02 22:28:31 +00:00
ed bc339f774a button to show/copy links for all recent uploads 2023-02-02 22:27:53 +00:00
ed e67b695b23 show filekeys in recent-uploads ui 2023-02-02 21:22:51 +00:00
ed 4a7633ab99 fix outdated docs mentioned in #17 sry 2023-02-02 20:12:32 +00:00
john smith c58f2ef61f fix PKGBUILD more 2023-02-02 20:48:20 +01:00
john smith 3866e6a3f2 fix PKGBUILD indentation 2023-02-02 20:30:48 +01:00
john smith 381686fc66 add PKGBUILD 2023-02-02 20:30:48 +01:00
ed a918c285bf up2k-ui: button to randomize upload filenames 2023-02-01 22:26:18 +00:00
ed 1e20eafbe0 volflag to randomize all upload filenames 2023-02-01 21:58:01 +00:00
ed 39399934ee v1.6.3 2023-01-31 21:03:43 +00:00
ed b47635150a shove #files aside while prologue sandbox is loading 2023-01-31 21:02:58 +00:00
ed 78d2f69ed5 prisonparty: support opus transcoding on debian
libblas.so and liblapack.so are symlinks into /etc/alternatives
2023-01-31 20:50:59 +00:00
ed 7a98dc669e block alerts in sandbox by default + add translation 2023-01-31 19:16:28 +00:00
ed 2f15bb5085 include filesize in notification 2023-01-31 19:03:13 +00:00
ed 712a578e6c indicate when a readme/logue was hidden 2023-01-31 19:01:24 +00:00
ed d8dfc4ccb2 support davfs2 LOCK (uploads) + misc windows support + logue filtering 2023-01-31 18:53:38 +00:00
ed e413007eb0 hide dotfiles from search results by default 2023-01-31 18:13:33 +00:00
ed 6d1d3e48d8 sandbox height didnt account for scrollbars 2023-01-31 17:54:04 +00:00
ed 04966164ce more iframe-resize-concealing tricks 2023-01-31 17:43:21 +00:00
ed 8b62aa7cc7 unlink files before replacing them
to avoid hardlink-related surprises
2023-01-31 17:17:18 +00:00
ed 1088e8c6a5 optimize 2023-01-30 22:53:27 +00:00
ed 8c54c2226f cover up most of the layout jank 2023-01-30 22:52:16 +00:00
ed f74ac1f18b fix sandbox lag by helping the iframe cache js 2023-01-30 22:36:05 +00:00
ed 25931e62fd and nofollow the basic-browser link too 2023-01-29 22:15:22 +00:00
ed 707a940399 add nofollow to zip links 2023-01-29 22:10:03 +00:00
ed 87ef50d384 doc 2023-01-29 21:23:48 +00:00
ed dcadf2b11c v1.6.2 2023-01-29 18:42:21 +00:00
ed 37a690a4c3 fix cookie + rproxy oversights 2023-01-29 18:34:48 +00:00
ed 87ad23fb93 docs + chmod 2023-01-29 18:28:53 +00:00
ed 5f54d534e3 hook/notify: add android support 2023-01-29 15:14:22 +00:00
ed aecae552a4 v1.6.1 2023-01-29 04:41:16 +00:00
ed eaa6b3d0be mute some startup noise 2023-01-29 04:33:28 +00:00
ed c2ace91e52 v1.6.0 2023-01-29 02:55:44 +00:00
ed 0bac87c36f make loss of hotkeys more obvious 2023-01-29 01:40:02 +00:00
ed e650d05939 shovel across most of the env too 2023-01-29 01:19:53 +00:00
ed 85a96e4446 add custom text selection colors because chrome is broken on fedora 2023-01-29 01:03:10 +00:00
ed 2569005139 support sandboxed markdown plugins 2023-01-29 00:57:08 +00:00
ed c50cb66aef sandboxed other-origin iframes dont cache css 2023-01-28 23:40:25 +00:00
ed d4c5fca15b sandbox readme.md / prologue / epilogue 2023-01-28 21:24:40 +00:00
ed 75cea4f684 misc 2023-01-28 13:35:49 +00:00
ed 68c6794d33 rewrite other symlinks after the actual move;
fixes volumes where symlinking is disabled
2023-01-28 01:14:29 +00:00
ed 82f98dd54d delete/move is now POST 2023-01-28 01:02:50 +00:00
ed 741d781c18 add cors controls + improve preflight + pw header 2023-01-28 00:59:04 +00:00
ed 0be1e43451 mention mtp in the hooks readme 2023-01-28 00:07:50 +00:00
ed 5366bf22bb describe detected network changes 2023-01-27 23:56:54 +00:00
ed bcd91b1809 add eventhook examples 2023-01-27 23:55:57 +00:00
ed 9bd5738e6f shorter fallback hostname 2023-01-27 22:19:25 +00:00
ed bab4aa4c0a mkdir fix 2023-01-27 22:16:10 +00:00
ed e965b9b9e2 mkdir missing volumes on startup 2023-01-27 21:52:28 +00:00
ed 31101427d3 support downloading blockdev contents 2023-01-27 21:09:57 +00:00
ed a083dc36ba dont get confused by dangling symlinks at target 2023-01-27 20:27:00 +00:00
ed 9b7b9262aa promote dedup control to volflags 2023-01-25 21:46:15 +00:00
ed 660011fa6e md-editor: make hotkey ^e more global 2023-01-25 20:58:28 +00:00
ed ead31b6823 add eventhook sanchecks 2023-01-25 20:51:02 +00:00
ed 4310580cd4 separate http/https logins (breaks ie4 / win3.11 login) 2023-01-24 21:23:57 +00:00
ed b005acbfda enable text selection between breadcrumbs + update vs 2023-01-23 22:44:29 +00:00
ed 460709e6f3 upgrade wget downloader to use event hooks 2023-01-22 23:45:11 +00:00
ed a8768d05a9 add comparison to similar software 2023-01-22 23:39:19 +00:00
ed f8e3e87a52 add event hooks 2023-01-22 23:35:31 +00:00
ed 70f1642d0d allow tar/zip download of hidden folders 2023-01-21 20:56:44 +00:00
ed 3fc7561da4 macos 2023-01-21 10:36:31 +00:00
ed 9065226c3d oh great its in lts too 2023-01-21 10:19:04 +00:00
ed b7e321fa47 cleanup 2023-01-19 22:26:49 +00:00
ed 664665b86b fix some location-rproxy bugs 2023-01-19 22:26:24 +00:00
ed f4f362b7a4 add --freebind 2023-01-18 21:55:36 +00:00
ed 577d23f460 zeroconf: detect network change and reannounce 2023-01-18 21:27:27 +00:00
ed 504e168486 compensate avg.speed for single-chunk uploads 2023-01-18 19:53:19 +00:00
ed f2f9640371 workaround firefox layout bug:
three-line toasts get a scrollbar even if it doesn't need one
and the width is not adjusted correctly when that happens
2023-01-18 19:45:04 +00:00
ed ee46f832b1 u2cli: add option -ns for slow terminals 2023-01-17 23:29:51 +00:00
ed b0e755d410 give curl colored (yet sortable) plaintext listings 2023-01-17 23:22:43 +00:00
ed cfd24604d5 ux tweaks 2023-01-17 23:21:31 +00:00
ed 264894e595 add cursed usecases 2023-01-16 21:46:11 +00:00
ed 5bb9f56247 linux 6.1 fixed the 6.0 bugs; remove workarounds 2023-01-16 20:44:57 +00:00
ed 18942ed066 location-based rproxy fixes 2023-01-16 20:09:45 +00:00
ed 85321a6f31 stale tree is better than no tree 2023-01-15 20:54:03 +00:00
ed baf641396d add optional powered-by footnode 2023-01-15 20:52:38 +00:00
ed 17c91e7014 override bogus mimetypes 2023-01-14 15:10:32 +00:00
ed 010770684d workaround another linux kernel bug 2023-01-14 08:16:15 +00:00
ed b4c503657b ignore loss of stdout 2023-01-14 07:35:44 +00:00
ed 71bd306268 fix unpost filters with slashes 2023-01-13 17:56:32 +00:00
ed dd7fab1352 u2cli: properly retry failed handshakes 2023-01-13 07:17:41 +00:00
ed dacca18863 v1.5.6 2023-01-12 05:15:30 +00:00
ed 53d92cc0a6 faster upload of small files on high-latency nets 2023-01-12 02:53:22 +00:00
ed 434823f6f0 ui: allow changing num.threads in search-only 2023-01-11 16:14:02 +00:00
ed 2cb1f50370 fix dualstack on lo 2023-01-11 16:10:07 +00:00
ed 03f53f6392 gallery: fix js error on digit-keypress viewing pics 2023-01-11 16:08:15 +00:00
ed a70ecd7af0 v1.5.5 2022-12-30 07:54:34 +00:00
ed 8b81e58205 mdns fixes 2022-12-30 07:47:53 +00:00
ed 4500c04edf v1.5.4 2022-12-29 04:44:15 +00:00
ed 6222ddd720 fix ssdp on dualstack 2022-12-22 16:50:46 +00:00
ed 8a7135cf41 support fat32 time precision, avoiding rescans
posted from warzaw airport otw to japan
2022-12-20 22:19:32 +01:00
ed b4c7282956 password from file 2022-12-20 13:28:48 +00:00
ed 8491a40a04
Create SECURITY.md 2022-12-19 21:18:27 +00:00
ed 343d38b693 extend image-viewer with modern formats 2022-12-15 22:38:33 +00:00
ed 6cf53d7364 try next thumbnailer if one fails;
libvips assumes imagemagick was built with avif
2022-12-15 22:34:51 +00:00
ed b070d44de7 libvips logging + raise codec errors 2022-12-15 22:22:04 +00:00
ed 79aa40fdea cosmetic fixes 2022-12-14 23:12:51 +00:00
ed dcaff2785f v1.5.3 2022-12-13 19:56:34 +00:00
ed 497f5b4307 add hotkey to enable download mode 2022-12-13 19:50:20 +00:00
ed be32ad0da6 add sfx tester 2022-12-13 19:05:10 +00:00
ed 8ee2bf810b stop battleplan from indirectly crashing the browser 2022-12-13 18:58:16 +00:00
ed 28232656a9 folder-sync optimizations 2022-12-13 18:56:40 +00:00
ed fbc2424e8f v1.5.2 2022-12-12 22:59:31 +00:00
ed 94cd13e8b8 reorder help categories 2022-12-12 22:18:17 +00:00
ed 447ed5ab37 windows fixes 2022-12-12 21:59:50 +00:00
ed af59808611 u2cli: always compare toplevel in syncs 2022-12-12 07:16:05 +01:00
ed e3406a9f86 dont cls by default 2022-12-11 22:46:21 +00:00
ed 7fd1d6a4e8 rename --webroot to --rp-loc and fix related bugs 2022-12-11 21:09:50 +00:00
ed 0ab2a665de add example apache config + readme notes 2022-12-11 21:01:38 +00:00
ed 3895575bc2 add sliding window for upload eta 2022-12-11 19:46:39 +00:00
ed 138c2bbcbb o no 2022-12-11 18:30:29 +00:00
ed bc7af1d1c8 u2cli: add basic folder sync 2022-12-11 17:41:10 +00:00
ed 19cd96e392 cleanup + optimizations 2022-12-11 14:16:51 +00:00
ed db194ab519 support location-based rproxy 2022-12-10 23:43:31 +00:00
ed 02ad4bfab2 ensure consistency between db tables 2022-12-10 22:13:21 +00:00
ed 56b73dcc8a up2k: add option to replace existing file 2022-12-10 19:22:16 +00:00
ed 7704b9c8a2 sqlite durability profiles 2022-12-10 10:01:33 +00:00
ed 999b7ae919 safer to merge wal on startup instead 2022-12-09 19:58:13 +00:00
ed 252b5a88b1 use linklocal on NICs without routable IPs 2022-12-09 19:11:26 +00:00
ed 01e2681a07 davfs2 requires realm 2022-12-09 17:59:24 +00:00
ed aa32f30202 zeroconf: dont cache until resolved 2022-12-08 18:05:45 +00:00
ed 195eb53995 merge wal on shutdown 2022-12-07 23:09:40 +00:00
ed 06fa78f54a windows: set .hist folder hidden 2022-12-07 22:56:30 +00:00
ed 7a57c9dbf1 translation 2022-12-07 22:47:33 +00:00
ed bb657bfa85 more intuitive batch-unpost ordering 2022-12-07 22:30:48 +00:00
ed 87181726b0 sfx: fix multiprocessing on windows 2022-12-07 22:21:28 +00:00
ed f1477a1c14 block other copyparties from sniping tcp ports 2022-12-07 21:50:52 +00:00
ed 4f94a9e38b exe: survive ascii locales 2022-12-07 21:35:53 +00:00
ed fbed322d3b option to skip database syncs entirely 2022-12-07 21:35:04 +00:00
ed 9b0f519e4e switch to wal for ~2x faster uploads 2022-12-07 20:52:17 +00:00
ed 6cd6dadd06 optional linklocal ipv6 support (firefox/ie11 only) 2022-12-05 20:45:21 +00:00
ed 9a28afcb48 custom mediaplayer-toggle cursor 2022-12-05 19:46:48 +00:00
ed 45b701801d fix ssdp xml escaping + target url 2022-12-05 19:13:47 +00:00
ed 062246fb12 allow specifying zeroconf filters by subnet 2022-12-05 17:56:39 +00:00
ed 416ebfdd68 right, windows nic names have whitespace 2022-12-05 17:35:12 +00:00
ed 731eb92f33 fix exception opening the connect page on phones 2022-12-04 17:18:14 +00:00
ed dbe2aec79c v1.5.1 2022-12-03 20:48:52 +00:00
ed cd9cafe3a1 v1.5.0 2022-12-03 20:45:49 +00:00
ed 067cc23346 docs + cleanup 2022-12-03 18:58:56 +00:00
ed c573a780e9 some failsafes 2022-12-03 16:37:14 +00:00
ed 8ef4a0aa71 fix testrunner + packaging 2022-12-03 15:07:47 +00:00
ed 89ba12065c ssdp: add ie8 compat 2022-12-03 13:59:46 +00:00
ed 99efc290df fix mdns on windows 2022-12-03 13:31:00 +00:00
ed 2fbdc0a85e misc fixes / cleanup 2022-12-02 23:42:46 +00:00
ed 4242422898 update deps: marked.js, codemirror 2022-12-02 21:39:04 +00:00
ed 008d9b1834 add textbox placeholders 2022-12-02 18:33:04 +00:00
ed 7c76d08958 drop one of the slowloris detectors 2022-12-02 17:53:23 +00:00
ed 89c9f45fd0 add option for cross-volume dedupe 2022-12-02 17:25:37 +00:00
ed f107497a94 a bit better 2022-12-01 22:18:17 +00:00
ed b5dcf30e53 w/a firefox sometimes loading stale documents
never been able to reproduce it intentionally but this should work
2022-12-01 21:52:40 +00:00
ed 0cef062084 misc cleanup 2022-12-01 21:44:31 +00:00
ed 5c30148be4 also scroll to playing track when resizing window 2022-11-29 22:16:14 +00:00
ed 3a800585bc u2cli: server is allowed to reject dupes 2022-11-29 22:09:32 +00:00
ed 29c212a60e macos bigsur breaks on symlinks in ftp listings 2022-11-28 22:10:05 +00:00
ed 2997baa7cb better recovery from i/o errors 2022-11-28 22:06:31 +00:00
ed dc6bde594d fix make-sfx macos support 2022-11-28 21:38:50 +00:00
ed e357aa546c add browserchrome color hint 2022-11-28 21:19:42 +00:00
ed d3fe19c5aa misc fixes 2022-11-28 20:25:32 +00:00
ed bd24bf9bae option to follow playing song 2022-11-28 20:24:47 +00:00
ed ee141544aa option for compact mediaplayer 2022-11-28 20:10:10 +00:00
ed db6f6e6a23 option to hide scrollbars 2022-11-28 19:47:14 +00:00
ed c7d950dd5e ux tweaks + devdocs 2022-11-27 22:07:28 +00:00
ed 6a96c62fde ok windows is just gonna have to make do 2022-11-27 22:05:38 +00:00
ed 36dc8cd686 readme + misc 2022-11-27 01:30:18 +00:00
ed 7622601a77 forgot to actually enable the new landing page 2022-11-27 00:01:28 +00:00
ed cfd41fcf41 zeroconf: add network filtering options 2022-11-26 22:37:12 +00:00
ed f39e370e2a cosmetic 2022-11-26 22:27:09 +00:00
ed c1315a3b39 webdav: misc fixes 2022-11-26 20:06:48 +00:00
ed 53b32f97e8 ftp: support touch+write, windows-login, verbosity 2022-11-26 20:03:17 +00:00
ed 6c962ec7d3 rename copyparty-fuse to partyfuse 2022-11-26 20:01:20 +00:00
ed 6bc1bc542f rename copyparty-fuse to partyfuse 2022-11-26 19:53:41 +00:00
ed f0e78a6826 add landing page with mounting instructions 2022-11-26 19:47:27 +00:00
ed e53531a9fb ssdp: get rid of ipv6 + fix http port selection 2022-11-23 22:44:17 +00:00
ed 5cd9d11329 add ssdp responder 2022-11-22 21:40:12 +00:00
ed 5a3e504ec4 uninvent a square wheel 2022-11-22 19:12:41 +00:00
ed d6e09c3880 ux: dedicated column-hiding mode on phones 2022-11-21 20:44:58 +00:00
ed 04f44c3c7c add global option for rejecting dupe uploads 2022-11-21 10:58:15 +00:00
ed ec587423e8 show/hide tagsearch ui based on folder flags 2022-11-20 23:30:01 +00:00
ed f57b31146d improve parent-folder button on phones 2022-11-20 22:37:55 +00:00
ed 35175fd685 mdns: support primitive clients (android, rfc-6.7) 2022-11-20 20:31:11 +00:00
ed d326ba9723 ftp: ban password-bruteforcing IPs 2022-11-20 11:06:07 +00:00
ed ab655a56af add buttons for prev/next folder 2022-11-19 22:19:38 +00:00
ed d1eb113ea8 add button+hotkey to download all selected files 2022-11-19 21:57:25 +00:00
ed 74effa9b8d audioplayer: time at mousecursor while scrubbing 2022-11-19 20:00:50 +00:00
ed bba4b1c663 sfx: py3.12 support 2022-11-19 10:47:54 +00:00
ed 8709d4dba0 macos smb: avoid hang on shutdown 2022-11-17 21:17:54 +00:00
ed 4ad4657774 mdns: support running on macos 2022-11-17 20:18:24 +00:00
ed 5abe0c955c this spec is confusing 2022-11-17 09:08:58 +00:00
ed 0cedaf4fa9 isort 2022-11-15 22:41:35 +00:00
ed 0aa7d12704 add option to disable .hist/up2k.snap 2022-11-15 22:16:53 +00:00
ed a234aa1f7e cleaner shutdown of smbd, mdns 2022-11-15 21:55:02 +00:00
ed 9f68287846 workaround impacket glob bug 2022-11-15 21:29:02 +00:00
ed cd2513ec16 logging fixes 2022-11-15 21:28:27 +00:00
ed 91d132c2b4 add basic-ui hint for firefox 8 and older 2022-11-15 20:17:53 +00:00
ed 97ff0ebd06 xz-compress logs only if -lo ends with .xz 2022-11-15 20:16:41 +00:00
ed 8829f56d4c mdns ipv6 fixes; now works on ie11/safari, not linux:
* subscribe/announce on LL only
* add NSEC records if 4/6-only
2022-11-15 06:39:53 +00:00
ed 37c1cab726 dnslib tweaks for mdns / py3 2022-11-13 20:06:39 +00:00
ed b3eb117e87 add mdns zeroconf announcer 2022-11-13 20:05:16 +00:00
ed fc0a941508 support old linux consoles 2022-11-06 16:58:00 +00:00
ed c72753c5da add native ipv6 support 2022-11-06 16:48:05 +00:00
ed e442cb677a improve ftp/smb logging 2022-11-06 13:30:16 +00:00
ed 450121eac9 ftpd: kde tries to cwd into images 2022-11-05 13:24:00 +00:00
ed b2ab8f971e add config-file preprocessor (%include) 2022-11-04 23:48:14 +00:00
ed e9c6268568 add more sfx opt-outs 2022-11-04 20:50:52 +00:00
ed 2170ee8da4 improve scheduling 2022-11-04 20:28:05 +00:00
ed 357e7333cc cleanup 2022-11-04 20:27:16 +00:00
ed 8bb4f02601 add textlabel on volume slider 2022-11-04 20:04:39 +00:00
ed 4213efc7a6 optimize more 2022-11-04 19:33:48 +00:00
ed 67a744c3e8 audioplayer: optimize ui for week-long audio files 2022-11-03 23:20:58 +00:00
ed 98818e7d63 smb: workaround impacket response size limit 2022-11-03 23:17:24 +00:00
ed 8650ce1295 smb: too many clients get confused by blank password 2022-11-03 23:08:04 +00:00
ed 9638267b4c up2k-ui: survive hitting inaccessible subfolders 2022-11-02 22:02:46 +00:00
ed 304e053155 improve default-gateway / external-IP detection 2022-11-02 21:43:20 +00:00
ed 89d1f52235 cursory slowloris / buggy-webdav-client detector 2022-11-01 22:18:20 +00:00
ed 3312c6f5bd autoclose connection-flooding clients 2022-10-31 22:42:47 +00:00
ed d4ba644d07 autodefault -nc based on OS limits 2022-10-31 19:37:37 +00:00
ed b9a504fd3a x32/x64-agnostic exe builder 2022-10-30 18:35:27 +00:00
ed cebac523dc fix url anchors into markdown docs 2022-10-30 18:03:40 +00:00
ed c2f4090318 webdav: mute some macos spam 2022-10-30 17:45:28 +00:00
ed d562956809 webdav: windows configurator util 2022-10-30 17:41:33 +00:00
ed 62499f9b71 webdav: more sensible overwrite logic 2022-10-30 17:13:06 +00:00
ed 89cf7608f9 webdav: help windows deal with read-only volumes 2022-10-30 17:11:43 +00:00
ed dd26b8f183 webdav: bump chunksize from 2048 to 32760 byte 2022-10-30 16:53:15 +00:00
ed 79303dac6d webdav: default-disable recursive listing 2022-10-30 16:47:20 +00:00
ed 4203fc161b misc 2022-10-30 16:31:04 +00:00
ed f8a31cc24f chrome can play some mkv files 2022-10-30 16:12:47 +00:00
ed fc5bfe81a0 add hotkey '?' for hotkeys listing 2022-10-30 16:05:14 +00:00
ed aae14de796 mouse3 docs in the navpane 2022-10-30 13:13:58 +00:00
ed 54e1c8d261 remove 697 GiB upload filesize limit 2022-10-30 12:51:20 +00:00
ed a0cc4ca4b7 up2k-cli: enable mt if chrome 107 or later 2022-10-29 22:57:59 +00:00
ed 2701108c5b up2k-ui: suggest potato to avoid firefox-bug 1790500 2022-10-29 22:46:13 +00:00
ed 73bd2df2c6 more metadata-parser debug options 2022-10-29 21:59:59 +00:00
ed 0063021012 mtp-deps: add fedora support 2022-10-29 21:38:08 +00:00
ed 1c3e4750b3 better android howto 2022-10-29 20:46:22 +00:00
ed edad3246e0 make pylance happier 2022-10-29 20:40:25 +00:00
ed 3411b0993f fix msg-to-log 2022-10-26 02:35:32 +02:00
ed 097b5609dc support grapheneos 2022-10-26 02:35:10 +02:00
ed a42af7655e fix relative link 2022-10-26 02:32:24 +02:00
ed 69f78b86af cleanup 2022-10-25 01:23:41 +02:00
ed 5f60c509c6 smb: add better-than-nothing permission checks 2022-10-24 21:16:57 +02:00
ed 75e5e53276 readme refactor 2022-10-24 18:48:12 +02:00
ed 4b2b4ed52d smb: fix file rename 2022-10-24 16:08:02 +02:00
ed fb21bfd6d6 update localmount / rclone docs 2022-10-24 15:48:34 +02:00
ed f14369e038 webdav: mkdir semantics 2022-10-24 14:09:09 +02:00
ed ff04b72f62 smb: add mkdir/copy/rename/delete 2022-10-24 14:08:32 +02:00
ed 4535a81617 smb: add up2k-indexing on write 2022-10-24 13:44:19 +02:00
ed cce57b700b fix range-request on empty files 2022-10-24 03:26:32 +02:00
ed 5b6194d131 stop win10-webdav from flooding the server 2022-10-24 02:33:23 +02:00
ed 2701238cea reply raw markdown unless ?v 2022-10-24 02:10:07 +02:00
ed 835f8a20e6 default-enable webdav 2022-10-23 23:37:32 +02:00
ed f3a501db30 add SMB/CIFS server 2022-10-23 23:08:00 +02:00
ed 4bcd30da6b cleaner daemon instancing 2022-10-23 12:05:44 +02:00
ed 947dbb6f8a webdav mimetypes based on file extensions (for gnome) 2022-10-22 02:08:19 +02:00
ed 1c2fedd2bf let webdav replace empty files when sufficiently safe 2022-10-22 01:31:18 +02:00
ed 32e826efbc catch and discard macos metadata files 2022-10-22 01:15:54 +02:00
ed 138b932c6a add webdav move/delete 2022-10-22 00:04:51 +02:00
ed 6da2f53aad avoid macos tmpfiles-cleaner 2022-10-21 18:49:25 +02:00
ed 20eeacaac3 add webdav write support + fix http 200/201 2022-10-21 18:47:48 +02:00
ed 81d896be9f webdav notes 2022-10-19 15:52:19 +02:00
ed c003dfab03 unbold ansi grays 2022-10-19 15:30:17 +02:00
ed 20c6b82bec replace magic numbers with errno.* 2022-10-19 15:21:48 +02:00
ed 046b494b53 winpe support + windows webdav stuff 2022-10-19 00:06:48 +02:00
ed f0e98d6e0d win7 webdav workarounds 2022-10-18 20:52:12 +02:00
ed fe57321853 correct 401/403 usage for webdav 2022-10-18 20:29:06 +02:00
ed 8510804e57 initial webdav support 2022-10-18 19:36:52 +02:00
ed acd32abac5 v1.4.6 2022-10-13 21:37:05 +02:00
ed 2b47c96cf2 move licenses into module proper 2022-10-13 21:14:42 +02:00
ed 1027378bda language + cleanup 2022-10-13 20:43:30 +02:00
ed e979d30659 audioplayer: transcode wav to opus 2022-10-13 20:26:43 +02:00
ed 574db704cc packaging 2022-10-13 20:24:45 +02:00
ed fdb969ea89 explain why extractall is safe to use 2022-10-11 17:44:38 +02:00
ed 08977854b3 a e s t h e t i c 2022-10-09 22:56:27 +02:00
ed cecac64b68 v1.4.5 2022-10-09 11:19:40 +02:00
ed 7dabdade2a v1.4.4 2022-10-09 01:08:31 +02:00
ed e788f098e2 dont fallback to icons for waveforms 2022-10-09 00:38:56 +02:00
ed 69406d4344 readme + better window title 2022-10-09 00:04:02 +02:00
ed d16dd26c65 misc 2022-10-08 21:09:04 +02:00
ed 12219c1bea more fun with symlinks 2022-10-08 21:08:51 +02:00
ed 118bdcc26e 120x faster folder moves/renames 2022-10-08 19:11:03 +02:00
ed 78fa96f0f4 add unpost sanchk 2022-10-08 18:23:41 +02:00
ed c7deb63a04 actually thats just an android-firefox bug 2022-10-08 17:52:29 +02:00
ed 4f811eb9e9 hmac cache limit + android ux:
onscroll doesnt trigger so files dont load in
2022-10-08 17:46:04 +02:00
ed 0b265bd673 naming is hard 2022-10-08 16:34:04 +02:00
ed ee67fabbeb update readme 2022-10-08 14:25:13 +02:00
ed b213de7e62 update readme + tests 2022-10-08 14:18:52 +02:00
ed 7c01505750 phone ux 2022-10-08 14:11:25 +02:00
ed ae28dfd020 tweaks 2022-10-08 02:05:15 +02:00
ed 2a5a4e785f include filekeys in unpost list 2022-10-08 01:18:27 +02:00
ed d8bddede6a new permission G returns filekey on write-only uploads 2022-10-08 01:17:41 +02:00
ed b8a93e74bf fix default upload expiration + ux 2022-10-07 21:38:01 +02:00
ed e60ec94d35 draw qr-code as ansi colors 2022-10-07 01:04:23 +02:00
ed 84af5fd0a3 scale qr-code to fit console size 2022-10-07 00:59:44 +02:00
ed dbb3edec77 print qr-code on startup 2022-10-07 00:47:26 +02:00
ed d284b46a3e rice 2022-10-06 23:40:06 +02:00
ed 9fcb4d222b reserve names to avoid ie11 pollution 2022-10-06 01:33:34 +02:00
ed d0bb1ad141 v1.4.3 2022-09-26 22:37:54 +02:00
ed b299aaed93 fix some cases of deleted files not being forgotten 2022-09-26 22:19:46 +02:00
ed abb3224cc5 option to save a copy of corrupted uploads 2022-09-26 22:01:49 +02:00
ed 1c66d06702 cleanup versionchecks 2022-09-25 21:31:47 +02:00
ed e00e80ae39 v1.4.2 2022-09-25 14:36:10 +02:00
ed 4f4f106c48 add ability to forget uploads by deleting the files 2022-09-25 14:24:01 +02:00
ed a286cc9d55 fix printing big unicode messages 2022-09-25 14:04:35 +02:00
ed 53bb1c719b fix huge-filename trunc on ubuntu-20.04 zfs 2022-09-25 14:00:11 +02:00
ed 98d5aa17e2 notes on dealing with bitflips 2022-09-24 22:41:00 +02:00
ed aaaa80e4b8 v1.4.1 2022-09-24 14:45:50 +02:00
ed e70e926a40 support up2k uploads from old browsertabs 2022-09-24 14:35:51 +02:00
ed e80c1f6d59 mention how ffmpeg was built 2022-09-24 00:05:47 +02:00
ed 24de360325 v1.4.0 2022-09-23 22:53:51 +02:00
ed e0039bc1e6 syntax-hl: elixir, glsl, matlab, moonscript, nim, zig 2022-09-23 22:32:40 +02:00
ed ae5c4a0109 update webdeps + isort + readme 2022-09-23 22:32:04 +02:00
ed 1d367a0da0 cleanup 2022-09-23 20:37:37 +02:00
ed d285f7ee4a macos-safari support 2022-09-23 19:36:07 +02:00
ed 37c84021a2 up2k: folder-upload without drag/drop 2022-09-22 21:58:04 +02:00
ed 8ee9de4291 up2k: add separate sfx toggle 2022-09-22 20:12:25 +02:00
ed 249b63453b good api 2022-09-22 19:20:33 +02:00
ed 1c0017d763 up2k: upload-complete notification 2022-09-21 23:39:36 +02:00
ed df51e23639 playing next folder makes no sense in search results 2022-09-21 22:30:31 +02:00
ed 32e71a43b8 reinvent fail2ban 2022-09-21 22:27:20 +02:00
ed 47a1e6ddfa avoid windows funk 2022-09-21 08:25:44 +02:00
ed c5f41457bb add ffmpeg build notes 2022-09-21 08:17:26 +02:00
ed f1e0c44bdd better autocorrect for poor ffmpeg builds 2022-09-20 23:25:35 +02:00
ed 9d2e390b6a shrink the exe + add errorhandler 2022-09-20 21:40:56 +02:00
ed 75a58b435d reject anon ftp if anon has no read/write 2022-09-20 21:40:21 +02:00
ed f5474d34ac embed licenses 2022-09-20 20:11:38 +02:00
ed c962d2544f ux 2022-09-20 20:07:02 +02:00
ed 0b87a4a810 allow setting lifetimes from up2k ui 2022-09-19 23:49:07 +02:00
ed 1882afb8b6 whoops 2022-09-19 02:10:14 +02:00
ed 2270c8737a and audio seekpoints got floored to ints 2022-09-19 01:30:59 +02:00
ed d6794955a4 playback position covered up the waveform 2022-09-19 01:23:40 +02:00
ed f5520f45ef add pyinstaller 2022-09-19 00:59:54 +02:00
ed 9401b5ae13 add filetype detection for nameless uploads 2022-09-18 17:30:57 +02:00
ed df64a62a03 patch popen on windows-python <3.8 2022-09-18 15:09:41 +02:00
ed 09cea66aa8 add ability to set lifetime per-file during upload 2022-09-18 13:12:38 +02:00
ed 13cc33e0a5 support random filenames in bup too 2022-09-18 01:03:38 +02:00
ed ab36c8c9de fix tests 2022-09-18 00:16:40 +02:00
ed f85d4ce82f support alpine's ffmpeg 2022-09-17 23:56:32 +02:00
ed 6bec4c28ba add waveform seekbar 2022-09-17 23:40:37 +02:00
ed fad1449259 drop the redundant request for folders on navigation 2022-09-17 21:39:44 +02:00
ed 86b3b57137 smaller optimizations 2022-09-17 20:39:08 +02:00
ed b235037dd3 5x faster rendering of huge tagsets 2022-09-17 20:17:24 +02:00
ed 3108139d51 30% faster tags listing 2022-09-17 19:36:42 +02:00
ed 2ae99ecfa0 new upload modifiers:
* terse upload responser
* randomize filenames
2022-09-17 14:48:53 +02:00
ed e8ab53c270 fix read-only search positioning 2022-09-17 13:45:41 +02:00
ed 5e9bc1127d fix windows symlink creation 2022-09-17 13:27:54 +02:00
ed 415e61c3c9 prevent blanks from skipping ahead in the queue 2022-09-16 23:51:55 +02:00
ed 5152f37ec8 fix sfx keepalive across unix users 2022-09-16 22:19:59 +02:00
ed 0dbeb010cf fix symlinked filekeys 2022-09-16 21:41:17 +02:00
ed 17c465bed7 lazyload big folders; closes #11 2022-09-15 23:43:40 +02:00
ed add04478e5 multiprocessing: fix listening-socket config 2022-09-15 22:25:11 +02:00
ed 6db72d7166 optimizations / cleanup 2022-09-15 01:18:19 +02:00
ed 868103a9c5 more flexible --stackmon 2022-09-14 02:06:34 +02:00
ed 0f37718671 improve error messages 2022-09-14 01:56:16 +02:00
icxes fa1445df86 align grid items to left if there's not enough to fill a row 2022-09-12 00:58:54 +02:00
icxes a783e7071e add small margin to grid 2022-09-12 00:58:54 +02:00
icxes a9919df5af change justify-content depending on whether sidebar is open 2022-09-12 00:58:54 +02:00
icxes b0af31ac35 fix indentation? 2022-09-12 00:58:54 +02:00
icxes c4c964a685 simplify style and make gaps equal size 2022-09-12 00:58:54 +02:00
icxes 348ec71398 make grid items scale properly at different zoom levels 2022-09-12 00:58:54 +02:00
exci a257ccc8b3 try using grids for the.. grids 2022-09-12 00:58:54 +02:00
ed fcc4296040 mention the upcoming bugfix in chrome 2022-09-11 22:31:36 +02:00
ed 1684d05d49 dont crash chrome with too many unique SVGs 2022-09-11 11:47:26 +02:00
ed 0006f933a2 hmac uploader-ip when avoiding filename collisions 2022-09-11 08:27:45 +02:00
ed 0484f97c9c stop writing upload-summary textfiles,
can be reenabled with --write-uplog
2022-09-10 22:07:10 +02:00
ed e430b2567a add pyoxidizer (windows-only) 2022-09-10 17:33:04 +02:00
ed fbc8ee15da make firefox stop complaining 2022-09-08 19:22:51 +02:00
ed 68a9c05947 load eq ui early 2022-09-08 18:47:30 +02:00
ed 0a81aba899 fix wrong ETA after failed handshakes +
tooltip-hint positioning on bottom-most elements
2022-09-07 23:34:43 +02:00
ed d2ae822e15 more socket cleanup fiddling 2022-09-07 23:06:12 +02:00
ed fac4b08526 firefox may forget FDs during upload; warn about it 2022-09-07 23:03:48 +02:00
ed 3a7b43c663 dodge firefox race (thx exci) 2022-09-07 21:27:36 +02:00
ed 8fcb2d1554 defer actx until needed (audioplayer, uploads) and
try to be less reliant on the actx speedhack for upload performance
2022-09-07 21:08:09 +02:00
ed 590c763659 add unforgetti beam 2022-09-07 08:09:32 +02:00
ed 11d1267f8c option to keep files in index when deleted 2022-09-07 01:07:21 +02:00
ed 8f5bae95ce fix visual glitches in upload ui 2022-09-07 00:38:19 +02:00
ed e6b12ef14c hide warnings when they are remedied 2022-09-07 00:29:26 +02:00
ed b65674618b fix ui bug on upload-queues >= 1 TiB large 2022-09-06 23:24:58 +02:00
ed 20dca2bea5 mtp: add guestbook reader 2022-09-05 20:23:59 +02:00
ed 059e93cdcf u2cli: fix py3.5 support + better deps warning 2022-09-05 18:24:18 +02:00
ed 635ab25013 up2k.js: defer worker startup until needed 2022-09-05 00:55:52 +02:00
ed 995cd10df8 bump timeouts for zfs / bursty filesystems 2022-09-04 21:21:54 +02:00
ed 50f3820a6d downgrade severity of some transient errors 2022-09-04 12:53:49 +02:00
ed 617f3ea861 up2k-hook-ytid: discover related files in subfolders 2022-09-04 12:20:40 +02:00
ed 788db47b95 option to let mtp's keep stdout/stderr 2022-09-04 01:42:28 +02:00
ed 5fa8aaabb9 up2k-hook-ytid: comment-field example 2022-09-04 00:06:42 +02:00
ed 89d1af7f33 this actually serves a purpose but please dont ask 2022-09-03 20:19:16 +02:00
ed 799cf27c5d restore .bin-suffix for nameless PUT/POSTs
disappeared in v1.0.11
2022-09-03 19:59:59 +02:00
ed c930d8f773 add mtp debug mode 2022-09-03 19:58:10 +02:00
ed a7f921abb9 up2k-hook-ytid: support tiny files 2022-09-03 15:08:08 +02:00
ed bc6234e032 parallel socket shutdown 2022-08-31 08:38:34 +02:00
ed 558bfa4e1e siocoutq-based shutdown 2022-08-31 01:16:09 +02:00
ed 5d19f23372 accurate num.cores detection 2022-08-29 19:24:48 +02:00
ed 27f08cdbfa better isNaN + fade + fix preload seek:
* use Number.isFinite or shim it, rejecting strings
* fade-in/out was too quick on volumes < 100%
* fades (especially -out) was too slow on chrome
* seek to start if playing into the previously played file
* and let π raise if it wants to
2022-08-29 19:23:23 +02:00
ed 993213e2c0 mtp/vidchk: support stuff like rag-prep 2022-08-24 23:25:03 +02:00
ed 49470c05fa well that was dumb 2022-08-23 00:03:04 +02:00
ed ee0a060b79 mention the chrome gc bugs 2022-08-20 09:25:29 +02:00
ed 500e3157b9 v1.3.16 2022-08-18 19:24:06 +02:00
ed eba86b1d23 default-disable mt on https-desktop-chrome 2022-08-18 19:01:33 +02:00
ed b69a563fc2 gc massage 2022-08-18 18:03:33 +02:00
ed a900c36395 v1.3.15 2022-08-18 01:02:19 +02:00
ed 1d9b324d3e explain w/a wasm leaks in workers (chrome bug) 2022-08-18 01:02:06 +02:00
ed 539e7b8efe help chrome gc by reusing one filereader 2022-08-18 00:05:32 +02:00
ed 50a477ee47 up2k-hook-ytid: upload into subdirs by id 2022-08-15 21:52:41 +02:00
ed 7000123a8b v1.3.14 2022-08-15 20:25:31 +02:00
ed d48a7d2398 provide tagparsers with uploader info 2022-08-15 20:23:17 +02:00
ed 389a00ce59 v1.3.13 2022-08-15 19:11:21 +02:00
ed 7a460de3c2 windows db fix 2022-08-15 18:01:28 +02:00
ed 8ea1f4a751 idx multimedia format/container type 2022-08-15 17:56:13 +02:00
ed 1c69ccc6cd v1.3.12 2022-08-13 00:58:49 +02:00
ed 84b5bbd3b6 u2cli: bail from recursive symlinks + verbose errors 2022-08-13 00:28:08 +02:00
ed 9ccd327298 add directory hashing (boots ~3x faster) 2022-08-12 23:17:18 +02:00
ed 11df36f3cf add option to exit after scanning volumes 2022-08-12 21:20:13 +02:00
ed f62dd0e3cc support fips-cpython and maybe make-sfx on macos 2022-08-12 16:36:20 +02:00
ed ad18b6e15e stop reindexing empty files on startup 2022-08-12 16:31:36 +02:00
ed c00b80ca29 v1.3.11 2022-08-10 23:35:21 +02:00
ed 92ed4ba3f8 parallelize python hashing too 2022-08-10 23:12:01 +02:00
ed 7de9775dd9 lol android 2022-08-10 20:35:12 +02:00
ed 5ce9060e5c up2k.js: do hashing in web-workers 2022-08-10 01:09:54 +02:00
ed f727d5cb5a new cloudflare memes, thx nh 2022-08-09 09:00:22 +02:00
ed 4735fb1ebb u2cli: better msg on bad tls certs 2022-08-09 00:11:34 +02:00
ed c7d05cc13d up2k-hook-ytid: log discovered IDs + support audio rips 2022-08-05 19:26:24 +02:00
ed 51c152ff4a indicate sqlite thread-safety + some cleanup 2022-08-05 01:20:16 +02:00
ed eeed2a840c v1.3.10 2022-08-04 01:40:14 +02:00
ed 4aaa111925 v1.3.9 2022-08-04 00:39:37 +02:00
ed e31248f018 include version info on startup and in crash dumps 2022-08-04 00:11:52 +02:00
ed 8b4cf022f2 bbox: tweak end-of-gallery animation 2022-08-03 22:56:51 +02:00
ed 4e7455268a tag-scanner perf 2022-08-03 22:33:20 +02:00
ed 680f8ae814 add xdev/xvol indexing guards 2022-08-03 22:20:28 +02:00
ed 90555a4cea clean-shutdown while hashing huge files 2022-08-03 21:06:10 +02:00
ed 56a62db591 force-exit by hammering ctrl-c 2022-08-03 20:58:23 +02:00
ed cf51997680 fix make-sfx.sh on windows/msys2 2022-08-03 20:01:54 +02:00
ed f05cc18d61 add missing polyfill 2022-08-03 19:42:42 +02:00
ed 5384c2e0f5 reentrant cleanup 2022-08-02 20:56:05 +02:00
ed 9bfbf80a0e ui: fix navpane covering files on horizontal scroll 2022-08-02 20:48:26 +02:00
ed f874d7754f ui: toggle sorting folders before files (default-on) 2022-08-02 20:47:17 +02:00
ed a669f79480 windows upload perf (fat32, smb) 2022-08-02 20:39:51 +02:00
ed 1c3894743a fix filekeys inside symlinked volumes 2022-08-02 20:26:51 +02:00
ed 75cdf17df4 cache sparsefile-support on windows too 2022-08-02 06:58:25 +02:00
ed de7dd1e60a more visible upload errors on mobile 2022-08-02 06:17:13 +02:00
ed 0ee574a718 forget uploads that failed to initialize 2022-08-02 06:15:18 +02:00
ed faac894706 oh 2022-07-29 00:13:18 +02:00
ed dac2fad48e v1.3.8 2022-07-27 16:07:26 +02:00
ed 77f624b01e improve shumantime + use it everywhere 2022-07-27 15:07:04 +02:00
ed e24ffebfc8 indicate write-activity on splashpage 2022-07-27 14:53:15 +02:00
ed 70d07d1609 perf 2022-07-27 14:01:30 +02:00
ed bfb3303d87 include client total ETA in upload logs 2022-07-27 12:07:51 +02:00
ed 660705a436 defer volume reindexing on db activity 2022-07-27 11:48:47 +02:00
ed 74a3f97671 cleanup + bump deps 2022-07-27 00:15:49 +02:00
ed b3e35bb494 async lsof w/ timeout 2022-07-26 22:38:13 +02:00
ed 76adac7c72 up2k-hook-ytid: add mp4/webm/mkv metadata scanner 2022-07-26 22:09:18 +02:00
ed 5dc75ebb67 async e2ts / e2v + forget deleted shadowed 2022-07-26 12:47:40 +02:00
ed d686ce12b6 lsof db on stuck transaction 2022-07-25 02:07:59 +02:00
ed d3c40a423e mutagen: support nullduration tags 2022-07-25 01:21:34 +02:00
ed 2fb1e6dab8 mute exception on zip abort 2022-07-25 01:20:38 +02:00
ed 10430b347f fix dumb prisonparty bug 2022-07-22 20:49:35 +02:00
ed e0e3f6ac3e up2k-hook-ytid: add override 2022-07-22 10:47:10 +02:00
ed c694cbffdc a11y: improve skip-to-files 2022-07-20 23:44:57 +02:00
ed bdd0e5d771 a11y: enter = onclick 2022-07-20 23:32:02 +02:00
ed aa98e427f0 audio-eq: add crossfeed 2022-07-20 01:54:59 +02:00
ed daa6f4c94c add video hotkeys for digit-seeking 2022-07-17 23:45:02 +02:00
ed 4a76663fb2 ensure free disk space 2022-07-17 22:33:08 +02:00
ed cebda5028a v1.3.7 2022-07-16 20:48:23 +02:00
ed 3fa377a580 sqlite diag 2022-07-16 20:43:26 +02:00
ed a11c1005a8 v1.3.6 2022-07-16 03:58:58 +02:00
ed 4a6aea9328 hopefully got this right 2022-07-16 02:24:53 +02:00
ed 4ca041e93e improve autopotato accuracy 2022-07-16 02:23:50 +02:00
ed 52a866a405 batch progress writes 2022-07-16 02:12:56 +02:00
ed 8b6bd0e6ac rescue some exceptions from the promise maelstroms 2022-07-15 23:42:37 +02:00
ed 780fc4639a bbox: chrome doesnt override video onclick 2022-07-15 22:36:35 +02:00
ed 3692fc9d83 bbox: doubletap pic for fullscreen 2022-07-15 22:29:44 +02:00
ed c2a0b1b4c6 autopotato 2022-07-15 02:39:32 +02:00
ed 21bbdb5419 fix audio-eq on recent chromes 2022-07-15 02:07:48 +02:00
ed aa1c08962c golf 2022-07-15 02:07:13 +02:00
ed 8a5d0399dd sfx: dont hang supervisors 2022-07-15 02:04:00 +02:00
ed f2cd0b0c4a sfx: avoid name collisions across reboots 2022-07-15 02:03:41 +02:00
ed c2b66bbe73 add potato mode 2022-07-14 02:33:35 +02:00
ed 48b957f1d5 add -e2v (file integrity checker) 2022-07-13 00:48:39 +02:00
ed 3683984c8d abort volume indexing on ^C 2022-07-12 21:46:07 +02:00
ed a3431512d8 push queue/status info to server 2022-07-12 21:22:02 +02:00
ed d832b787e7 upload smallest-file-first by default 2022-07-12 20:48:38 +02:00
ed 6f75b02723 misc 2022-07-12 03:16:30 +02:00
ed b8241710bd md-editor fixes 2022-07-12 02:53:33 +02:00
ed d638404b6a better runahead strategy for 100 GiB+ files 2022-07-12 02:30:49 +02:00
ed 9362ca3ed9 py2 fixes 2022-07-11 23:53:18 +02:00
ed d1a03c6d17 zerobyte semantics 2022-07-11 23:17:33 +02:00
ed c6c31702c2 cheaper file deletion 2022-07-11 01:50:18 +02:00
ed bd2d88c96e add another up2k-hook example 2022-07-11 00:52:59 +02:00
ed 76b1857e4e add support for up2k hooks 2022-07-09 14:02:35 +02:00
ed 095bd17d10 mtp/vidchk: grab some frames at the start too 2022-07-09 13:10:00 +02:00
ed 204bfac3fa mtp/vidchk: write ffprobe metadata to file 2022-07-09 04:33:19 +02:00
ed ac49b0ca93 mtp: add rclone uploader 2022-07-08 23:47:27 +02:00
ed c5b04f6fef mtp daisychaining 2022-07-08 22:29:05 +02:00
ed 5c58fda46d only clean thumbs if there are thumbs to clean 2022-07-08 21:13:10 +02:00
ed 062730c70c cleanup 2022-07-06 11:12:36 +02:00
ed cade1990ce v1.3.5 2022-07-06 02:29:11 +02:00
ed 59b6e61816 build fstab from relabels when mtab is unreadable 2022-07-06 02:28:34 +02:00
ed daff7ff158 v1.3.4 2022-07-06 00:12:10 +02:00
ed 0862860961 misc cleanup 2022-07-06 00:00:56 +02:00
ed 1cb24045a0 dont thumb empty files 2022-07-05 23:45:47 +02:00
ed 622358b172 flag to control mtp timeout kill behavior 2022-07-05 23:38:49 +02:00
ed 7998884a9d adopt the osd hider 2022-07-05 23:36:44 +02:00
ed 51ddecd101 improve readme 2022-07-05 23:27:48 +02:00
ed 7a35ab1d1e bbox: video seek / loop url params 2022-07-05 20:37:05 +02:00
ed 48564ba52a bbox: add A-B video loop 2022-07-05 19:53:43 +02:00
ed 49efffd740 bbox: tap left/right side of image for prev/next 2022-07-05 19:33:09 +02:00
ed d6ac224c8f bbox: tap to show/hide buttons 2022-07-05 19:18:21 +02:00
ed a772b8c3f2 bbox: add fullscreen for images too 2022-07-05 19:06:02 +02:00
ed b580953dcd bbox: fix crash on swipe during close 2022-07-05 18:49:52 +02:00
ed d86653c763 ux 2022-07-05 00:13:08 +02:00
ed dded4fca76 option to specify favicon + default-enable it 2022-07-05 00:06:22 +02:00
ed 36365ffa6b explain the donut 2022-07-04 22:17:37 +02:00
ed 0f9aeeaa27 bump codemirror to 5.65.6 2022-07-04 22:15:52 +02:00
ed d8ebcd0ef7 lol dpi 2022-07-04 22:13:28 +02:00
ed 6e445487b1 satisfy cloudflare DDoS protection 2022-07-03 16:04:28 +02:00
ed 6605e461c7 improve mtp section 2022-07-03 14:23:56 +02:00
ed 40ce4e2275 cleanup 2022-07-03 13:55:48 +02:00
ed 8fef9e363e recursive kill mtp on timeout 2022-07-03 04:57:15 +02:00
ed 4792c2770d fix a spin 2022-07-03 02:39:15 +02:00
ed 87bb49da36 new mtp: video integrity checker 2022-07-03 01:50:38 +02:00
ed 1c0071d9ce perf 2022-07-03 01:40:30 +02:00
ed efded35c2e ffmpeg saying the fps is 1/0 yeah okay 2022-07-02 00:39:46 +02:00
ed 1d74240b9a ux: hide uploads table until something happens 2022-07-01 09:16:23 +02:00
ed 098184ff7b add write-only up2k ui simplifier 2022-07-01 00:55:36 +02:00
ed 4083533916 vt100 listing: reset color at eof 2022-06-29 22:41:51 +02:00
ed feb1acd43a v1.3.3 2022-06-27 22:57:05 +02:00
ed a9591db734 cleanup 2022-06-27 22:56:29 +02:00
ed 9ebf148cbe support android9 sdcardfs on sdcard 2022-06-27 22:15:35 +02:00
ed a473e5e19a always include custom css/js 2022-06-27 17:24:30 +02:00
ed 5d3034c231 detect sparse support from st_blocks 2022-06-23 18:23:42 +02:00
ed c3a895af64 android sdcardfs can be fat32 2022-06-23 16:27:30 +02:00
ed cea5aecbf2 v1.3.2 2022-06-20 01:31:29 +02:00
ed 0e61e70670 audioplayer continues to next folder by default 2022-06-20 00:20:13 +02:00
ed 1e333c0939 fix doc traversal 2022-06-19 23:32:36 +02:00
ed 917b6ec03c naming 2022-06-19 22:58:20 +02:00
ed fe67c52ead configurable list of sparse-supporting filesystems +
close nonsparse files after each write to force flush
2022-06-19 22:38:52 +02:00
ed 909c7bee3e ignore md plugin errors 2022-06-19 20:28:45 +02:00
ed 27ca54d138 md: ol appeared as ul 2022-06-19 19:05:41 +02:00
ed 2147c3a646 run markdown plugins in directory listings 2022-06-19 18:17:22 +02:00
ed a99120116f ux: breadcrumb ctrl-click 2022-06-19 17:51:03 +02:00
ed 802efeaff2 dont let tags imply subdirectories when renaming 2022-06-19 16:06:39 +02:00
ed 9ad3af1ef6 misc tweaks 2022-06-19 16:05:48 +02:00
ed 715727b811 add changelog 2022-06-17 15:33:57 +02:00
ed c6eaa7b836 aight good to know 2022-06-17 00:37:56 +02:00
ed c2fceea2a5 v1.3.1 2022-06-16 21:56:12 +02:00
ed 190e11f7ea update deps + misc 2022-06-16 21:43:40 +02:00
ed ad7413a5ff add .PARTIAL suffix to bup uploads too +
aggressive limits checking
2022-06-16 21:00:41 +02:00
ed 903b9e627a ux snappiness + keepalive on http-1.0 2022-06-16 20:33:09 +02:00
ed c5c1e96cf8 ux: button to reset hidden columns 2022-06-16 19:06:28 +02:00
ed 62fbb04c9d allow moving files between filesystems 2022-06-16 18:46:50 +02:00
ed 728dc62d0b optimize nonsparse uploads (fat32, exfat, hpfs) 2022-06-16 17:51:42 +02:00
ed 2dfe1b1c6b add themes: hacker, hi-con 2022-06-16 12:21:21 +02:00
ed 35d4a1a6af ux: delay loading animation + focus outlines + explain ng 2022-06-16 11:02:05 +02:00
ed eb3fa5aa6b add safety profiles + improve helptext + speed 2022-06-16 10:21:44 +02:00
ed 438384425a add types, isort, errorhandling 2022-06-16 01:07:15 +02:00
ed 0b6f102436 fix multiprocessing ftpd 2022-06-12 16:37:56 +02:00
ed c9b7ec72d8 add hotkey Y to download current song / vid / pic 2022-06-09 17:23:11 +02:00
ed 256c7f1789 add option to see errors from mtp parsers 2022-06-09 14:46:35 +02:00
ed 4e5a323c62 more cleanup 2022-06-08 01:05:35 +02:00
ed f4a3bbd237 fix ansify prepending bracket to all logfiles 2022-06-07 23:45:54 +02:00
ed fe73f2d579 cleanup 2022-06-07 23:08:43 +02:00
ed f79fcc7073 discover local ip under termux 2022-06-07 23:03:16 +02:00
ed 4c4b3790c7 fix read-spin on d/c during json post + errorhandling 2022-06-07 19:02:52 +02:00
ed bd60b464bb fix misleading log-msg 2022-06-07 14:12:55 +02:00
ed 6bce852765 ux: treepar positioning 2022-06-06 22:05:13 +02:00
ed 3b19a5a59d improve a11y jumpers 2022-05-25 20:31:12 +02:00
ed f024583011 add a11y jumpers 2022-05-24 09:09:54 +02:00
ed 1111baacb2 v1.3.0 2022-05-22 17:02:38 +02:00
ed 1b9c913efb update deps (marked, codemirror, prism) 2022-05-22 16:49:18 +02:00
ed 3524c36e1b tl 2022-05-22 16:04:10 +02:00
ed cf87cea9f8 ux, tl 2022-05-21 11:32:25 +02:00
ed bfa34404b8 ux tweaks 2022-05-19 18:00:33 +02:00
ed 0aba5f35bf add confirms on colhide, bigtxt 2022-05-19 17:59:33 +02:00
ed 663bc0842a ux 2022-05-18 19:51:25 +02:00
ed 7d10c96e73 grammar 2022-05-18 19:33:20 +02:00
ed 6b2720fab0 dont switch to treeview on play into next folder 2022-05-18 19:24:47 +02:00
ed e74ad5132a persist videoplayer prefs 2022-05-18 19:17:21 +02:00
ed 1f6f89c1fd apply default-language to splashpage 2022-05-18 19:02:36 +02:00
ed 4d55e60980 update flat-light ss 2022-05-16 19:01:32 +02:00
ed ddaaccd5af ux tweaks 2022-05-16 18:56:53 +02:00
ed c20b7dac3d ah whatever, still 16 years left 2022-05-15 17:23:52 +02:00
ed 1f779d5094 zip: add ntfs and unix extensions for utc time 2022-05-15 16:13:49 +02:00
ed 715401ca8e fix timezone in search, zipfiles, fuse 2022-05-15 13:51:44 +02:00
ed e7cd922d8b translate splashpage and search too 2022-05-15 13:20:52 +02:00
ed 187feee0c1 add norwegian translation 2022-05-14 23:25:40 +02:00
ed 49e962a7dc dbtool: faster, add examples,
match on hashes rather than paths by default,
add no-clobber option to keep existing tags
2022-05-14 12:44:05 +02:00
ed 633ff601e5 perf + ux 2022-05-14 00:13:06 +02:00
ed 331cf37054 show loading progress for huge documents 2022-05-13 23:02:20 +02:00
ed 23e4b9002f support ?doc=mojibake 2022-05-13 18:10:55 +02:00
ed c0de3c8053 v1.2.11 2022-05-13 17:24:50 +02:00
ed a82a3b084a make search results unselectable 2022-05-13 17:18:19 +02:00
ed 67c298e66b don't embed huge docs (defer to ajax), closes #9 2022-05-13 17:08:17 +02:00
ed c110ccb9ae v1.2.10 2022-05-13 01:44:00 +02:00
ed 0143380306 help the query planner 2022-05-13 01:41:39 +02:00
ed af9000d3c8 v1.2.9 2022-05-12 23:10:54 +02:00
ed 097d798e5e steal colors from monokai 2022-05-12 23:06:37 +02:00
ed 1d9f9f221a louder 2022-05-12 20:55:37 +02:00
ed 214a367f48 be loud about segfaults and such 2022-05-12 20:26:48 +02:00
ed 2fb46551a2 avoid pointless recursion + show scan summary 2022-05-09 23:43:59 +02:00
ed 6bcf330ae0 symlink-checker: print base vpath in nonverbose mode 2022-05-09 20:17:03 +00:00
ed 2075a8b18c skip nonregular files when indexing filesystem 2022-05-09 19:56:17 +00:00
ed 1275ac6c42 start up2k indexing even if no interfaces could bind 2022-05-09 20:38:06 +02:00
ed 708f20b7af remove option to disable spa 2022-05-08 14:29:05 +02:00
ed a2c0c708e8 focus password field if not logged in 2022-05-07 22:16:12 +02:00
ed 2f2c65d91e improve up2k error messages 2022-05-07 22:15:09 +02:00
ed cd5fcc7ca7 fix file sel/play background on focus 2022-05-06 21:15:18 +02:00
ed aa29e7be48 minimal support for browsers without css-variables 2022-05-03 00:52:26 +02:00
ed 93febe34b0 truncate huge ffmpeg errors 2022-05-03 00:32:00 +02:00
ed f086e6d3c1 best-effort recovery when chrome desyncs the mediaSession 2022-05-02 19:08:37 +02:00
ed 22e51e1c96 compensate for play/pause fades by rewinding a bit 2022-05-02 19:07:16 +02:00
ed 63a5336f31 change modal ok/cancel focus with left/right keys 2022-05-02 19:06:51 +02:00
ed bfc6c53cc5 ux 2022-05-02 19:06:08 +02:00
ed 236017f310 better dropzones on small screens 2022-05-02 01:08:31 +02:00
ed 0a1d9b4dfd nevermind, not reliable when rproxied 2022-05-01 22:35:34 +02:00
ed b50d090946 add logout on inactivity + related errorhandling 2022-05-01 22:12:25 +02:00
ed 00b5db52cf notes 2022-05-01 12:02:27 +02:00
ed 24cb30e2c5 support login from ie4 / win3.11 2022-05-01 11:42:19 +02:00
ed 4549145ab5 fix filekeys in basic-html browser 2022-05-01 11:29:51 +02:00
ed 67b0217754 cleanup + readme 2022-04-30 23:37:27 +02:00
ed ccae9efdf0 safer systemd example (unprivileged user + NAT for port 80 / 443) 2022-04-30 23:28:51 +02:00
ed 59d596b222 add service to autogenerate TLS certificates 2022-04-30 22:54:35 +02:00
ed 4878eb2c45 support symlinks as volume root 2022-04-30 20:26:26 +02:00
ed 7755392f57 redirect to webroot after login 2022-04-30 18:15:09 +02:00
ed dc2ea20959 v1.2.8 2022-04-30 02:16:34 +02:00
ed 8eaea2bd17 ux 2022-04-30 00:37:31 +02:00
ed 58e559918f fix dynamic tree sizing 2022-04-30 00:04:06 +02:00
ed f38a3fca5b case-insensitive cover check 2022-04-29 23:39:16 +02:00
ed 1ea145b384 wow when did that break 2022-04-29 23:37:38 +02:00
ed 0d9567575a avoid hashing busy uploads during rescan 2022-04-29 23:16:23 +02:00
ed e82f176289 fix deadlock on rescan during upload 2022-04-29 23:14:51 +02:00
ed d4b51c040e doc + ux 2022-04-29 23:13:37 +02:00
ed 125d0efbd8 good stuff 2022-04-29 02:06:56 +02:00
ed 3215afc504 immediately search on enter key 2022-04-28 22:53:37 +02:00
ed c73ff3ce1b avoid sqlite deadlock on windows 2022-04-28 22:46:53 +02:00
ed f9c159a051 add option to force up2k turbo + hide warning 2022-04-28 21:57:37 +02:00
ed 2ab1325c90 add option to load more search results 2022-04-28 21:55:01 +02:00
ed 5b0f7ff506 perfect 2022-04-28 10:36:56 +02:00
ed 9269bc84f2 skip more stuff windows doesn't like 2022-04-28 10:31:10 +02:00
ed 4e8b651e18 too much effort into this joke 2022-04-28 10:29:54 +02:00
ed 65b4f79534 add themes "vice" and "hot dog stand" 2022-04-27 22:33:01 +02:00
ed 5dd43dbc45 ignore bugs in chrome v102 2022-04-27 22:32:11 +02:00
ed 5f73074c7e fix audio playback on first visit 2022-04-27 22:31:33 +02:00
ed f5d6ba27b2 handle invalid headers better 2022-04-27 22:30:19 +02:00
ed 73fa70b41f fix mostly-harmless xss 2022-04-27 22:29:16 +02:00
ed 2a1cda42e7 avoid deadlocks on windows 2022-04-27 22:27:49 +02:00
ed 1bd7e31466 more theme porting 2022-04-26 00:42:00 +02:00
ed eb49e1fb4a conditional up2k column sizes depending on card 2022-04-24 23:48:23 +02:00
ed 9838c2f0ce golf 2022-04-24 23:47:15 +02:00
ed 6041df8370 start replacing class-scopes with css variables 2022-04-24 23:46:38 +02:00
ed 2933dce3ef mtime blank uploads + helptext 2022-04-24 22:58:11 +02:00
ed dab377d37b v1.2.7 2022-04-16 23:44:28 +02:00
ed f35e41baf1 allow unposting with write-only access 2022-04-16 23:35:04 +02:00
ed c4083a2942 v1.2.6 2022-04-15 20:09:50 +02:00
ed 36c20bbe53 fix setting mtime on windows 2022-04-15 20:08:55 +02:00
ed e34634f5af v1.2.5 2022-04-15 19:42:40 +02:00
ed cba9e5b669 add hardlinks (symlink alternative) for up2k dedup 2022-04-15 19:13:53 +02:00
ed 1f3c46a6b0 forgot some css files 2022-04-15 17:11:46 +02:00
ed 799a5ffa47 v1.2.4 2022-04-14 21:45:22 +02:00
ed b000707c10 detect poor ffmpeg builds 2022-04-14 18:20:48 +02:00
ed feba4de1d6 make gallery linkable 2022-04-14 17:12:56 +02:00
ed 951fdb27ca dont scan orphaned volumes 2022-04-14 17:11:51 +02:00
ed 9697fb3d84 option to disable thumbnails per volume 2022-04-14 17:11:26 +02:00
ed 2dbed4500a add flat theme 2022-04-14 16:57:51 +02:00
ed fd9d0e433d thumbnails: try FFmpeg for images too 2022-04-11 10:38:57 +02:00
ed f096f3ef81 thumbnails: disable pdf because too scary 2022-04-10 23:02:09 +02:00
ed cc4a063695 thumbnails: per-decoder filetype config 2022-04-10 22:59:45 +02:00
ed b64cabc3c9 thumbnails: add pyvips as alt/supp. to pillow 2022-04-10 14:16:09 +02:00
ed 3dd460717c add flat theme 2022-04-09 23:05:54 +02:00
ed bf658a522b naming 2022-04-09 20:41:08 +02:00
ed e9be7e712d futureproof clipboard function 2022-04-09 19:38:05 +02:00
ed e40cd2a809 optimize window resizing 2022-04-09 19:20:09 +02:00
ed dbabeb9692 gallery: add animation preferences 2022-04-09 17:23:54 +02:00
ed 8dd37d76b0 fix drifting resize 2022-04-09 14:37:25 +02:00
ed fd475aa358 textviewer: translate basic ansi/sgr colors 2022-04-09 00:50:54 +02:00
ed f0988c0e32 filter some volflags from up2k dump 2022-04-08 21:56:24 +02:00
ed 0632f09bff rhel8 ignores flock and kills us anyways 2022-04-08 21:29:31 +02:00
ed ba599aaca0 explain systemd jank 2022-04-08 20:39:22 +02:00
ed ff05919e89 support mpc/musepack audio (streaming + thumbnailing) 2022-04-02 22:17:16 +02:00
ed 52e63fa101 dont crash when mediaplayer config is changed while music isnt playing 2022-03-28 23:17:02 +02:00
ed 96ceccd12a v1.2.3 2022-03-24 02:35:53 +01:00
ed 87994fe006 retry failed uploads with backoff 2022-03-24 02:29:59 +01:00
ed fa12c81a03 zip-download files older than 1980-01-01 2022-03-24 01:31:50 +01:00
ed 344ce63455 basic-browser is implicitly not js 2022-03-21 01:20:47 +01:00
ed ec4daacf9e v1.2.2 2022-03-20 06:15:57 +01:00
ed f3e8308718 eh, better as volflags 2022-03-20 05:45:07 +01:00
ed 515ac5d941 show textfile name in document title 2022-03-20 03:40:21 +01:00
ed 954c7e7e50 add option to request noindex from crawlers 2022-03-20 03:23:42 +01:00
ed 67ff57f3a3 add option to disable html folder listings 2022-03-20 02:45:53 +01:00
ed c10c70c1e5 misc 2022-03-04 21:30:31 +01:00
ed 04592a98d2 include all IPs + link status in server url listing 2022-03-04 21:29:28 +01:00
ed c9c4aac6cf v1.2.1 2022-03-03 01:26:29 +01:00
ed 8b2c7586ce minimal py2 support for ftpd 2022-03-03 01:18:01 +01:00
ed 32e22dfe84 vendor asynchat for pyftpdlib 2022-03-03 01:16:52 +01:00
ed d70b885722 failed attempt at upgrading scp 2022-03-03 00:17:03 +01:00
ed ac6c4b13f5 add plaintext volume listing 2022-03-02 21:20:19 +01:00
ed ececdad22d and increase debounce a bit 2022-03-02 01:56:05 +01:00
ed bf659781b0 try some more spacing 2022-03-02 01:49:15 +01:00
ed 2c6bb195a4 search: get rid of inner-joins to fix -tags 2022-03-02 00:35:04 +01:00
ed c032cd08b3 prisonparty: clean exit on sigterm/int 2022-02-27 20:07:28 +01:00
ed 39e7a7a231 sfx: prefer system pyftpdlib if available 2022-02-13 21:00:13 +01:00
ed 6e14cd2c39 graduate copyparty-sfx.sh 2022-02-13 20:44:03 +01:00
ed aab3baaea7 v1.2.0 2022-02-13 16:58:54 +01:00
ed b8453c3b4f ftpd: support rootless filesystems 2022-02-13 16:38:24 +01:00
ed 6ce0e2cd5b ftpd: add ftps 2022-02-13 15:46:33 +01:00
ed 76beaae7f2 ftpd: add move/rename 2022-02-13 14:26:16 +01:00
ed c1a7f9edbe ftpd: add indexing, delete, windows support 2022-02-13 13:58:16 +01:00
ed b5f2fe2f0a add ftpd 2022-02-13 03:10:53 +01:00
ed 98a90d49cb ctrl-click document links to open in new tab 2022-02-12 20:26:44 +01:00
ed f55e982cb5 configurable max-hits 2022-02-12 16:22:35 +01:00
ed 686c7defeb fix path-search in nontop volumes 2022-02-12 16:00:14 +01:00
ed 0b1e483c53 bump webdeps 2022-02-09 23:45:09 +01:00
ed 457d7df129 fix ie11 hotkey crash 2022-02-06 02:08:18 +01:00
ed ce776a547c add rate throttling to uploads too 2022-02-06 02:06:59 +01:00
ed ded0567cbf v1.1.12 2022-01-18 22:28:33 +01:00
ed c9cac83d09 fix PUT response in write-only folders 2022-01-18 21:37:11 +01:00
ed 4fbe6b01a8 clarify what the app does 2022-01-17 00:31:23 +00:00
ed ee9585264e deal with github api change + build vamp if necessary 2022-01-17 00:27:23 +00:00
ed c9ffead7bf prisonparty: support running from src 2022-01-17 00:24:40 +00:00
ed ed69d42005 v1.1.11 2022-01-14 22:25:06 +01:00
ed 0b47ee306b bump marked.js to 4.0.10 2022-01-14 20:42:23 +01:00
ed e4e63619d4 linkable maintabs 2022-01-14 19:26:07 +01:00
ed f32cca292a propagate sort-order to thegrid 2022-01-14 18:28:49 +01:00
ed e87ea19ff1 return file URL in PUT response 2022-01-11 22:59:19 +01:00
ed 0214793740 fix garbage in markdown output 2022-01-05 18:57:05 +01:00
ed fc9dd5d743 meadup changes 2022-01-03 01:16:27 +01:00
ed 9e6d5dd2b9 vbi: add onscreen qrcode 2021-12-28 20:57:11 +01:00
ed bdad197e2c make it even worse 2021-12-27 00:04:38 +01:00
ed 7e139288a6 add very bad idea 2021-12-26 23:32:46 +01:00
ed 6e7935abaf repaint cut/paste buttons when permissions change 2021-12-24 00:50:52 +01:00
ed 3ba0cc20f1 v1.1.10 2021-12-17 00:05:17 +01:00
ed dd28de1796 sendfile: handle eagain 2021-12-17 00:04:19 +01:00
ed 9eecc9e19a v1.1.9 2021-12-16 22:54:44 +01:00
ed 6530cb6b05 shut socket on tx error 2021-12-16 22:51:24 +01:00
ed 41ce613379 add multisearch 2021-12-12 20:11:07 +01:00
ed 5e2785caba more aggressively try ffmpeg when mutagen fails 2021-12-11 20:31:04 +01:00
ed d7cc000976 v1.1.8 2021-12-10 02:44:48 +01:00
ed 50d8ff95ae good stuff 2021-12-10 02:21:56 +01:00
ed b2de1459b6 quick backports to the alternative fuse client 2021-12-10 01:59:45 +01:00
ed f0ffbea0b2 add breadcrumbs to the textfile tree 2021-12-10 00:44:47 +01:00
ed 199ccca0fe v1.1.7 2021-12-07 19:19:35 +01:00
ed 1d9b355743 fix search ui after b265e59 broke it 2021-12-07 19:12:36 +01:00
ed f0437fbb07 cleanup the windowtitle a bit 2021-12-07 19:09:24 +01:00
ed abc404a5b7 v1.1.6 2021-12-07 01:17:56 +01:00
ed 04b9e21330 update web-deps 2021-12-07 01:12:32 +01:00
ed 1044aa071b deal with consecutive dupes even without sqlite 2021-12-06 23:51:44 +01:00
ed 4c3192c8cc set window-title to listening ip 2021-12-06 23:08:04 +01:00
ed 689e77a025 option to set a custom servicename 2021-12-06 22:24:25 +01:00
ed 3bd89403d2 apply per-volume index config to ui 2021-12-06 22:04:24 +01:00
ed b4800d9bcb option to disable onboot-scans per-volume 2021-12-06 20:54:13 +01:00
ed 05485e8539 md: smaller indent on outermost list 2021-12-06 20:17:12 +01:00
ed 0e03dc0868 and fix the markdown breadcrumbs too 2021-12-06 19:51:47 +01:00
ed 352b1ed10a generate correct links when trailing slash missing 2021-12-06 19:49:14 +01:00
ed 0db1244d04 also consider TMPDIR and friends 2021-12-06 09:47:39 +01:00
ed ece08b8179 create ~/.config if /tmp is readonly 2021-12-06 02:02:44 +01:00
ed b8945ae233 fix tests and readme 2021-12-04 18:52:14 +01:00
ed dcaf7b0a20 v1.1.5 2021-12-04 03:33:57 +01:00
ed f982cdc178 spa gridview 2021-12-04 03:31:12 +01:00
ed b265e59834 spa filetab 2021-12-04 03:25:28 +01:00
ed 4a843a6624 unflicker navpane + add client state escape hatch 2021-12-04 02:46:00 +01:00
ed 241ef5b99d preserve mtimes when juggling symlinks 2021-12-04 01:58:04 +01:00
ed f39f575a9c sort-order indicators 2021-12-03 23:53:41 +01:00
ed 1521307f1e use preferred sort on initial render, fixes #8 2021-12-03 02:07:08 +01:00
ed dd122111e6 v1.1.4 2021-11-28 04:22:05 +01:00
ed 00c177fa74 show upload eta in window title 2021-11-28 04:05:16 +01:00
ed f6c7e49eb8 u2cli: better error messages 2021-11-28 03:38:57 +01:00
ed 1a8dc3d18a add workaround for #7 after all since it was trivial 2021-11-28 00:12:19 +01:00
ed 38a163a09a better dropzone for extremely slow browsers 2021-11-28 00:11:21 +01:00
ed 8f031246d2 disable windows quickedit to avoid accidental lockups 2021-11-27 21:43:19 +01:00
ed 8f3d97dde7 indicate onclick action for audio files in grid view 2021-11-24 22:10:59 +01:00
ed 4acaf24d65 remember if media controls were open or not 2021-11-24 21:49:41 +01:00
ed 9a8dbbbcf8 another accesskey fix 2021-11-22 21:57:29 +01:00
ed a3efc4c726 encode quoted queries into raw 2021-11-22 21:53:23 +01:00
ed 0278bf328f support raw-queries with quotes 2021-11-22 20:59:07 +01:00
ed 17ddd96cc6 up2k list wasnt centered anymore 2021-11-21 22:44:11 +01:00
ed 0e82e79aea mention the eq fixing gapless albums 2021-11-20 19:33:56 +01:00
ed 30f124c061 fix forcing compression levels 2021-11-20 18:51:15 +01:00
ed e19d90fcfc add missing examples 2021-11-20 18:50:55 +01:00
ed 184bbdd23d legalese rephrasing 2021-11-20 17:58:37 +01:00
ed 30b50aec95 mention mtp readme 2021-11-20 17:51:49 +01:00
ed c3c3d81db1 add mtp plugin for exif stripping 2021-11-20 17:45:56 +01:00
ed 49b7231283 fix mojibake support in misc mtp plugins 2021-11-20 17:33:24 +01:00
ed edbedcdad3 v1.1.3 2021-11-20 02:27:09 +01:00
ed e4ae5f74e6 add tooltip indicator 2021-11-20 01:47:16 +01:00
ed 2c7ffe08d7 include sha512 as both hex and b64 in responses 2021-11-20 01:03:32 +01:00
ed 3ca46bae46 good oneliner 2021-11-20 00:20:34 +01:00
ed 7e82aaf843 simplify/improve up2k ui debounce 2021-11-20 00:03:15 +01:00
ed 315bd71adf limit turbo runahead 2021-11-20 00:01:14 +01:00
ed 2c612c9aeb ux 2021-11-19 21:31:05 +01:00
ed 36aee085f7 add timeouts to FFmpeg things 2021-11-16 22:22:09 +01:00
ed d01bb69a9c u2cli: option to ignore inaccessible files 2021-11-16 21:53:00 +01:00
ed c9b1c48c72 sizelimit registry + persist without e2d 2021-11-16 21:31:24 +01:00
ed aea3843cf2 this is just noise 2021-11-16 21:28:50 +01:00
ed 131b6f4b9a workaround chrome rendering bug 2021-11-16 21:28:36 +01:00
ed 6efb8b735a better handling of python builds without sqlite3 2021-11-16 01:13:04 +01:00
ed 223b7af2ce more iOS jank 2021-11-16 00:05:35 +01:00
ed e72c2a6982 add fastpath for using the eq as a pure gain control 2021-11-15 23:19:43 +01:00
ed dd9b93970e autoenable aac transcoding when codec missing 2021-11-15 23:18:52 +01:00
ed e4c7cd81a9 update readme 2021-11-15 20:28:53 +01:00
ed 12b3a62586 fix dumb mistakes 2021-11-15 20:13:16 +01:00
ed 2da3bdcd47 delay tooltips, fix #6 2021-11-15 03:56:17 +01:00
ed c1dccbe0ba trick iphones into preloading natively 2021-11-15 03:01:11 +01:00
ed 9629fcde68 optionally enable seeking through os controls 2021-11-15 02:47:42 +01:00
ed cae436b566 add client-option to disconnect on HTTP 304 2021-11-15 02:45:18 +01:00
ed 01714700ae more gapless fixes 2021-11-14 20:25:28 +01:00
ed 51e6c4852b retire ogvjs 2021-11-14 19:28:44 +01:00
ed b206c5d64e handle multiple simultaneous uploads of the same file 2021-11-14 15:03:11 +01:00
ed 62c3272351 add option to simulate latency 2021-11-14 15:01:20 +01:00
ed c5d822c70a v1.1.2 2021-11-12 23:08:24 +01:00
ed 9c09b4061a prefer fpool on linux as well 2021-11-12 22:57:36 +01:00
ed c26fb43ced more cleanup 2021-11-12 22:30:23 +01:00
ed deb8f20db6 misc cleanup/unjank 2021-11-12 20:48:26 +01:00
ed 50e18ed8ff fix up2k layout in readonly folders 2021-11-12 19:18:52 +01:00
ed 31f3895f40 close misc views on escape 2021-11-12 19:18:29 +01:00
ed 615929268a cache monet 2021-11-12 02:00:44 +01:00
ed b8b15814cf add traffic shaping, bump speeds on https/windows 2021-11-12 01:34:56 +01:00
ed 7766fffe83 mostly fix ogvjs preloading 2021-11-12 01:09:01 +01:00
ed 2a16c150d1 general preload improvements 2021-11-12 01:04:31 +01:00
ed 418c2166cc add cursed doubleclick-handler in gridsel mode 2021-11-11 01:03:14 +01:00
ed a4dd44f648 textviewer initiable through hotkeys 2021-11-11 00:18:34 +01:00
ed 5352f7cda7 fix ctrl-a fencing in codeblocks 2021-11-11 00:11:29 +01:00
ed 5533b47099 handle crc collisions 2021-11-10 23:59:07 +01:00
ed e9b14464ee terminate preloader if it can't finish in time 2021-11-10 22:53:02 +01:00
ed 4e986e5cd1 xhr preload is not gapless 2021-11-10 22:00:24 +01:00
ed 8a59b40c53 better clientside upload dedup 2021-11-10 20:57:45 +01:00
ed 391caca043 v1.1.1 2021-11-08 22:39:00 +01:00
ed 171ce348d6 improve swr 2021-11-08 22:25:35 +01:00
ed c2cc729135 update sfx sizes 2021-11-08 21:11:10 +01:00
ed e7e71b76f0 add alternative preloader for spotty connections 2021-11-08 20:46:40 +01:00
ed a2af61cf6f fix clipboard sharing on recent firefox versions 2021-11-08 20:43:26 +01:00
ed e111edd5e4 v1.1.0 2021-11-06 23:27:48 +01:00
ed 3375377371 update tests 2021-11-06 23:27:21 +01:00
ed 0ced020c67 update readme 2021-11-06 22:15:37 +01:00
ed c0d7aa9e4a add file selection from text viewer 2021-11-06 22:02:43 +01:00
ed e5b3d2a312 dont hilight huge files 2021-11-06 20:56:23 +01:00
ed 7b4a794981 systemd-service: add reload 2021-11-06 20:33:15 +01:00
ed 86a859de17 navpane default on if 60em viewport 2021-11-06 20:32:43 +01:00
ed b3aaa7bd0f fence ctrl-a within documents and codeblocks 2021-11-06 19:37:19 +01:00
ed a90586e6a8 add reload api 2021-11-06 19:05:58 +01:00
ed 807f272895 missed one 2021-11-06 18:33:32 +01:00
ed f050647b43 rescan volumes on sigusr1 2021-11-06 18:20:31 +01:00
ed 73baebbd16 initial sigusr1 acc/vol reload 2021-11-06 07:15:04 +01:00
ed f327f698b9 finally drop the -e2s compat 2021-11-06 03:19:57 +01:00
ed 8164910fe8 support setting argv from config files 2021-11-06 03:11:21 +01:00
ed 3498644055 fix permission parser so it matches the documentation 2021-11-06 03:09:03 +01:00
ed d31116b54c spaghetti unraveling 2021-11-06 02:07:13 +01:00
ed aced110cdf bump preload window wrt opus transcoding 2021-11-06 01:02:22 +01:00
ed e9ab6aec77 allow full mime override 2021-11-06 00:50:20 +01:00
ed 15b261c861 help windows a little 2021-11-06 00:45:42 +01:00
ed 970badce66 positioning + optimization 2021-11-06 00:06:14 +01:00
ed 64304a9d65 make it optional 2021-11-06 00:06:05 +01:00
ed d1983553d2 add click handlers 2021-11-06 00:04:45 +01:00
ed 6b15df3bcd fix wordwrap not being set initially 2021-11-06 00:00:35 +01:00
ed 730b1fff71 hilight parents of current folder 2021-11-06 00:00:04 +01:00
ed c3add751e5 oh 2021-11-05 02:12:25 +01:00
ed 9da2dbdc1c rough attempt at docked navpane context 2021-11-05 02:03:35 +01:00
ed 977f09c470 .txt.gz is not actually .txt 2021-11-05 00:29:25 +01:00
ed 4d0c6a8802 ensure selected item visible when toggling navpane mode 2021-11-05 00:13:09 +01:00
ed 5345565037 a 2021-11-04 23:34:00 +01:00
ed be38c27c64 thxci 2021-11-04 22:33:10 +01:00
ed 82a0401099 at some point firefox became case-sensitive 2021-11-04 22:10:45 +01:00
ed 33bea1b663 navpane mode-toggle button and hotkey 2021-11-04 22:04:32 +01:00
ed f083acd46d let client force plaintext response content-type 2021-11-04 22:02:39 +01:00
ed 5aacd15272 ux 2021-11-04 03:38:09 +01:00
ed cb7674b091 make prism optional 2021-11-04 03:10:13 +01:00
ed 3899c7ad56 golfimize 2021-11-04 02:36:21 +01:00
ed d2debced09 navigation history support 2021-11-04 02:29:24 +01:00
ed b86c0ddc48 optimize 2021-11-04 02:06:55 +01:00
ed ba36f33bd8 add textfile viewer 2021-11-04 01:40:03 +01:00
ed 49368a10ba navpane enabled by default on non-touch devices 2021-11-04 01:35:05 +01:00
ed ac1568cacf golf elm removal 2021-11-04 01:33:40 +01:00
ed 862ca3439d proactive opus cache expiration 2021-11-02 20:39:08 +01:00
ed fdd4f9f2aa dirlist alignment 2021-11-02 18:59:34 +01:00
ed aa2dc49ebe trailing newline for plaintext folder listings 2021-11-02 18:48:32 +01:00
ed cc23b7ee74 better user-feedback when transcoding is unavailable 2021-11-02 03:22:39 +01:00
ed f6f9fc5a45 add audio transcoder 2021-11-02 02:59:37 +01:00
ed 26c8589399 Merge branch 'hovudstraum' of github.com:9001/copyparty into hovudstraum 2021-11-02 00:26:54 +01:00
ed c2469935cb add audio spectrogram thumbnails 2021-11-02 00:26:51 +01:00
kipukun 5e7c20955e contrib: describe rc script 2021-10-31 19:25:22 +01:00
kipukun 967fa38108 contrib: add freebsd rc script 2021-10-31 19:25:22 +01:00
ed 280fe8e36b document some of the api 2021-10-31 15:30:09 +01:00
ed 03ca96ccc3 performance tips 2021-10-31 06:24:11 +01:00
ed b5b8a2c9d5 why are there https warnings when https checking is disabled 2021-10-31 03:37:31 +01:00
ed 0008832730 update repacker 2021-10-31 02:22:14 +02:00
ed c9b385db4b v1.0.14 2021-10-30 00:37:46 +02:00
ed c951b66ae0 less messy startup messages 2021-10-29 23:43:09 +02:00
ed de735f3a45 list successful binds only 2021-10-29 23:03:36 +02:00
ed 19161425f3 if no args, try to bind 80 and 443 as well 2021-10-29 23:01:07 +02:00
ed c69e8d5bf4 filesearch donut accuracy 2021-10-29 21:07:46 +02:00
ed 3d3bce2788 less fancy but better 2021-10-29 11:02:20 +02:00
ed 1cb0dc7f8e colorcoded favicon donut 2021-10-29 02:40:17 +02:00
ed cd5c56e601 u2cli: orz 2021-10-29 01:49:40 +02:00
ed 8c979905e4 mention fedora things 2021-10-29 01:07:58 +02:00
ed 4d69f15f48 fix empty files blocking successive uploads 2021-10-29 01:04:38 +02:00
ed 083f6572f7 ie11 support 2021-10-29 01:04:09 +02:00
ed 4e7dd75266 add upload donut 2021-10-29 01:01:32 +02:00
ed 3eb83f449b truncate ridiculous extensions 2021-10-27 23:42:28 +02:00
ed d31f69117b better plaintext and vt100 folder listings 2021-10-27 23:04:59 +02:00
ed f5f9e3ac97 reduce rescan/lifetime wakeups 2021-10-27 22:23:03 +02:00
ed 598d6c598c reduce wakeups in httpsrv 2021-10-27 22:20:21 +02:00
ed 744727087a better rmtree semantics 2021-10-27 09:40:20 +02:00
ed f93212a665 add logout button to contrl panel 2021-10-27 01:27:59 +02:00
ed 6dade82d2c run tag scrapers in parallel on new uploads 2021-10-27 00:47:50 +02:00
ed 6b737bf1d7 abort tagging if the file has poofed 2021-10-27 00:11:58 +02:00
ed 94dbd70677 plaintext folder listing with ?ls=t 2021-10-27 00:00:12 +02:00
ed 527ae0348e locale-aware sorting of the navpane too 2021-10-26 23:59:21 +02:00
ed 79629c430a add refresh button on volumes listing 2021-10-26 23:58:10 +02:00
ed 908dd61be5 add cheatcode for turning links into downloads 2021-10-26 01:11:07 +02:00
ed 88f77b8cca spacebar as actionkey when ok/cancel focused 2021-10-25 21:31:27 +02:00
ed 1e846657d1 more css nitpicks 2021-10-25 21:31:12 +02:00
ed ce70f62a88 catch shady vfs configs 2021-10-25 21:13:51 +02:00
ed bca0cdbb62 v1.0.13 2021-10-24 21:06:14 +02:00
ed 1ee11e04e6 v1.0.12 2021-10-24 03:12:54 +02:00
ed 6eef44f212 ie 2021-10-24 02:57:19 +02:00
ed 8bd94f4a1c add readme banner 2021-10-24 01:24:54 +02:00
ed 4bc4701372 "fix" up2k layout 2021-10-24 01:19:48 +02:00
ed dfd89b503a ajax navigation in table listing too 2021-10-24 00:54:22 +02:00
ed 060dc54832 thumbnail caching 2021-10-24 00:29:04 +02:00
ed f7a4ea5793 add --js-browser 2021-10-24 00:26:47 +02:00
ed 71b478e6e2 persist webp test result 2021-10-24 00:23:51 +02:00
ed ed8fff8c52 more ux 2021-10-24 00:22:46 +02:00
ed 95dc78db10 thumbnails alignment 2021-10-23 21:51:16 +02:00
ed addeac64c7 checkbox selection hilight 2021-10-23 18:28:45 +02:00
ed d77ec22007 more ux 2021-10-23 16:59:11 +02:00
ed 20030c91b7 looks better 2021-10-23 02:46:18 +02:00
ed 8b366e255c fix thumbnail toggle not giving instant feedback 2021-10-23 02:38:37 +02:00
ed 6da366fcb0 forgot a few 2021-10-23 02:33:51 +02:00
ed 2fa35f851e ux 2021-10-22 11:12:04 +02:00
ed e4ca4260bb support mounting entire disks on windows 2021-10-20 00:51:00 +02:00
ed b69aace8d8 v1.0.11 2021-10-19 01:10:16 +02:00
ed 79097bb43c optimize rmtree on windows 2021-10-19 01:04:21 +02:00
ed 806fac1742 nullwrite fixes 2021-10-19 00:58:24 +02:00
ed 4f97d7cf8d normalize collision suffix 2021-10-19 00:49:35 +02:00
ed 42acc457af allow providing target filename in PUT 2021-10-19 00:48:00 +02:00
ed c02920607f linkable search results 2021-10-18 21:43:16 +02:00
ed 452885c271 replace the mediaplayer modal with malert 2021-10-18 21:18:46 +02:00
ed 5c242a07b6 refresh file listing on upload complete 2021-10-18 21:10:05 +02:00
ed 088899d59f fix unpost in jumpvols 2021-10-18 21:08:31 +02:00
ed 1faff2a37e u2cli: aggressive flushing on windows 2021-10-18 20:35:50 +02:00
ed 23c8d3d045 option to continue running if binds fail 2021-10-18 20:24:11 +02:00
ed a033388d2b sort volume listing 2021-10-13 00:21:54 +02:00
ed 82fe45ac56 u2cli: add -z / yolo 2021-10-13 00:03:49 +02:00
ed bcb7fcda6b u2cli: rsync-like source semantics 2021-10-12 22:46:33 +02:00
ed 726a98100b v1.0.10 2021-10-12 01:43:56 +02:00
ed 2f021a0c2b skip indexing files by regex 2021-10-12 01:40:19 +02:00
ed eb05cb6c6e add optional favicon 2021-10-12 00:49:50 +02:00
ed 7530af95da css twiddling 2021-10-12 00:48:23 +02:00
ed 8399e95bda ui: fix mkdir race when navpane is closed 2021-10-12 00:46:44 +02:00
ed 3b4dfe326f support pythons with busted ffi 2021-10-12 00:44:55 +02:00
ed 2e787a254e fix mkdir on py2.7 2021-10-11 03:50:45 +02:00
ed f888bed1a6 v1.0.9 2021-10-09 22:29:23 +02:00
ed d865e9f35a support non-python mtp plugins 2021-10-09 22:09:35 +02:00
Daedren fc7fe70f66 is_http now a class variable. Also checks lowercase value 2021-10-09 09:58:14 +02:00
Daedren 5aff39d2b2 Protocol of uploaded file based on X-Forwarded-Proto 2021-10-09 09:58:14 +02:00
ed d1be37a04a nice 2021-10-09 01:33:27 +02:00
ed b0fd8bf7d4 optimize indexer for huge filesystems 2021-10-09 01:24:19 +02:00
ed b9cf8f3973 sfx-repack: fix no-dd killing the loader animation 2021-10-08 01:33:48 +02:00
ed 4588f11613 deflicker lightmode 2021-10-07 23:12:00 +02:00
ed 1a618c3c97 safety 2021-10-07 23:11:37 +02:00
ed d500a51d97 golf 2021-10-07 23:11:11 +02:00
ed 734e9d3874 v1.0.8 2021-10-04 22:50:06 +02:00
ed bd5cfc2f1b fix filedrop with fallback hashers 2021-10-04 22:37:35 +02:00
ed 89f88ee78c more obvious dropzones 2021-10-04 22:34:05 +02:00
ed b2ae14695a show multiple filesearch hits 2021-10-04 21:53:28 +02:00
ed 19d86b44d9 less verbose debug toasts 2021-10-04 21:35:25 +02:00
ed 85be62e38b audioplayer: minute-mark text on progressbar 2021-10-04 21:26:26 +02:00
ed 80f3d90200 better focus outlines 2021-10-04 20:54:07 +02:00
ed 0249fa6e75 fix tests 2021-10-03 19:59:47 +02:00
ed 2d0696e048 allow appending mte in volflags 2021-10-03 19:35:51 +02:00
ed ff32ec515e add mtp plugin cksum.py 2021-10-03 19:35:20 +02:00
ed a6935b0293 allow uploading empty files 2021-10-02 23:34:12 +02:00
ed 63eb08ba9f u2cli: nobody asked for python2.6 support so here you go w 2021-10-02 00:36:41 +02:00
ed e5b67d2b3a u2cli: add eta, errorhandling, better windows support 2021-10-01 22:31:24 +02:00
ed 9e10af6885 make the 404/403 vagueness optional 2021-10-01 19:51:51 +02:00
ed 42bc9115d2 hide logues in search results 2021-10-01 19:33:49 +02:00
ed 0a569ce413 readme: add bash client examples 2021-10-01 19:27:21 +02:00
ed 9a16639a61 u2cli: add webm 2021-10-01 02:25:22 +02:00
ed 57953c68c6 u2cli: add vt100 status panel 2021-10-01 02:10:03 +02:00
ed 088d08963f u2cli: add multithreading 2021-10-01 00:33:45 +02:00
ed 7bc8196821 u2cli: add file-search 2021-09-30 19:36:47 +02:00
ed 7715299dd3 dont show entire web pages in toasts 2021-09-30 19:35:56 +02:00
ed b8ac9b7994 u2cli: connection reuse for lower latency 2021-09-28 00:14:45 +02:00
ed 98e7d8f728 more docstrings 2021-09-27 23:52:36 +02:00
ed e7fd871ffe add up2k.py 2021-09-27 23:28:34 +02:00
ed 14aab62f32 fix current-directory hilight 2021-09-27 20:55:05 +02:00
ed cb81fe962c v1.0.7 2021-09-26 20:15:21 +02:00
ed fc970d2dea v1.0.6 2021-09-26 19:36:19 +02:00
ed b0e203d1f9 fuse-cli: support fk volumes 2021-09-26 19:35:13 +02:00
ed 37cef05b19 move up2k flag switch to the settings tab 2021-09-26 17:17:16 +02:00
ed 5886a42901 url escaping 2021-09-26 16:59:02 +02:00
ed 2fd99f807d spa msg 2021-09-26 15:25:19 +02:00
ed 3d4cbd7d10 spa mkdir 2021-09-26 14:48:05 +02:00
ed f10d03c238 add --no-symlink 2021-09-26 13:49:29 +02:00
ed f9a66ffb0e up2k: fully parallelize handshakes/uploads 2021-09-26 12:57:16 +02:00
ed 777a50063d wrong key 2021-09-26 03:56:50 +02:00
ed 0bb9154747 catch more tagparser panics 2021-09-26 03:56:30 +02:00
ed 30c3f45072 fix deleting recently uploaded files without e2d 2021-09-26 03:45:16 +02:00
ed 0d5ca67f32 up2k-srv: add option to reuse file-handles 2021-09-26 03:44:22 +02:00
ed 4a8bf6aebd ff-crash: the queue can die before the rest of the browser 2021-09-25 19:26:48 +02:00
ed b11db090d8 also hide windows-paths in exceptions 2021-09-25 18:19:17 +02:00
ed 189391fccd up2k-cli: less aggressive retries 2021-09-25 18:18:15 +02:00
ed 86d4c43909 update the up2k.sh client example 2021-09-25 18:04:18 +02:00
ed 5994f40982 mention firefox crash 2021-09-25 18:03:19 +02:00
ed 076d32dee5 up2k-srv: try all dupes for matching path 2021-09-24 19:21:19 +02:00
ed 16c8e38ecd support login/uploading from hv3 2021-09-19 17:03:01 +02:00
ed eacbcda8e5 v1.0.5 2021-09-19 15:11:48 +02:00
ed 59be76cd44 fix basic-upload into fk-enabled folders 2021-09-19 15:00:55 +02:00
ed 5bb0e7e8b3 v1.0.4 2021-09-19 00:41:56 +02:00
ed b78d207121 encourage statics caching 2021-09-19 00:36:48 +02:00
ed 0fcbcdd08c correctly ordered folders in initial listing 2021-09-19 00:08:29 +02:00
ed ed6c683922 cosmetic 2021-09-19 00:07:49 +02:00
ed 9fe1edb02b support multiple volume flags in one group 2021-09-18 23:45:43 +02:00
ed fb3811a708 bunch of filekey fixes 2021-09-18 23:44:44 +02:00
ed 18f8658eec insufficient navpane minsize 2021-09-18 18:55:19 +02:00
ed 3ead4676b0 add release script 2021-09-18 18:43:55 +02:00
ed d30001d23d v1.0.3 2021-09-18 17:50:40 +02:00
ed 06bbf0d656 filekeys in search results 2021-09-18 17:26:13 +02:00
ed 6ddd952e04 return filekeys in upload summary if read-access 2021-09-18 15:57:43 +02:00
ed 027ad0c3ee misc 2021-09-18 15:38:13 +02:00
ed 3abad2b87b fix navpane nowrap 2021-09-18 14:18:23 +02:00
ed 32a1c7c5d5 cosmetic 2021-09-18 02:07:29 +02:00
ed f06e165bd4 retro 2021-09-18 02:07:09 +02:00
ed 1c843b24f7 ensure ffmpeg doesn't transcode video 2021-09-17 23:50:54 +02:00
ed 2ace9ed380 fix filekeys appearing in filenames 2021-09-17 23:12:32 +02:00
ed 5f30c0ae03 fix button hover bg 2021-09-17 22:49:49 +02:00
ed ef60adf7e2 optional navpane wordwrap diasble 2021-09-17 22:49:26 +02:00
ed 7354b462e8 easymde: use extenral marked.js 2021-09-17 09:32:30 +02:00
ed da904d6be8 upgrade marked.js from v1.1.0 to v3.0.4 2021-09-17 09:10:33 +02:00
ed c5fbbbbb5c show current line number in md-editor 2021-09-17 01:36:06 +02:00
ed 5010387d8a markdown modpoll at an interval 2021-09-16 09:31:58 +02:00
ed f00c54a7fb nice 2021-09-16 09:00:36 +02:00
ed 9f52c169d0 more python3 shebangs 2021-09-16 00:28:38 +02:00
ed bf18339404 change sfx shebang to python3 2021-09-16 00:26:52 +02:00
ed 2ad12b074b return 404 on browsing folders with g 2021-09-16 00:17:27 +02:00
ed a6788ffe8d mention e2ts deps 2021-09-16 00:06:19 +02:00
ed 0e884df486 keep empty folders after deleting all files 2021-09-15 23:31:49 +02:00
ed ef1c55286f add filekeys 2021-09-15 23:17:02 +02:00
ed abc0424c26 show login prompt on 404 2021-09-15 21:53:30 +02:00
ed 44e5c82e6d more aggressively no-cache 2021-09-15 20:49:02 +02:00
ed 5849c446ed new access level g 2021-09-15 01:01:20 +02:00
ed 12b7317831 wget: delete url file 2021-09-15 00:18:58 +02:00
ed fe323f59af update readme 2021-09-14 23:05:32 +02:00
ed a00e56f219 lol it works 2021-09-14 22:44:56 +02:00
ed 1a7852794f dry boolean configs 2021-09-14 00:50:27 +02:00
ed 22b1373a57 accessibility: always hilight focused elements 2021-09-14 00:46:53 +02:00
ed 17d78b1469 set max-width for readme.md 2021-09-14 00:46:03 +02:00
ed 4d8b32b249 prevent tooltips on alt-tab 2021-09-14 00:45:30 +02:00
ed b65bea2550 show toast with stack on rejected promises 2021-09-14 00:42:46 +02:00
ed 0b52ccd200 fqdn makes more sense 2021-09-12 23:49:37 +02:00
ed 3006a07059 cfssl: mention arg 3 2021-09-12 23:38:38 +02:00
ed 801dbc7a9a readme: add motivations / future plans 2021-09-12 23:25:34 +02:00
ed 4f4e895fb7 update vscode launch args 2021-09-11 19:59:59 +02:00
ed cc57c3b655 bump deps 2021-09-11 19:59:41 +02:00
ed ca6ec9c5c7 v1.0.2 2021-09-09 09:21:30 +02:00
ed 633b1f0a78 v1.0.1 2021-09-09 00:59:55 +02:00
ed 6136b9bf9c don't double-eof 2021-09-09 00:54:09 +02:00
ed 524a3ba566 actually this is better 2021-09-09 00:41:23 +02:00
ed 58580320f9 make the primary tabs toggle-buttons 2021-09-09 00:35:07 +02:00
ed 759b0a994d alternative equalizer tuning 2021-09-09 00:27:18 +02:00
ed d2800473e4 less aggressive searching, especially on phones 2021-09-08 23:24:32 +02:00
ed f5b1a2065e multipart-parser needs exact reads 2021-09-08 21:07:34 +00:00
ed 5e62532295 minimal-up2k: remove filesearch dropzone 2021-09-08 09:16:02 +02:00
ed c1bee96c40 fix filedrop trying to upload without write access 2021-09-08 00:19:48 +02:00
ed f273253a2b ( ´ w `) 2021-09-08 00:16:08 +02:00
ed 012bbcf770 v1.0.0 2021-09-07 23:18:54 +02:00
ed b54cb47b2e listen for filedrops in all tabs/modes 2021-09-07 22:44:48 +02:00
ed 1b15f43745 crashpage: add github-issue link 2021-09-07 22:30:50 +02:00
ed 96771bf1bd linken 2021-09-07 22:12:28 +02:00
ed 580078bddb more readme stuff 2021-09-07 22:10:59 +02:00
ed c5c7080ec6 more readme fixup 2021-09-07 21:57:33 +02:00
ed 408339b51d mention the new dropzones 2021-09-07 21:49:00 +02:00
ed 02e3d44998 fix move/delete without -e2d (thx exci) 2021-09-07 21:20:34 +02:00
ed 156f13ded1 add 10-minute indicators to seekbar 2021-09-07 21:10:50 +02:00
ed d288467cb7 separate dropzones for upload/search 2021-09-07 20:52:06 +02:00
ed 21662c9f3f error-message cleanup 2021-09-07 20:51:07 +02:00
ed 9149fe6cdd lightmode fix 2021-09-07 00:44:09 +02:00
ed 9a146192b7 don't unwrap single folders in zip/tar downloads 2021-09-07 00:43:51 +02:00
ed 3a9d3b7b61 rip hls 2021-09-07 00:05:51 +02:00
ed f03f0973ab
Create branch-rename.md 2021-09-06 23:42:42 +02:00
ed 7ec0881e8c
Create CODE_OF_CONDUCT.md 2021-09-06 23:31:57 +02:00
ed 59e1ab42ff
Create CONTRIBUTING.md 2021-09-06 22:18:41 +02:00
ed 722216b901 Update issue templates 2021-09-06 22:11:06 +02:00
ed bd8f3dc368 Update issue templates 2021-09-06 22:09:10 +02:00
ed 33cd94a141 update TOC 2021-09-06 08:36:18 +02:00
ed 053ac74734 v0.13.14 2021-09-06 01:06:16 +02:00
ed cced99fafa replace SCP with Consolas on no-fnt repack 2021-09-06 01:04:12 +02:00
ed a009ff53f7 show README.md in directory listings 2021-09-06 00:23:35 +02:00
ed ca16c4108d add options to disallow renaming/moving dotfiles 2021-09-06 00:17:35 +02:00
ed d1b6c67dc3 fix misnomer 2021-09-06 00:13:52 +02:00
ed a61f8133d5 add option to disable logues 2021-09-05 22:33:42 +02:00
ed 38d797a544 remove duplicate code 2021-09-05 22:32:34 +02:00
ed 16c1877f50 fix markdown scrollmap desync on offsite images 2021-09-05 21:44:17 +02:00
ed da5f15a778 move general markdown to ui.css 2021-09-05 21:42:41 +02:00
ed 396c64ecf7 move sourcecodepro to ui.css 2021-09-05 18:55:28 +02:00
ed 252c3a7985 faster turbo 2021-09-05 18:51:01 +02:00
ed a3ecbf0ae7 better fix for the up2k bounce 2021-09-05 18:50:24 +02:00
ed 314327d8f2 support alternative python impls 2021-09-05 18:48:58 +02:00
ed bfacd06929 mention some more features 2021-09-04 21:40:22 +02:00
ed 4f5e8f8cf5 toc tweaks 2021-09-04 21:21:18 +02:00
ed 1fbb4c09cc readme/doc cleanup 2021-09-04 21:07:45 +02:00
ed b332e1992b sfx-repack: fix git version numbers 2021-09-04 17:43:49 +02:00
ed 5955940b82 fix upload eta going bad after inactivity 2021-09-04 03:10:54 +02:00
ed 231a03bcfd v0.13.13 2021-09-03 21:21:17 +02:00
ed bc85723657 more intense compressino 2021-09-03 21:20:40 +02:00
ed be32b743c6 repl: select default text on load 2021-09-03 20:48:41 +02:00
ed 83c9843059 make-sfx: correct version number on repack 2021-09-03 20:38:41 +02:00
ed 11cf43626d make-sfx: fix no-dd css modifier 2021-09-03 20:38:14 +02:00
ed a6dc5e2ce3 add some missing preventdefaults 2021-09-03 20:37:30 +02:00
ed 38593a0394 move column hider buttons above the header 2021-09-03 20:19:17 +02:00
ed 95309afeea fix file-list jumping around during uploads 2021-09-03 20:17:44 +02:00
ed c2bf6fe2a3 add basic authentication 2021-09-03 20:15:24 +02:00
ed 99ac324fbd tweaks 2021-09-02 19:06:08 +02:00
ed 5562de330f slightly smaller jpeg thumbnails 2021-09-02 18:51:15 +02:00
ed 95014236ac js-repl presets 2021-09-02 18:50:47 +02:00
ed 6aa7386138 modals: onDisplay callback 2021-09-02 18:46:51 +02:00
ed 3226a1f588 crashpage: show recent console messages 2021-09-02 18:45:42 +02:00
ed b4cf890cd8 emphasis 2021-09-02 18:42:53 +02:00
ed ce09e323af ok/cancel buttons in platform-defined order 2021-09-02 18:42:12 +02:00
ed 941aedb177 v0.13.12 2021-09-01 23:48:01 +02:00
ed 87a0d502a3 crashpage: add useragent 2021-09-01 23:32:27 +02:00
ed cab7c1b0b8 browser-icons: centered play button 2021-09-01 22:35:27 +02:00
ed d5892341b6 prevent vertical toast overflow 2021-09-01 22:34:48 +02:00
ed 646557a43e crashpage: better localstore dump 2021-09-01 22:34:04 +02:00
ed ed8d34ab43 dont try to play audio if js crashed 2021-09-01 22:28:15 +02:00
ed 5e34463c77 support massive cut/paste ops 2021-09-01 22:27:39 +02:00
ed 1b14eb7959 fix thumbnail-zoom hotkeys 2021-09-01 22:26:18 +02:00
ed ed48c2d0ed v0.13.11 2021-08-30 22:32:16 +02:00
ed 26fe84b660 smaller sfx 2021-08-30 22:27:10 +02:00
ed 5938230270 more tray ui nitpicks 2021-08-30 22:25:07 +02:00
ed 1a33a047fa fix listening on single interface 2021-08-30 21:39:44 +02:00
ed 43a8bcefb9 v0.13.10 2021-08-30 03:02:11 +02:00
ed 2e740e513f cheap performance fix 2021-08-30 02:38:48 +02:00
ed 8a21a86b61 better iOS error-handling 2021-08-30 02:29:38 +02:00
ed f600116205 login returns to volume listing 2021-08-30 01:55:24 +02:00
ed 1c03705de8 upload filedrops in alphabetical order 2021-08-30 01:50:12 +02:00
ed f7e461fac6 add humantime 2021-08-30 01:16:20 +02:00
ed 03ce6c97ff better crash-handler ui 2021-08-30 01:15:37 +02:00
ed ffd9e76e07 select all text in modal.prompt 2021-08-30 01:11:00 +02:00
ed fc49cb1e67 add js repl 2021-08-30 01:09:27 +02:00
ed f5712d9f25 v0.13.9 2021-08-29 02:24:09 +02:00
ed 161d57bdda v0.13.8 2021-08-29 01:38:06 +02:00
ed bae0d440bf upgrade ogvjs to 1.8.4 2021-08-29 01:11:44 +02:00
ed fff052dde1 explain the magic 2021-08-29 00:11:06 +02:00
ed 73b06eaa02 coerce iOS into playing opus in the background 2021-08-29 00:05:14 +02:00
ed 08a8ebed17 minor cleanup 2021-08-28 22:40:59 +02:00
ed 74d07426b3 make tray tab smaller 2021-08-28 22:37:39 +02:00
ed 69a2bba99a fix ogv.js crashing iOS 2021-08-28 22:35:47 +02:00
ed 4d685d78ee v0.13.7 2021-08-28 04:55:06 +02:00
ed 5845ec3f49 nevermind, nailed it 2021-08-28 04:08:22 +02:00
ed 13373426fe alright fine apple you win 2021-08-28 03:44:07 +02:00
ed 8e55551a06 positioning fixes 2021-08-28 03:27:14 +02:00
ed 12a3f0ac31 update the filetype icons example 2021-08-28 02:56:07 +02:00
ed 18e33edc88 hide tooltips on scroll 2021-08-28 02:46:06 +02:00
ed c72c5ad4ee make the ellipsis more visible 2021-08-28 02:38:31 +02:00
ed 0fbc81ab2f missed some 2021-08-28 02:37:28 +02:00
ed af0a34cf82 improve iphone fix 2021-08-28 02:11:40 +02:00
ed b4590c5398 horizontally centered tooltips 2021-08-28 01:49:21 +02:00
ed f787a66230 that was dumb 2021-08-28 01:47:36 +02:00
ed b21a99fd62 only tooltip the ellipsed thumbnails 2021-08-28 01:25:27 +02:00
ed eb16306cde misc cleanup 2021-08-28 00:03:30 +02:00
ed 7bc23687e3 this kinda broke ellipsing, hopefully not too expensive 2021-08-28 00:02:59 +02:00
ed e1eaa057f2 optimize clmod 2021-08-27 23:58:23 +02:00
ed 97c264ca3e snappy taps 2021-08-27 23:57:46 +02:00
ed cf848ab1f7 add ellipsing of thumbnail filename, fixes #3 (+ clamp zoom level) 2021-08-27 23:50:09 +02:00
ed cf83f9b0fd v0.13.6 2021-08-27 00:09:36 +02:00
ed d98e361083 quick debounce 2021-08-26 23:59:17 +02:00
ed ce7f5309c7 tweak toast bg 2021-08-26 23:46:04 +02:00
ed 75c485ced7 misc toast rice and html escaping 2021-08-26 23:45:28 +02:00
ed 9c6e2ec012 misc modal rice and html escaping 2021-08-26 23:23:56 +02:00
ed 1a02948a61 prevent text selection on most buttons 2021-08-26 23:01:24 +02:00
ed 8b05ba4ba1 stop counting eta when we don't hold the flag 2021-08-26 22:51:07 +02:00
ed 21e2874cb7 warning when another browser tab holds the flag 2021-08-26 22:50:22 +02:00
ed 360ed5c46c release the up2k flag when disabling it 2021-08-26 22:48:57 +02:00
ed 5099bc365d better eta for fsearch 2021-08-26 22:47:43 +02:00
ed 12986da147 might be useful some time 2021-08-26 22:45:50 +02:00
ed 23e72797bc remove some more ansi escapes on win7 2021-08-26 22:45:36 +02:00
ed ac7b6f8f55 update turbo hint for fsearch 2021-08-26 20:44:36 +02:00
ed 981b9ff11e more accurate eta 2021-08-26 20:43:52 +02:00
ed 4186906f4c pause hashing as well when parallel uploads is 0 2021-08-26 20:43:27 +02:00
ed 0850d24e0c improve spacing on narrow screens 2021-08-26 20:42:20 +02:00
ed 7ab8334c96 remove debug 2021-08-26 01:16:59 +02:00
ed a4d7329ab7 revert to fixed MiB/s in upload tab 2021-08-26 01:13:20 +02:00
ed 3f4eae6bce yolo search + show in bz + md search 2021-08-26 00:57:49 +02:00
ed 518cf4be57 set fsearch tag on tasks 2021-08-26 00:54:00 +02:00
ed 71096182be toFixed is busted, workaround 2021-08-26 00:51:35 +02:00
ed 6452e927ea download-eta accuracy + misc ux 2021-08-26 00:40:12 +02:00
ed bc70cfa6f0 fix tmi 2021-08-25 09:02:34 +02:00
ed 2b6e5ebd2d update minimal-up2k 2021-08-25 08:26:38 +02:00
ed c761bd799a add pane with total eta for all uploads 2021-08-25 02:06:29 +02:00
ed 2f7c2fdee4 add colors to status column in up2k ui 2021-08-24 00:32:53 +02:00
ed 70a76ec343 add toast on upload/fsearch completion 2021-08-24 00:31:01 +02:00
ed 7c3f64abf2 fix navpane h.scroll bug 2021-08-24 00:29:11 +02:00
ed f5f38f195c use scp.woff in browser too 2021-08-24 00:28:16 +02:00
ed 7e84f4f015 fence focus inside modals 2021-08-24 00:26:54 +02:00
ed 4802f8cf07 better msg when unposting a deleted file 2021-08-24 00:24:50 +02:00
ed cc05e67d8f add summaries to readme toc 2021-08-22 17:23:42 +02:00
ed 2b6b174517 the smallest nitpick 2021-08-20 19:25:57 +02:00
ed a1d05e6e12 folder thumbnail fix 2021-08-20 19:22:25 +02:00
ed f95ceb6a9b fix toc 2021-08-17 08:54:19 +02:00
ed 8f91b0726d add missing hotkey hint 2021-08-17 00:24:27 +02:00
ed 97807f4383 update screenshots 2021-08-17 00:23:12 +02:00
ed 5f42237f2c v0.13.5 2021-08-16 08:40:26 +02:00
ed 68289cfa54 v0.13.4 2021-08-16 08:18:52 +02:00
ed 42ea30270f up2k-ui: post absolute URLs 2021-08-16 08:16:52 +02:00
ed ebbbbf3d82 misc old-browser support 2021-08-16 00:22:30 +02:00
ed 27516e2d16 scroll navpane to open folder on load 2021-08-16 00:07:31 +02:00
ed 84bb6f915e fix unpost ui for nonroot volumes 2021-08-16 00:03:05 +02:00
ed 46752f758a fix bup into volumes with upload rules 2021-08-15 23:59:41 +02:00
ed 34c4c22e61 v0.13.3 2021-08-14 22:46:15 +02:00
ed af2d0b8421 upgrade permsets in smoketest 2021-08-14 22:45:33 +02:00
ed 638b05a49a fix image-viewer touch handler 2021-08-14 22:40:54 +02:00
ed 7a13e8a7fc clear transform on 0deg rotate 2021-08-14 21:13:15 +02:00
ed d9fa74711d cheaper shadows 2021-08-14 18:17:40 +02:00
ed 41867f578f image viewer: add rotation 2021-08-14 18:06:53 +02:00
ed 0bf41ed4ef exif orientation for thumbnails 2021-08-14 17:45:44 +02:00
ed d080b4a731 v0.13.2 2021-08-12 22:42:36 +02:00
ed ca4232ada9 move sortfiles from util to browser 2021-08-12 22:42:17 +02:00
ed ad348f91c9 fix button placement in large modals 2021-08-12 22:31:28 +02:00
ed 990f915f42 ui tweaks 2021-08-12 22:31:07 +02:00
ed 53d720217b open videos in gallery 2021-08-12 22:30:52 +02:00
ed 7a06ff480d fix cut/paste on old chromes 2021-08-12 22:30:41 +02:00
ed 3ef551f788 selection-toggle in image viewer 2021-08-12 22:20:32 +02:00
ed f0125cdc36 prevent massive stacks in chrome 2021-08-12 22:12:05 +02:00
ed ed5f6736df add prisonparty systemd example 2021-08-10 23:29:14 +02:00
ed 15d8be0fae no more loops 2021-08-10 02:56:48 +02:00
ed 46f3e61360 no actually that is a terrible location 2021-08-09 23:53:09 +02:00
ed 87ad8c98d4 /var/empty is a good location 2021-08-09 23:37:01 +02:00
ed 9bbdc4100f fix permission flags in service scripts 2021-08-09 23:26:30 +02:00
ed c80307e8ff v0.13.1 2021-08-09 22:28:54 +02:00
ed c1d77e1041 add upload lifetimes 2021-08-09 22:17:41 +02:00
ed d9e83650dc handle invalid XDG_CONFIG_HOME on linux 2021-08-09 22:13:16 +02:00
ed f6d635acd9 sfx: return 1 on exception 2021-08-09 22:13:00 +02:00
ed 0dbd8a01ff mount PWD into chroot for config files 2021-08-09 22:12:39 +02:00
ed 8d755d41e0 per-volume rescan interval 2021-08-09 01:31:20 +02:00
ed 190473bd32 up2k-ui: fix hash-ahead button 2021-08-09 01:16:09 +02:00
ed 030d1ec254 no wait thats too much 2021-08-09 01:15:51 +02:00
ed 5a2b91a084 handle more exceptions + sanitize fs paths in msgs 2021-08-09 01:09:20 +02:00
ed a50a05e4e7 git: set 0755 on binary 2021-08-09 00:44:19 +02:00
ed 6cb5a87c79 add chroot wrapper (tested on debian only) 2021-08-09 00:42:21 +02:00
ed b9f89ca552 shared password for providers 2021-08-08 23:05:00 +02:00
ed 26c9fd5dea add converter to freg / yta-raw 2021-08-08 22:48:02 +02:00
ed e81a9b6fe0 better error handling 2021-08-08 20:48:24 +02:00
ed 452450e451 improve youtube parser 2021-08-08 20:30:12 +02:00
ed 419dd2d1c7 v0.13.0 2021-08-08 04:14:59 +02:00
ed ee86b06676 compat + perf + ux 2021-08-08 04:02:58 +02:00
ed 953183f16d add help sections and vt100 stripper 2021-08-08 02:47:42 +02:00
ed 228f71708b improve youtube collector/parser 2021-08-08 02:47:04 +02:00
ed 621471a7cb add streaming upload compression 2021-08-08 02:45:50 +02:00
ed 8b58e951e3 metadata search with keys containing _- 2021-08-07 21:38:52 +02:00
ed 1db489a0aa port changes to mde 2021-08-07 21:35:24 +02:00
ed be65c3c6cf cleanup 2021-08-07 21:11:01 +02:00
ed 46e7fa31fe up2k-cli: handle subfolders better 2021-08-07 20:43:24 +02:00
ed 66e21bd499 up2k-ui: prevent accidentally showing huge lists 2021-08-07 20:08:41 +02:00
ed 8cab4c01fd chrome optimizations 2021-08-07 20:08:02 +02:00
ed d52038366b reinventing alert/confirm/prompt was exactly what i had in mind for the weekend, thanks google 2021-08-07 18:41:06 +02:00
ed 4fcfd87f5b fix transfer limit 2021-08-07 18:40:28 +02:00
ed f893c6baa4 add youtube manifest parser 2021-08-07 04:29:55 +02:00
ed 9a45549b66 adding upload rules 2021-08-07 03:45:50 +02:00
ed ae3a01038b v0.12.12 2021-08-06 11:10:04 +02:00
ed e47a2a4ca2 hyperlinks 2021-08-06 01:48:34 +02:00
ed 95ea6d5f78 v0.12.11 2021-08-06 00:53:44 +02:00
ed 7d290f6b8f fix volflag syntax in examples 2021-08-06 00:50:29 +02:00
ed 9db617ed5a new mtp: media-hash 2021-08-06 00:49:42 +02:00
ed 514456940a tooltips, examples, fwd ng in lpad 2021-08-05 23:56:09 +02:00
ed 33feefd9cd sup merge conflict 2021-08-05 23:14:19 +02:00
ed 65e14cf348 batch-rename: add functions and presets 2021-08-05 23:11:06 +02:00
ed 1d61bcc4f3 every time 2021-08-05 21:56:52 +02:00
ed c38bbaca3c mention batch-rename in readme 2021-08-05 21:53:51 +02:00
ed 246d245ebc make it better 2021-08-05 21:53:08 +02:00
ed f269a710e2 suspiciously working first attempt at batch-rename 2021-08-05 20:49:49 +02:00
ed 051998429c fix argv compat on windows paths 2021-08-05 20:46:08 +02:00
ed 432cdd640f video-thumbs: take first video stream + better errors 2021-08-05 20:44:04 +02:00
ed 9ed9b0964e nice race 2021-08-03 22:53:13 +00:00
ed 6a97b3526d why was that there 2021-08-03 21:16:26 +00:00
ed 451d757996 fix renaming single symlinks 2021-08-03 20:12:51 +02:00
ed f9e9eba3b1 sfx-repack: fix no-fnt, no-dd 2021-08-03 20:12:21 +02:00
ed 2a9a6aebd9 systemd fun 2021-08-03 09:22:16 +02:00
ed adbb6c449e v0.12.10 2021-08-02 00:49:31 +02:00
ed 3993605324 add -mth (deafult-hidden columns) 2021-08-02 00:47:07 +02:00
ed 0ae574ec2c better mutagen codec detection 2021-08-02 00:40:40 +02:00
ed c56ded828c v0.12.9 2021-08-01 00:40:15 +02:00
ed 02c7061945 v0.12.8 2021-08-01 00:17:05 +02:00
ed 9209e44cd3 heh 2021-08-01 00:08:50 +02:00
ed ebed37394e better rename ui 2021-08-01 00:04:53 +02:00
ed 4c7a2a7ec3 uridec alerts 2021-07-31 22:05:31 +02:00
ed 0a25a88a34 add mojibake fixer 2021-07-31 14:31:39 +02:00
ed 6aa9025347 v0.12.7 2021-07-31 13:21:43 +02:00
ed a918cc67eb only drop tags when its safe 2021-07-31 13:19:02 +02:00
ed 08f4695283 v0.12.6 2021-07-31 12:38:53 +02:00
ed 44e76d5eeb optimize make-sfx 2021-07-31 12:38:17 +02:00
ed cfa36fd279 phone-friendly toast positioning 2021-07-31 10:56:03 +02:00
ed 3d4166e006 dont thumbnail thumbnails 2021-07-31 10:51:18 +02:00
ed 07bac1c592 add option to show dotfiles 2021-07-31 10:44:35 +02:00
ed 755f2ce1ba more url encoding fun 2021-07-31 10:24:34 +02:00
ed cca2844deb fix mode display for move 2021-07-31 07:19:10 +00:00
ed 24a2f760b7 v0.12.5 2021-07-30 19:28:14 +02:00
ed 79bbd8fe38 systemd: line-buffered logging 2021-07-30 10:39:46 +02:00
ed 35dce1e3e4 v0.12.4 2021-07-30 08:52:15 +02:00
ed f886fdf913 mention unpost in the readme 2021-07-30 00:53:15 +02:00
ed 4476f2f0da v0.12.3 orz 2021-07-30 00:32:21 +02:00
ed 160f161700 v0.12.2 (1000GET) 2021-07-29 23:56:25 +02:00
ed c164fc58a2 add unpost 2021-07-29 23:53:08 +02:00
ed 0c625a4e62 store upload ip and time 2021-07-29 00:30:10 +02:00
ed bf3941cf7a v0.12.1 2021-07-28 01:55:01 +02:00
ed 3649e8288a v0.12.0 2021-07-28 01:47:42 +02:00
ed 9a45e26026 another windows sighandler fix 2021-07-28 01:18:51 +02:00
ed e65f127571 list server ips on windows 2021-07-28 01:18:38 +02:00
ed 3bfc699787 block hotkeys when insufficient permissions 2021-07-27 23:16:50 +02:00
ed 955318428a font adjustments 2021-07-27 23:12:47 +02:00
ed f6279b356a fix more signal handler jank 2021-07-27 22:11:33 +02:00
ed 4cc3cdc989 list server ips on macos 2021-07-27 20:39:16 +02:00
ed f9aa20a3ad naming: navpane 2021-07-27 20:39:01 +02:00
ed 129d33f1a0 mv/del: recursive rmdir 2021-07-27 19:15:58 +02:00
ed 1ad7a3f378 await and monitor workers on startup 2021-07-27 15:48:00 +00:00
ed b533be8818 actually this is much better 2021-07-27 12:26:34 +02:00
ed fb729e5166 file selection scroll behavior 2021-07-27 12:13:00 +02:00
ed d337ecdb20 fix color bleed 2021-07-27 12:02:55 +02:00
ed 5f1f0a48b0 toast appearance 2021-07-27 11:48:32 +02:00
ed e0f1cb94a5 toast close-handle 2021-07-27 10:05:53 +02:00
ed a362ee2246 dodge a bullet on centos7 2021-07-27 00:28:40 +02:00
ed 19f23c686e toasty 2021-07-27 00:18:08 +02:00
ed 23b20ff4a6 bos abspath 2021-07-26 23:53:13 +02:00
ed 72574da834 hide fileman buttons when argv-disabled 2021-07-26 23:35:55 +02:00
ed d5a79455d1 cleanup 2021-07-26 23:31:45 +02:00
ed 070d4b9da9 allow regular hotkeys during file selection 2021-07-26 22:50:58 +02:00
ed 0ace22fffe file selection hotkeys 2021-07-26 22:47:54 +02:00
ed 9e483d7694 ctrl-a 2021-07-26 22:44:07 +02:00
ed 26458b7a06 keyboard file selection 2021-07-26 22:40:55 +02:00
ed b6a4604952 show fileman buttons conditionally 2021-07-26 21:00:36 +02:00
ed af752fbbc2 reload-signal to source folder on paste 2021-07-26 20:49:26 +02:00
ed 279c9d706a list volumes/permissions on startup 2021-07-26 20:07:23 +02:00
ed 806e7b5530 fix argv compat bug 2021-07-26 19:40:12 +02:00
ed f3dc6a217b use the new toast in md-editor 2021-07-26 19:20:36 +02:00
ed 7671d791fa rename works + more symlink fixes 2021-07-26 17:44:20 +02:00
ed 8cd84608a5 toast coloring 2021-07-26 03:00:37 +02:00
ed 980c6fc810 add scheduled rescans + fix mv bugs 2021-07-26 02:34:56 +02:00
ed fb40a484c5 mv(folder) works 2021-07-26 01:26:58 +02:00
ed daa9dedcaa rm works 2021-07-26 00:29:28 +02:00
ed 0d634345ac signal handling was still busted 2021-07-26 00:19:33 +02:00
ed e648252479 mv works (at least in trivial cases) 2021-07-25 21:15:43 +02:00
ed 179d7a9ad8 bikeshedding 2021-07-25 19:47:40 +02:00
ed 19bc962ad5 add toasts 2021-07-25 10:50:11 +02:00
ed 27cce086c6 fileman ui 2021-07-25 01:09:14 +02:00
ed fec0c620d4 add accounts/volumes section 2021-07-24 22:26:52 +02:00
ed 05a1a31cab too soon 2021-07-24 22:20:02 +02:00
ed d020527c6f centralize mojibake support stuff 2021-07-24 21:56:55 +02:00
ed 4451485664 mv/rm (serverside), 100% untested 2021-07-24 20:08:31 +02:00
ed a4e1a3738a more deletion progress 2021-07-23 23:42:07 +02:00
ed 4339dbeb8d mv/rm handlers 2021-07-23 01:14:49 +02:00
ed 5b0605774c add move/delete permission flags 2021-07-22 23:48:29 +02:00
ed e3684e25f8 treat symlinks as regular files in db 2021-07-22 19:34:40 +02:00
ed 1359213196 prefer native sqlite3 backup (journal-aware) 2021-07-22 19:10:42 +02:00
ed 03efc6a169 support ancient glibc 2021-07-22 19:04:59 +02:00
ed 15b5982211 v0.11.47 2021-07-22 10:09:04 +02:00
ed 0eb3a5d387 ignorable exceptions 2021-07-22 10:08:39 +02:00
Lytexx 7f8777389c fix typo 2021-07-22 09:34:04 +02:00
ed 4eb20f10ad v0.11.46 2021-07-22 08:42:27 +02:00
ed daa11df558 avoid chrome bug 809574 2021-07-22 08:40:46 +02:00
ed 1bb0db30a0 fix logout link going 404 2021-07-21 01:30:27 +02:00
ed 02910b0020 v0.11.45 2021-07-20 23:23:08 +02:00
ed 23b8901c9c include localstore on the crashpage 2021-07-20 23:22:35 +02:00
ed 99f6ed0cd7 up2k-cli: avoid loading sha.js multiple times 2021-07-20 23:14:30 +02:00
ed 890c310880 another attempt at fixing tooltips on iphone 2021-07-20 23:07:15 +02:00
ed 0194eeb31f add login/permissions indicator 2021-07-20 22:42:03 +02:00
ed f9be4c62b1 v0.11.44 2021-07-20 01:03:08 +02:00
ed 027e8c18f1 sfx: option to remove mouse cursor 2021-07-20 01:00:28 +02:00
ed 4a3bb35a95 sfx: option to remove scp.woff2 2021-07-20 00:45:54 +02:00
ed 4bfb0d4494 notes 2021-07-19 23:46:44 +02:00
ed 7e0ef03a1e fix audio player edgecase (continue into next folder with sidebar closed) 2021-07-19 23:10:48 +02:00
ed f7dbd95a54 v0.11.43 2021-07-19 01:56:19 +02:00
ed 515ee2290b v0.11.42 2021-07-18 23:22:09 +02:00
ed b0c78910bb fix tabchange triggering tooltips 2021-07-18 23:21:36 +02:00
ed f4ca62b664 reattach tooltips on column show/hide 2021-07-18 23:14:57 +02:00
ed 8eb8043a3d fix 3rdparty namecase 2021-07-18 22:50:29 +02:00
ed 3e8541362a keep active dir scrolled into view on keybd nav 2021-07-18 22:32:34 +02:00
ed 789724e348 use preferred key notation in search results 2021-07-18 21:50:57 +02:00
ed 5125b9532f fix multiple whitespace in query translator 2021-07-18 21:39:28 +02:00
ed ebc9de02b0 case-insensitive tag search 2021-07-18 21:34:36 +02:00
ed ec788fa491 mutagen fixes:
* extract codec and format info
* add FFprobe as fallback when mutagen fails
* add option to blacklist FFprobe for tags
2021-07-18 19:57:31 +02:00
ed 9b5e264574 systemd: fix name in journalctl 2021-07-17 19:14:15 +02:00
ed 57c297274b v0.11.41 2021-07-17 17:53:34 +02:00
ed e9bf092317 tweak audio drawer tab 2021-07-17 17:24:48 +02:00
ed d173887324 explain confusing behavior in journalctl 2021-07-17 16:45:49 +02:00
ed 99820d854c oh that wasnt enough ok then 2021-07-17 16:45:25 +02:00
ed 62df0a0eb2 thx osx 2021-07-17 16:43:22 +02:00
ed 600e9ac947 try to workaround iphones not hiding tooltips 2021-07-17 16:03:21 +02:00
ed 3ca41be2b4 do up2k snapshot on shutdown 2021-07-17 14:48:35 +02:00
ed 5c7debd900 improve signal handling + emit sd-notify on start 2021-07-17 04:15:07 +02:00
ed 7fa5b23ce3 sfx: fix color bleed on flock errors 2021-07-17 04:12:14 +02:00
ed ff82738aaf vscode: support whitespace in python binary path 2021-07-17 04:11:14 +02:00
ed bf5ee9d643 colum header tooltips 2021-07-17 02:52:55 +02:00
ed 72a8593ecd gridmode shortcut in the audio drawer 2021-07-17 01:45:05 +02:00
ed bc3bbe07d4 combine tabs on narrow screens 2021-07-17 01:21:49 +02:00
ed c7cb64bfef gallery: add hotkey list button 2021-07-17 01:14:14 +02:00
ed 629f537d06 add more hotkey tooltips 2021-07-17 01:05:26 +02:00
ed 9e988041b8 cosmetics 2021-07-16 02:56:21 +02:00
ed f9a8b5c9d7 update readme 2021-07-16 02:44:06 +02:00
ed b9c3538253 nope, not doing this 2021-07-15 23:49:30 +02:00
ed 2bc0cdf017 fix md-editor hotkeys on dvorak 2021-07-15 23:24:10 +02:00
ed 02a91f60d4 playing some golf 2021-07-15 23:19:37 +02:00
ed fae83da197 v0.11.40 2021-07-15 01:13:15 +02:00
ed 0fe4aa6418 ux tweaks 2021-07-15 01:04:38 +02:00
ed 21a51bf0dc make it feel like home 2021-07-15 00:50:43 +02:00
ed bcb353cc30 allow ctrl-clicking primary tabs 2021-07-15 00:37:14 +02:00
ed 6af4508518 adjust the sfx edit warning 2021-07-15 00:26:33 +02:00
ed 6a559bc28a gallery: dispose videos to stop buffering 2021-07-15 00:22:26 +02:00
ed 0f5026cd20 gallery: option to autoplay next video on end 2021-07-15 00:04:33 +02:00
ed a91b80a311 gallery: add video loop hotkey R 2021-07-14 09:42:38 +02:00
ed ec534701c8 gallery: pause/resume audio player on video 2021-07-14 09:40:12 +02:00
ed af5169f67f gallery: fix hotkeys + focus 2021-07-14 09:35:50 +02:00
ed 18676c5e65 better crash page 2021-07-14 09:34:42 +02:00
ed e2df6fda7b update hotkeys 2021-07-13 02:20:52 +02:00
ed e9ae9782fe v0.11.39 2021-07-13 00:54:23 +02:00
ed 016dba4ca9 v0.11.38 2021-07-13 00:35:34 +02:00
ed 39c7ef305f add a link to clear settings on the js crash page 2021-07-13 00:33:46 +02:00
ed 849c1dc848 video-player: add hotkeys m=mute, f=fullscreen 2021-07-13 00:23:48 +02:00
ed 61414014fe gallery: fix link overlapping image 2021-07-13 00:14:06 +02:00
ed 578a915884 stack/thread monitors in mpw + better thread names 2021-07-12 23:03:52 +02:00
ed eacafb8a63 add option to log summary of running threads 2021-07-12 22:57:37 +02:00
ed 4446760f74 fix link to ?stack on rootless configs 2021-07-12 22:55:38 +02:00
ed 6da2a083f9 v0.11.37 2021-07-12 00:51:59 +02:00
ed 8837c8f822 print zip/tar errors to log 2021-07-12 00:47:22 +02:00
ed bac301ed66 get rid of iffy default-args 2021-07-12 00:15:13 +02:00
ed 061db3906d v0.11.36 2021-07-11 06:39:58 +02:00
ed fd7df5c952 v0.11.35 2021-07-11 06:22:56 +02:00
ed a270019147 easier to tell youre trying to watch a video that firefox cant deal with 2021-07-11 06:21:25 +02:00
ed 55e0209901 add video-player keybinds 2021-07-11 06:12:24 +02:00
ed 2b255fbbed add in-gallery video playback 2021-07-11 03:25:46 +02:00
ed 8a2345a0fb top of the sandwich fell off 2021-07-11 02:06:18 +02:00
ed bfa9f535aa more context in exceptions 2021-07-11 01:59:07 +02:00
ed f757623ad8 make bdmv thumbnails 2021-07-09 20:09:32 +02:00
ed 3c7465e268 option to disable thumbcache eviction 2021-07-09 19:55:17 +02:00
ed 108665fc4f v0.11.34 2021-07-09 17:12:21 +02:00
ed ed519c9138 add performance notes 2021-07-09 17:10:37 +02:00
ed 2dd2e2c57e discard logs in mpw 2021-07-09 17:01:11 +02:00
ed 6c3a976222 scale max-clients to mp-workers 2021-07-09 16:48:02 +02:00
ed 80cc26bd95 fix max-client limit 2021-07-09 16:33:11 +02:00
ed 970fb84fd8 hex looks better 2021-07-09 16:11:33 +02:00
ed 20cbcf6931 logging + shutdown cleanup 2021-07-09 16:07:16 +02:00
ed 8fcde2a579 move tcp accept into mp-worker 2021-07-09 15:49:36 +02:00
ed b32d1f8ad3 make ?stack work anywhere 2021-07-09 13:46:42 +02:00
ed 03513e0cb1 effectively pointless but cool 2021-07-09 03:41:44 +02:00
ed e041a2b197 fix centos7 support 2021-07-08 23:35:28 +02:00
ed d7d625be2a v0.11.33 2021-07-07 10:45:47 +02:00
ed 4121266678 v0.11.32 2021-07-06 21:58:03 +02:00
ed 22971a6be4 up2k-cli: add turbo button 2021-07-06 21:43:07 +02:00
ed efbf8d7e0d better handling of invalid requests 2021-07-06 01:03:09 +02:00
ed 397396ea4a apply -nw to PUT uploads too 2021-07-06 00:49:39 +02:00
ed e59b077c21 announce the rotates 2021-07-06 00:43:37 +02:00
ed 4bc39f3084 add logrotate 2021-07-06 00:23:51 +02:00
ed 21c3570786 detect more recursive symlinks 2021-07-05 23:50:03 +02:00
ed 2f85c1fb18 add logging to file 2021-07-05 23:30:33 +02:00
ed 1e27a4c2df make thumb-dir.txt unretrievable 2021-07-05 00:21:33 +02:00
ed 456f575637 v0.11.31 2021-07-04 16:44:29 +02:00
ed 51546c9e64 add missing -nw check 2021-07-04 16:10:20 +02:00
ed 83b4b70ef4 add keepalive handshakes 2021-07-04 16:04:26 +02:00
ed a5120d4f6f parallelize handshakes 2021-07-04 01:48:01 +02:00
ed c95941e14f add testimonials, drop bad idea 2021-07-04 00:32:29 +02:00
ed 0dd531149d good 2021-07-03 18:11:52 +02:00
ed 67da1b5219 add ideas 2021-07-03 17:29:49 +02:00
ed 919bd16437 add hls notes 2021-07-03 01:32:36 +02:00
ed ecead109ab v0.11.30 2021-07-01 22:27:19 +02:00
ed 765294c263 ignore dupe-chunk warnings; handshake takes care of it 2021-07-01 20:22:12 +02:00
ed d6b5351207 add cachebuster because chrome ignores no-cache 2021-07-01 20:10:02 +02:00
ed a2009bcc6b up2k-cli: recover from tcp/dns issues on upload 2021-07-01 00:52:09 +02:00
ed 12709a8a0a up2k-cli: recover from antivirus yanking files mid-read 2021-07-01 00:11:40 +02:00
ed c055baefd2 up2k-client: maybe fix busy-tab (assumed linear progress) 2021-06-30 23:17:07 +02:00
ed 56522599b5 up2k-client: way faster init on large filedrops 2021-06-30 21:26:13 +02:00
ed 664f53b75d chrome gets stuck iterating over aux.h on win10 2021-06-30 19:26:06 +02:00
ed 87200d9f10 make -nw apply to more stuff 2021-06-30 19:23:45 +02:00
ed 5c3d0b6520 catch errors in onloads 2021-06-30 17:09:37 +02:00
ed bd49979f4a v0.11.29 2021-06-30 01:51:57 +02:00
ed 7e606cdd9f make search rate-control less visually confusing 2021-06-30 01:44:25 +02:00
ed 8b4b7fa794 allow opening tree nodes in a new tab 2021-06-30 01:08:20 +02:00
ed 05345ddf8b add per-connection request counting 2021-06-30 01:00:00 +02:00
ed 66adb470ad optional progressbar tint 2021-06-30 00:55:57 +02:00
ed e15c8fd146 add upload pause 2021-06-30 00:34:33 +02:00
ed 0f09b98a39 scan for additional folder thumbnails 2021-06-30 00:19:39 +02:00
ed b4d6f4e24d american-friendly upload limits (allow additional bypass using manual text entry) 2021-06-30 00:11:23 +02:00
ed 3217fa625b more todo 2021-06-29 23:59:15 +02:00
ed e719ff8a47 make sfx kipu-proof 2021-06-29 23:53:57 +02:00
ed 9fcf528d45 update readme 2021-06-29 23:32:21 +02:00
ed 1ddbf5a158 update todo 2021-06-29 23:00:28 +02:00
ed 64bf4574b0 add todo maybe 2021-06-28 20:38:59 +02:00
ed 5649d26077 v0.11.28 2021-06-28 15:36:13 +02:00
ed 92f923effe hotkey for adjusting tree width 2021-06-28 15:34:10 +02:00
ed 0d46d548b9 fix panic when zero accounts 2021-06-28 15:20:40 +02:00
ed 062df3f0c3 point control-panel link to / 2021-06-27 00:52:15 +02:00
ed 789fb53b8e tweaks 2021-06-27 00:49:28 +02:00
ed 351db5a18f ah yes trailing whitespace as markup my good old friend we meet again 2021-06-27 00:20:42 +02:00
ed aabbd271c8 add debian howto 2021-06-27 00:19:37 +02:00
ed aae8e0171e v0.11.27 2021-06-25 22:23:21 +02:00
ed 45827a2458 fix exit-search button in gridview 2021-06-25 22:18:16 +02:00
ed 726030296f apparently the html dom-property is not normalized 2021-06-25 22:07:37 +02:00
ed 6659ab3881 ajax subfolders from gridview 2021-06-25 21:49:09 +02:00
ed c6a103609e fix gridview selection/baguettebox order 2021-06-25 21:35:45 +02:00
ed c6b3f035e5 gridview audio playback in search results too 2021-06-25 21:12:49 +02:00
ed 2b0a7e378e persist url-password as cookie 2021-06-25 20:39:55 +02:00
ed b75ce909c8 audio seek with scrollbar on progressbar 2021-06-25 20:24:30 +02:00
ed 229c3f5dab play audio from grid when widget open 2021-06-25 20:04:19 +02:00
ed ec73094506 v0.11.26 2021-06-25 03:10:43 +02:00
ed c7650c9326 v0.11.25 2021-06-25 03:06:15 +02:00
ed d94c6d4e72 more rice 2021-06-25 03:02:04 +02:00
ed 3cc8760733 clear seekbar when switching folders 2021-06-25 02:56:21 +02:00
ed a2f6973495 heh 2021-06-25 02:43:47 +02:00
ed f8648fa651 always set mediasession play/pause state 2021-06-25 02:39:39 +02:00
ed 177aa038df send charset=utf8 for css, js files 2021-06-25 02:10:42 +02:00
ed e0a14ec881 event hints for ogvjs playback 2021-06-25 02:03:18 +02:00
ed 9366512f2f audio player: add pause-fade + track-restart +
fix ogvjs paused-seek
2021-06-25 01:46:30 +02:00
ed ea38b8041a actually fix autoplay on some chromes 2021-06-25 00:43:58 +02:00
ed f1870daf0d retry filesearch when rate-limited 2021-06-23 22:01:06 +02:00
ed 9722441aad maybe fix autoplay on some chromes 2021-06-23 20:35:05 +02:00
ed 9d014087f4 censor passwords in logs 2021-06-23 00:04:11 +02:00
ed 83b4038b85 ok they actually served a purpose 2021-06-22 21:33:11 +00:00
ed 1e0a448feb audio-key: truncate at 5min + mojibake support 2021-06-22 22:21:39 +02:00
ed fb81de3b36 v0.11.24 2021-06-22 17:28:09 +02:00
ed aa4f352301 prefer audio tags in audio files 2021-06-22 17:21:24 +02:00
ed f1a1c2ea45 recover from opening a corrupt database 2021-06-22 17:19:56 +02:00
ed 6249bd4163 add pebkac hints 2021-06-22 17:18:34 +02:00
ed 2579dc64ce update notes 2021-06-21 22:49:28 +00:00
ed 356512270a file extensions dont contain whitespace 2021-06-21 23:50:35 +02:00
ed bed27f2b43 mention fix for the OSD popup on windows 2021-06-21 23:43:07 +02:00
ed 54013d861b v0.11.23 2021-06-21 21:15:56 +02:00
ed ec100210dc support showing album-cover on windows lockscreen 2021-06-21 19:15:22 +00:00
ed 3ab1acf32c v0.11.22 2021-06-21 20:30:29 +02:00
ed 8c28266418 subscribe to media-keys globally as a media player 2021-06-21 20:26:11 +02:00
ed 7f8b8dcb92 scandir is not withable before py3.6 2021-06-21 20:23:35 +02:00
ed 6dd39811d4 disable u2idx if sqlite3 is unavailable 2021-06-21 20:22:54 +02:00
ed 35e2138e3e doc: macos support 2021-06-21 18:42:15 +02:00
ed 239b4e9fe6 v0.11.21 2021-06-20 21:25:18 +02:00
ed 2fcd0e7e72 abandon listing tags in browser when db busy 2021-06-20 21:19:47 +02:00
ed 357347ce3a lower timeout on db reads 2021-06-20 21:03:35 +02:00
ed 36dc1107fb update dbtool desc 2021-06-20 20:05:43 +02:00
ed 0a3bbc4b4a v0.11.20 for real 2021-06-20 19:32:17 +02:00
ed 855b93dcf6 v0.11.20 2021-06-20 18:53:58 +02:00
ed 89b79ba267 fix histpath getting indexed on windows 2021-06-20 17:59:27 +02:00
ed f5651b7d94 dont include hidden colums in /np clips 2021-06-20 17:45:59 +02:00
ed 1881019ede support cygpaths for mtag binaries 2021-06-20 17:45:23 +02:00
ed caba4e974c upgrade dbtool for v4 2021-06-20 17:44:24 +02:00
ed bc3c9613bc cosmetic macos fix on shutdown 2021-06-20 15:50:37 +02:00
ed 15a3ee252e support backslash in filenames 2021-06-20 15:50:06 +02:00
ed be055961ae adjust up2k hashlen to match base64 window 2021-06-20 15:32:36 +02:00
ed e3031bdeec fix up2k folder-upload 2021-06-20 00:00:50 +00:00
ed 75917b9f7c better fallback 2021-06-19 16:21:39 +02:00
ed 910732e02c update build notes 2021-06-19 16:20:35 +02:00
ed 264b497681 v0.11.19 2021-06-19 01:32:17 +02:00
ed 372b949622 fix tooltip indicator 2021-06-19 01:25:07 +02:00
ed 789a602914 save some more bytes on the wire 2021-06-19 01:18:48 +02:00
ed 093e955100 move stuff that needs javascript out of the html 2021-06-19 01:10:40 +02:00
ed c32a89bebf minor lightmode tweaks 2021-06-19 00:17:39 +02:00
ed c0bebe9f9f eq-param error-hilight in lightmode 2021-06-18 23:51:26 +02:00
ed 57579b2fe5 fix android-chrome layout glitch in up2k 2021-06-18 23:38:43 +02:00
ed 51d14a6b4d fix toolbar tooltips on android 2021-06-18 22:11:01 +02:00
ed c50f1b64e5 dodge android-chrome bug: canvas aspect ratio 2021-06-18 21:46:15 +02:00
ed 98aaab02c5 block scroll events, hilight selected radios 2021-06-18 20:49:38 +02:00
ed 0fc7973d8b add shadow to playback times 2021-06-18 20:24:36 +02:00
ed 10362aa02e v0.11.18 2021-06-18 00:30:37 +02:00
ed 0a8e759fe6 v0.11.17 2021-06-17 00:31:38 +02:00
ed d70981cdd1 fix eq param input 2021-06-17 00:29:14 +02:00
ed e08c03b886 audio-filters: expose gain control 2021-06-16 22:25:29 +02:00
ed 56086e8984 ux: contrast tweaks + fix anchor-scroll 2021-06-16 21:38:30 +02:00
ed 1aa9033022 add play/pause hotkey 2021-06-16 19:19:29 +02:00
ed 076e103d53 ux: responsive settings layout 2021-06-16 19:10:32 +02:00
ed 38c00ea8fc print thumbnail cleanup summary 2021-06-16 18:57:10 +02:00
ed 415757af43 mention the symlink-scanner too 2021-06-16 18:37:23 +02:00
ed e72ed8c0ed mention some essentials 2021-06-16 18:29:29 +02:00
ed 32f9c6b5bb v0.11.16 2021-06-16 01:51:18 +02:00
ed 6251584ef6 fix .13dB clipping with all-zero eq 2021-06-15 23:37:44 +00:00
ed f3e413bc28 icons 2021-06-16 00:01:07 +02:00
ed 6f6cc8f3f8 move eq to the player settings tab 2021-06-15 22:26:39 +02:00
ed 8b081e9e69 media player: continue to next folder 2021-06-15 22:19:53 +02:00
ed c8a510d10e fully hide columns when minimized 2021-06-15 21:43:37 +02:00
ed 6f834f6679 sticky tree header 2021-06-15 21:07:27 +02:00
ed cf2d6650ac audio-eq: flatten frequency response 2021-06-15 21:06:00 +02:00
ed cd52dea488 v0.11.15 2021-06-15 00:01:11 +02:00
ed 6ea75df05d add audio equalizer 2021-06-14 23:58:56 +02:00
ed 4846e1e8d6 mention num.clients for rproxy 2021-06-14 19:27:34 +02:00
ed fc024f789d v0.11.14 2021-06-14 03:05:50 +02:00
ed 473e773aea fix deadlock 2021-06-14 00:55:11 +00:00
ed 48a2e1a353 add threadwatcher 2021-06-14 01:57:18 +02:00
ed 6da63fbd79 up2k-cli: recover from lost handshakes 2021-06-14 01:01:06 +02:00
ed 5bec37fcee fix cosmetic login glitch 2021-06-14 00:28:08 +02:00
ed 3fd0ba0a31 oh right its the other way around 2021-06-13 22:49:55 +02:00
ed 241a143366 add --rproxy for explicit proxy level 2021-06-13 22:22:31 +02:00
ed a537064da7 custom-css example to add filetype icons 2021-06-13 00:49:28 +02:00
ed f3dfd24c92 v0.11.13 2021-06-12 20:37:05 +02:00
ed fa0a7f50bb add image gallery 2021-06-12 20:25:08 +02:00
ed 44a78a7e21 v0.11.12 2021-06-12 04:28:21 +02:00
ed 6b75cbf747 add readme 2021-06-12 04:26:53 +02:00
ed e7b18ab9fe custom css 2021-06-12 04:22:07 +02:00
ed aa12830015 keep transparency in thumbnails 2021-06-12 03:32:06 +02:00
ed f156e00064 s/cover/folder/g 2021-06-12 03:06:56 +02:00
ed d53c212516 add mtp queue to status page 2021-06-12 02:23:48 +02:00
ed ca27f8587c add cygpath support for volume src too 2021-06-12 01:55:45 +02:00
ed 88ce008e16 more status on admin panel 2021-06-12 01:39:14 +02:00
ed 081d2cc5d7 add folder thumbnails (cover.jpg or png) 2021-06-11 23:54:54 +02:00
ed 60ac68d000 single authsrv instance per process 2021-06-11 23:01:13 +02:00
ed fbe656957d fix race 2021-06-11 18:12:06 +02:00
ed 5534c78c17 tests pass 2021-06-11 03:10:33 +02:00
ed a45a53fdce support macos ffmpeg 2021-06-11 03:05:42 +02:00
ed 972a56e738 fix stuff 2021-06-11 01:45:28 +02:00
ed 5e03b3ca38 use parent db/thumbs in jump-volumes 2021-06-10 20:43:19 +02:00
ed 1078d933b4 adding --no-hash 2021-06-10 18:08:30 +02:00
ed d6bf300d80 option to store state out-of-volume (mostly untested) 2021-06-10 01:27:04 +02:00
ed a359d64d44 v0.11.11 2021-06-08 23:43:00 +02:00
ed 22396e8c33 zopfli js/css 2021-06-08 23:19:35 +02:00
ed 5ded5a4516 alphabetical up2k indexing 2021-06-08 21:42:08 +02:00
ed 79c7639aaf haha memes 2021-06-08 21:10:25 +02:00
ed 5bbf875385 fuse-client: print python version 2021-06-08 20:19:51 +02:00
ed 5e159432af vscode: support running with -jN 2021-06-08 20:18:24 +02:00
ed 1d6ae409f6 count expenses when sending files 2021-06-08 20:17:53 +02:00
ed 9d729d3d1a add thread names 2021-06-08 20:14:23 +02:00
ed 4dd5d4e1b7 when rootless, blank instead of block rootdir 2021-06-08 18:35:55 +02:00
ed acd8149479 dont track workloads unless multiprocessing 2021-06-08 18:01:59 +02:00
ed b97a1088fa v0.11.10 2021-06-08 09:41:31 +02:00
ed b77bed3324 fix terminating tls connections wow 2021-06-08 09:40:49 +02:00
ed a2b7c85a1f forgot what version was running on a box 2021-06-08 00:01:08 +02:00
ed b28533f850 v0.11.9 2021-06-07 20:22:10 +02:00
ed bd8c7e538a sfx.sh: use system jinja2 when available 2021-06-07 20:09:45 +02:00
ed 89e48cff24 detect recursive symlinks 2021-06-07 20:09:18 +02:00
ed ae90a7b7b6 mention firefox funny 2021-06-07 02:10:54 +02:00
ed 6fc1be04da support windows-py3.5 2021-06-06 21:10:53 +02:00
ed 0061d29534 v0.11.8 2021-06-06 19:09:55 +02:00
ed a891f34a93 update sharex example 2021-06-06 19:06:33 +02:00
ed d6a1e62a95 append file-ext when avoiding name collisions 2021-06-06 18:53:32 +02:00
ed cda36ea8b4 support json replies from bput 2021-06-06 18:47:21 +02:00
ed 909a76434a a 2021-06-06 03:07:11 +02:00
ed 39348ef659 add sharex example 2021-06-06 02:53:01 +02:00
ed 99d30edef3 v0.11.7 2021-06-05 03:33:29 +02:00
ed b63ab15bf9 gallery links in new tab if a selection is atcive 2021-06-05 03:27:44 +02:00
ed 485cb4495c minify asmcrypto a bit 2021-06-05 03:25:54 +02:00
ed df018eb1f2 add colors 2021-06-05 01:34:39 +02:00
ed 49aa47a9b8 way faster sha512 wasm fallback 2021-06-05 01:14:16 +02:00
ed 7d20eb202a optimize 2021-06-04 19:35:08 +02:00
ed c533da9129 fix single-threaded mtag 2021-06-04 19:00:24 +02:00
ed 5cba31a814 spin on thumbnails too 2021-06-04 17:38:57 +02:00
ed 1d824cb26c add volume lister / containment checker 2021-06-04 02:23:46 +02:00
ed 83b903d60e readme: update todos 2021-06-02 09:42:33 +02:00
ed 9c8ccabe8e v0.11.6 2021-06-01 08:25:35 +02:00
ed b1f2c4e70d gain 1000x performance with one weird trick 2021-06-01 06:17:46 +00:00
ed 273ca0c8da run tests on commit 2021-06-01 05:49:41 +02:00
ed d6f516b34f pypi exclusive 2021-06-01 04:14:23 +02:00
ed 83127858ca v0.11.4 2021-06-01 03:55:51 +02:00
ed d89329757e fix permission check in tar/zip generator (gdi) 2021-06-01 03:55:31 +02:00
ed 49ffec5320 v0.11.3 2021-06-01 03:11:02 +02:00
ed 2eaae2b66a fix youtube query example 2021-06-01 02:53:54 +02:00
ed ea4441e25c v0.11.2 2021-06-01 02:47:37 +02:00
ed e5f34042f9 more precise volume state in admin panel 2021-06-01 02:32:53 +02:00
ed 271096874a fix adv and date handling in query lang 2021-06-01 02:10:17 +02:00
ed 8efd780a72 thumbnail cleaner too noisy 2021-06-01 01:51:03 +02:00
ed 41bcf7308d fix search results as thumbnails 2021-06-01 01:41:36 +02:00
ed d102bb3199 fix on-upload hasher (0.11.1 regression) 2021-06-01 01:20:34 +02:00
ed d0bed95415 search: add a query language 2021-06-01 01:16:40 +02:00
ed 2528729971 add dbtool 2021-05-30 16:49:08 +00:00
ed 292c18b3d0 v0.11.1 2021-05-29 23:39:39 +02:00
ed 0be7c5e2d8 live db/tags rescan 2021-05-29 23:35:07 +02:00
ed eb5aaddba4 v0.11.0 2021-05-29 15:03:32 +02:00
ed d8fd82bcb5 ffthumb only gets one shot 2021-05-29 12:32:51 +02:00
ed 97be495861 another chrome bug:
navigating somewhere and back can return a REALLY OLD copy of the page
2021-05-29 12:31:06 +02:00
ed 8b53c159fc dodge chrome bug 2021-05-29 10:58:21 +02:00
ed 81e281f703 add opus mimetype 2021-05-29 10:17:24 +02:00
ed 3948214050 drop deleted files from snap 2021-05-29 09:03:18 +02:00
ed c5e9a643e7 more accurate url escaping 2021-05-29 09:02:42 +02:00
ed d25881d5c3 mojibake fixes 2021-05-29 09:01:59 +02:00
ed 38d8d9733f fix bugs 2021-05-29 05:50:41 +02:00
ed 118ebf668d fix bugs 2021-05-29 05:43:09 +02:00
ed a86f09fa46 mtp: file extension filtering 2021-05-29 04:18:57 +02:00
ed dd4fb35c8f nit 2021-05-29 03:45:02 +02:00
ed 621eb4cf95 add multitag example 2021-05-29 03:43:30 +02:00
ed deea66ad0b support multiple tags from mtp helpers 2021-05-29 03:43:14 +02:00
ed bf99445377 groking the ffprobe tarot cards 2021-05-28 06:25:44 +02:00
ed 7b54a63396 icon fix 2021-05-28 06:25:00 +02:00
ed 0fcb015f9a minor fixes 2021-05-28 05:16:28 +02:00
ed 0a22b1ffb6 dont log thumbnail GETs by default 2021-05-28 05:16:01 +02:00
ed 68cecc52ab dont grow thumbs 2021-05-28 05:01:25 +02:00
ed 53657ccfff add avif read support 2021-05-28 05:01:12 +02:00
ed 96223fda01 detect missing webp support 2021-05-28 05:00:08 +02:00
ed 374ff3433e gj 2021-05-28 02:52:03 +02:00
ed 5d63949e98 create webp thumbnails by default 2021-05-28 02:44:13 +02:00
ed 6b065d507d crop thumbs for AESTHETICS 2021-05-28 01:46:27 +02:00
ed e79997498a a 2021-05-27 01:42:22 +02:00
ed f7ee02ec35 ux fixes 2021-05-27 01:41:50 +02:00
ed 69dc433e1c ffprobe parser less bad 2021-05-27 01:41:12 +02:00
ed c880cd848c gridview lightmode 2021-05-26 22:53:40 +02:00
ed 5752b6db48 hook up the multiselect ui 2021-05-26 00:47:43 +02:00
ed b36f905eab sort folders first + tweak thumbs ui 2021-05-25 21:15:54 +02:00
ed 483dd527c6 add cache eviction 2021-05-25 19:46:35 +02:00
ed e55678e28f fix thumb/ico bugs 2021-05-25 17:36:31 +02:00
ed 3f4a8b9d6f fixes 2021-05-25 06:35:12 +02:00
ed 02a856ecb4 create video thumbnails 2021-05-25 06:14:25 +02:00
ed 4dff726310 initial thumbnail and icon stuff 2021-05-25 03:37:01 +02:00
ed cbc449036f readme: todo 2021-05-23 02:43:40 +02:00
ed 8f53152220 todays mistake 2021-05-21 02:30:45 +02:00
ed bbb1e165d6 v0.10.22 2021-05-18 04:10:37 +02:00
ed fed8d94885 handle unsupported codecs better 2021-05-18 03:44:30 +02:00
ed 58040cc0ed fix the treesize off-by-one (*finally*) 2021-05-18 03:21:53 +02:00
ed 03d692db66 add now-playing clipboard meme 2021-05-18 02:54:52 +02:00
ed 903f8e8453 logging 2021-05-17 18:45:15 +02:00
ed 405ae1308e v0.10.21 2021-05-16 20:22:33 +02:00
ed 8a0f583d71 oh no 2021-05-16 11:01:32 +02:00
ed b6d7017491 readme 2021-05-16 09:05:40 +02:00
ed 0f0217d203 readme 2021-05-16 08:52:22 +02:00
ed a203e33347 v0.10.20 2021-05-16 07:51:39 +02:00
ed 3b8f697dd4 include links in bup summary 2021-05-16 07:51:22 +02:00
ed 78ba16f722 log filtering by url regex 2021-05-16 07:29:34 +02:00
ed 0fcfe79994 general-purpose file parsing 2021-05-16 07:04:18 +02:00
ed c0e6df4b63 let it gooo 2021-05-16 05:27:04 +02:00
ed 322abdcb43 more dino support 2021-05-16 05:04:44 +02:00
ed 31100787ce ahh whatever 2021-05-16 03:21:49 +02:00
ed c57d721be4 ie11 doesnt support sha512 2021-05-16 03:11:37 +02:00
ed 3b5a03e977 this too 2021-05-16 02:34:36 +02:00
ed ed807ee43e native sha512 on old iphones 2021-05-16 02:25:00 +02:00
ed 073c130ae6 respect tooltip pref in up2k 2021-05-16 02:18:54 +02:00
ed 8810e0be13 add option to log headers 2021-05-16 02:11:09 +02:00
ed f93016ab85 dont suggest bup if no write-access 2021-05-16 00:30:32 +02:00
ed b19cf260c2 drop the control-panel link too 2021-05-14 20:07:48 +02:00
ed db03e1e7eb readme 2021-05-14 16:38:07 +02:00
ed e0d975e36a v0.10.19 2021-05-14 00:00:15 +02:00
ed cfeb15259f not careful enough 2021-05-13 23:29:15 +02:00
ed 3b3f8fc8fb careful rice 2021-05-13 23:00:51 +02:00
ed 88bd2c084c misc 2021-05-13 22:58:36 +02:00
ed bd367389b0 broke windows 2021-05-13 22:58:23 +02:00
ed 58ba71a76f option to hide incomplete uploads 2021-05-13 22:56:52 +02:00
ed d03e34d55d v0.10.18 2021-05-13 17:42:06 +02:00
ed 24f239a46c ui tweaks 2021-05-13 17:41:14 +02:00
ed 2c0826f85a conditional sections in volume listing 2021-05-13 17:24:37 +02:00
ed c061461d01 fix md perm reqs + dyn up2k modeset 2021-05-13 17:22:31 +02:00
ed e7982a04fe explicit redirect to single non-roots 2021-05-13 16:54:31 +02:00
ed 33b91a7513 set password cookie expiration 2021-05-13 16:23:28 +02:00
ed 9bb1323e44 rclone faster + query params correctness 2021-05-13 16:02:30 +02:00
ed e62bb807a5 better 2021-05-13 01:36:14 +02:00
ed 3fc0d2cc4a better 2021-05-13 00:43:25 +02:00
ed 0c786b0766 v0.10.17 2021-05-12 23:39:54 +02:00
ed 68c7528911 yes good 2021-05-12 23:26:30 +02:00
ed 26e18ae800 disallow uploading logues 2021-05-12 23:22:43 +02:00
ed c30dc0b546 write-only QoL mostly 2021-05-12 23:06:13 +02:00
ed f94aa46a11 open write-only folders from tree 2021-05-12 21:50:32 +02:00
ed 403261a293 support pyinstaller 2021-05-12 21:21:07 +02:00
ed c7d9cbb11f show logues in write-only folders 2021-05-12 21:20:59 +02:00
ed 57e1c53cbb mention volume flags in the cfg-file example 2021-05-02 09:48:19 +02:00
ed 0754b553dd v0.10.16 2021-05-02 09:18:19 +02:00
ed 50661d941b cfg-parser: fix wildcard permissions 2021-05-02 09:16:14 +02:00
ed c5db7c1a0c pickle needs this ;_; 2021-04-29 22:41:57 +02:00
ed 2cef5365f7 readme again 2021-04-27 09:26:14 +02:00
ed fbc4e94007 readme (realized this was confusing) 2021-04-27 09:24:50 +02:00
ed 037ed5a2ad readme 2021-04-26 04:02:22 +02:00
ed 69dfa55705 readme 2021-04-26 04:01:47 +02:00
ed a79a5c4e3e readme + ui tweaks 2021-04-25 22:44:50 +02:00
ed 7e80eabfe6 readme 2021-04-25 21:42:45 +02:00
ed 375b72770d readme 2021-04-25 04:34:06 +02:00
ed e2dd683def does this look better 2021-04-25 03:04:24 +02:00
ed 9eba50c6e4 readme 2021-04-25 03:00:47 +02:00
ed 5a579dba52 sfx: help bzip2 make smaller archives 2021-04-24 22:07:09 +02:00
ed e86c719575 sfx: cooperate better with other instances 2021-04-24 22:06:50 +02:00
ed 0e87f35547 ui tweaks 2021-04-24 22:06:21 +02:00
ed b6d3d791a5 shave 2021-04-24 20:08:07 +02:00
ed c9c3302664 a 2021-04-24 19:22:15 +02:00
ed c3e4d65b80 v0.10.15 2021-04-24 04:05:57 +02:00
ed 27a03510c5 quick upload test too 2021-04-24 03:35:58 +02:00
ed ed7727f7cb fix write-only volumes + add regression test 2021-04-24 02:48:41 +02:00
ed 127ec10c0d js cleanup + minor tweaks 2021-04-23 20:04:17 +02:00
ed 5a9c0ad225 ui tweaks 2021-04-22 09:10:32 +02:00
ed 7e8daf650e v0.10.14 2021-04-21 22:04:21 +02:00
ed 0cf737b4ce 404 rather than redirect home if 404 or 403 2021-04-21 21:51:27 +02:00
ed 74635e0113 phew 2021-04-21 21:42:37 +02:00
ed e5c4f49901 ok ok 2021-04-21 21:26:55 +02:00
ed e4654ee7f1 uhh 2021-04-21 21:13:16 +02:00
ed e5d05c05ed up2k ui tweaks 2021-04-21 20:50:10 +02:00
ed 73c4f99687 add markdown streaming 2021-04-21 20:28:50 +02:00
ed 28c12ef3bf cleanup 2021-04-21 18:48:23 +02:00
ed eed82dbb54 remove dead code 2021-04-21 18:44:47 +02:00
ed 2c4b4ab928 up2k-cli: cond. readahead 2021-04-21 18:39:55 +02:00
ed 505a8fc6f6 up2k: sparse alloc on windows 2021-04-21 18:32:21 +02:00
ed e4801d9b06 support msys2-python 2021-04-21 18:28:44 +02:00
ed 04f1b2cf3a v0.10.13 2021-04-21 01:19:22 +02:00
ed c06d928bb5 sorry android 2021-04-21 01:10:18 +02:00
ed ab09927e7b v0.10.12 2021-04-19 21:58:49 +02:00
ed 779437db67 up2k: more runahead 2021-04-19 21:58:30 +02:00
ed 28cbdb652e v0.10.11 2021-04-19 21:43:08 +02:00
ed 2b2415a7d8 up2k: gotta go faster 2021-04-19 21:29:43 +02:00
ed 746a8208aa v0.10.10 2021-04-19 17:17:07 +02:00
ed a2a041a98a optimize 2021-04-19 16:54:38 +02:00
ed 10b436e449 browser: add media fragment uris 2021-04-19 16:41:06 +02:00
ed 4d62b34786 browser: add light mode 2021-04-19 15:40:32 +02:00
ed 0546210687 fix up2k progressbars 2021-04-19 13:18:29 +02:00
ed f8c11faada don't start 2t stuff if there's no backend avail 2021-04-19 13:17:34 +02:00
ed 16d6e9be1f tweaks 2021-04-17 09:24:25 +02:00
ed aff8185f2e v0.10.9 2021-04-17 01:29:27 +02:00
ed 217d15fe81 up2k: cheap progress bars 2021-04-17 00:57:35 +02:00
ed 171e93c201 up2k: show realtime speeds 2021-04-17 00:01:03 +02:00
ed acc1d2e9e3 up2k: show some context in the busy-tab 2021-04-16 23:49:57 +02:00
ed 49c2f37154 up2k: replace progressbars with text 2021-04-16 21:23:53 +02:00
ed 69e54497aa yes good 2021-04-14 16:03:15 +02:00
ed 9aa1885669 hide search tab when d2d 2021-04-14 15:23:25 +02:00
ed 4418508513 dodge cpython bug 2021-04-14 14:37:44 +02:00
ed e897df3b34 v0.10.8 2021-04-11 21:26:39 +02:00
ed 8cd97ab0e7 much better 2021-04-11 21:07:41 +02:00
ed bf4949353d support url-pwd on mounts page 2021-04-11 20:43:35 +02:00
ed 98a944f7cc no bopping 2021-04-11 20:23:38 +02:00
ed 7c10f81c92 stop eating browser hotkeys 2021-04-11 20:01:03 +02:00
ed 126ecc55c3 listen to the linter 2021-04-11 19:51:51 +02:00
ed 1034a51bd2 support ~ paths 2021-04-11 17:36:38 +02:00
ed a2657887cc vscode: get no-dbg args from launch.json 2021-04-11 17:22:42 +02:00
ed c14b17bfaf whoops 2021-04-10 20:22:33 +02:00
ed 59ebc795e7 tree scroll snapping 2021-04-10 19:30:30 +02:00
ed 8e128d917e sfx: support non-bz2 py 2021-04-10 18:30:58 +02:00
ed ea762b05e0 guess they stole it from win10, sausage 2021-04-10 18:16:57 +02:00
ed db374b19f1 mention the new cflags in -h 2021-04-07 21:13:45 +02:00
ed ab3839ef36 w/a argparser bug fixed 2018-06-08 2021-04-07 20:31:29 +02:00
ed 9886c442f2 add missing uridecode 2021-04-03 23:58:51 +02:00
ed c8d1926d52 h 2021-04-03 08:26:42 +02:00
ed a6bd699e52 safari funny 2021-04-03 08:08:43 +02:00
ed 12143f2702 http/1.0, minimal dir listing, pw in url 2021-04-03 07:56:35 +02:00
ed 480705dee9 more todo 2021-04-03 04:41:10 +02:00
ed 781d5094f4 update todo 2021-04-03 04:13:51 +02:00
ed 5615cb94cd adj browser support table 2021-04-03 02:58:50 +02:00
ed 302302a2ac fix zip touch events on iOS 2021-04-03 02:52:19 +02:00
ed 9761b4e3e9 v0.10.7 2021-04-03 00:35:46 +02:00
ed 0cf6924dca v0.10.6 2021-04-02 03:11:40 +02:00
ed 5fd81e9f90 fix unreadable links when playing search results 2021-04-02 03:05:23 +02:00
ed 52bf6f892b more 2021-04-02 02:55:41 +02:00
ed f3cce232a4 restore minimal support for old browsers 2021-04-02 02:43:07 +02:00
ed 53d3c8b28e decode urlform messages 2021-04-01 23:36:14 +02:00
ed 83fec3cca7 v0.10.5 2021-03-31 01:28:58 +02:00
ed 3cefc99b7d search fixes 2021-03-31 01:20:09 +02:00
ed 3a38dcbc05 v0.10.4 2021-03-29 20:53:20 +02:00
ed 7ff08bce57 browser: stable sort 2021-03-29 20:08:32 +02:00
ed fd490af434 explain the jank 2021-03-29 06:11:33 +02:00
ed 1195b8f17e v0.10.3 2021-03-29 04:47:59 +02:00
ed 28dce13776 no load-balancer spam when -q 2021-03-28 03:06:52 +02:00
ed 431f20177a make tar 6x faster (1.8 GiB/s) 2021-03-28 01:50:16 +01:00
ed 87aff54d9d v0.10.2 2021-03-27 18:03:33 +01:00
ed f50462de82 persist lead-column sort 2021-03-27 17:56:21 +01:00
ed 9bda8c7eb6 better errlog name 2021-03-27 17:38:59 +01:00
ed e83c63d239 fix unix permissions in zip files 2021-03-27 17:28:25 +01:00
ed b38533b0cc recover from file access errors when zipping 2021-03-27 17:16:59 +01:00
ed 5ccca3fbd5 more 2021-03-27 16:12:47 +01:00
ed 9e850fc3ab zip selection 2021-03-27 15:48:52 +01:00
ed ffbfcd7e00 h 2021-03-27 03:35:57 +01:00
ed 5ea7590748 readme: mention zip configs 2021-03-27 03:34:03 +01:00
ed 290c3bc2bb reclining 2021-03-27 03:07:44 +01:00
ed b12131e91c v0.10.1 2021-03-27 02:44:40 +01:00
ed 3b354447b0 v0.10.0 2021-03-27 02:08:07 +01:00
ed d09ec6feaa tehe 2021-03-27 01:49:58 +01:00
ed 21405c3fda be nice to windows 2021-03-27 01:43:02 +01:00
ed 13e5c96cab finish adding zip-crc (semi-streaming) 2021-03-27 01:27:12 +01:00
ed 426687b75e archive format selection in browser 2021-03-27 01:10:05 +01:00
ed c8f59fb978 up2k: add folder upload 2021-03-27 00:20:42 +01:00
ed 871dde79a9 download as tar + utf8 zip + optimize walk 2021-03-26 20:43:25 +01:00
ed e14d81bc6f fix utf8 content-disposition 2021-03-26 02:54:19 +01:00
ed 514d046d1f download folders as zip 2021-03-26 01:51:38 +01:00
ed 4ed9528d36 5x faster reply on 1st req on new conns 2021-03-25 19:29:16 +01:00
ed 625560e642 steal from diodes 2021-03-25 02:59:04 +01:00
ed 73ebd917d1 i know too much about zip now 2021-03-25 02:31:25 +01:00
ed cd3e0afad2 v0.9.13 2021-03-23 02:13:28 +01:00
ed d8d1f94a86 v0.9.12 2021-03-23 01:24:37 +01:00
ed 00dfd8cfd1 v0.9.11 2021-03-23 00:36:48 +01:00
ed 273de6db31 propagate d2d/d2t properly 2021-03-23 00:33:18 +01:00
ed c6c0eeb0ff better volflags presentation 2021-03-23 00:28:11 +01:00
ed e70c74a3b5 support nullmapping subfolders with -v :/foo/bar:cd2d 2021-03-23 00:08:23 +01:00
ed f7d939eeab more sfx tweaks 2021-03-21 22:31:07 +01:00
ed e815c091b9 v0.9.10 2021-03-21 22:05:46 +01:00
ed 963529b7cf readme 2021-03-21 20:38:29 +01:00
ed 638a52374d readme 2021-03-21 20:20:11 +01:00
ed d9d42b7aa2 aaa 2021-03-21 20:11:03 +01:00
ed ec7e5f36a2 make-sfx tweaks 2021-03-21 18:06:31 +01:00
ed 56110883ea readme 2021-03-21 17:56:05 +01:00
ed 7f8d7d6006 v0.9.9 2021-03-21 17:15:47 +01:00
ed 49e4fb7e12 finally time to undefault this 2021-03-21 16:19:45 +01:00
ed 8dbbea473f mtp incoming files too 2021-03-21 15:21:07 +01:00
ed 3d375d5114 assert mtm/mtp is used by mte 2021-03-21 14:15:55 +01:00
ed f3eae67d97 readme 2021-03-21 09:41:05 +01:00
ed 40c1b19235 detrimental to search results 2021-03-21 08:16:17 +01:00
ed ccaf0ab159 gj 2021-03-21 07:49:05 +01:00
ed d07f147423 fixes 2021-03-21 06:00:21 +01:00
ed f5cb9f92b9 better task recovery on restart 2021-03-21 05:57:24 +01:00
ed f991f74983 hotkeys for directory traversal 2021-03-21 04:04:30 +01:00
ed 6b3295059e add time markers in player 2021-03-21 03:21:05 +01:00
ed b18a07ae6b fix file srch 2021-03-21 02:46:40 +01:00
ed 8ab03dabda ok 2021-03-21 02:41:15 +01:00
ed 5e760e35dc togglebutton for tooltips to save iphone users 2021-03-21 02:33:53 +01:00
ed afbfa04514 fixes 2021-03-21 01:55:12 +01:00
ed 7aace470c5 preserve file refs on sort (crc32 instead of idx) 2021-03-21 01:41:18 +01:00
ed b4acb24f6a remember sort order 2021-03-20 10:56:35 +01:00
ed bcee8a4934 Merge branch 'master' of gh:9001/copyparty 2021-03-20 09:20:12 +01:00
ed 36b0718542 media plauer hoetkeys 2021-03-20 09:20:08 +01:00
ed 9a92bca45d Merge branch 'master' of github:9001/copyparty
idk forgot to pull
2021-03-20 07:32:28 +00:00
ed b07445a363 search ratecontrol and timeouts cause it can get bad 2021-03-20 07:32:01 +00:00
ed a62ec0c27e fixes 2021-03-20 05:58:34 +01:00
ed 57e3a2d382 normalize keys to rekobo on index 2021-03-20 05:45:34 +01:00
ed b61022b374 fixes 2021-03-20 03:08:16 +00:00
ed a3e2b2ec87 mm:ss durations on initial html too 2021-03-20 01:27:51 +01:00
ed a83d3f8801 prevent dupe tags from mtp (replace id3 tags) 2021-03-20 01:00:57 +01:00
ed 90c5f2b9d2 spread search interface horizontally 2021-03-20 01:00:44 +01:00
ed 4885653c07 advanced search (key/bpm/...)
man i hope sqlite is good at opimizing
2021-03-20 00:06:11 +01:00
ed 21e1cd87ca nice on windows 2021-03-19 23:43:34 +01:00
ed 81f82e8e9f nice them too 2021-03-19 21:28:10 +01:00
ed c0e31851da add timeouts for mtp calls 2021-03-19 21:22:56 +01:00
ed 6599c3eced no racing pls 2021-03-19 20:42:33 +01:00
ed 5d6c61a861 add mtp eta 2021-03-19 01:20:01 +01:00
ed 1a5c66edd3 build beatroot from source if need be 2021-03-19 00:43:23 +01:00
ed deae9fe95a vscode is entirely too helpful 2021-03-19 00:14:42 +01:00
ed abd65c6334 support metadata plugins 2021-03-19 00:08:31 +01:00
ed 8137a99904 mtag-bin: support alpine + misc health checks 2021-03-18 01:01:57 +01:00
ed 6f6f9c1f74 mtag-bin: support macos (macports) 2021-03-17 23:57:18 +01:00
ed 7b575f716f mtag-bin: support windows (mingw64) 2021-03-17 23:17:02 +01:00
ed 6ba6ea3572 linkify 2021-03-17 01:42:59 +01:00
ed 9a22ad5ea3 this makes more sense 2021-03-17 01:37:59 +01:00
ed beaab9778e make mistakes 2021-03-17 00:55:27 +01:00
ed f327bdb6b4 never trust tags かしら 2021-03-15 23:12:13 +01:00
ed ae180e0f5f save bpm/tempo notes from the bitbucket 2021-03-15 03:10:14 +01:00
ed e3f1d19756 v0.9.8 2021-03-15 01:13:46 +01:00
ed 93c2bd6ef6 fix tree trying to make surprise appearances 2021-03-13 02:29:13 +01:00
ed 4d0e5ff6db turns out whitespace compresses better than tabs 2021-03-13 00:16:07 +01:00
ed 0893f06919 browser: reload music player on column-sort
so tracks play in the right order
2021-03-13 00:15:53 +01:00
ed 46b6abde3f fuse-client: password from file 2021-03-13 00:14:22 +01:00
ed 0696610dee give up, just try both and see what sticks 2021-03-13 00:14:07 +01:00
ed edf0d3684c sfx: improvements from r0c 2021-03-13 00:13:10 +01:00
ed 7af159f5f6 heh 2021-03-09 21:36:14 +01:00
ed 7f2cb6764a v0.9.7 2021-03-08 03:51:26 +01:00
ed 96495a9bf1 v0.9.6 2021-03-07 21:44:25 +01:00
ed b2fafec5fc handle key-normalization errors 2021-03-07 21:41:36 +01:00
ed 0850b8ae2b v0.9.5 2021-03-07 19:25:24 +01:00
ed 8a68a96c57 css tweaks 2021-03-07 19:15:19 +01:00
ed d3aae8ed6a more mojibake fixes 2021-03-07 18:58:26 +01:00
ed c62ebadda8 separate tree scrollbar 2021-03-07 18:26:57 +01:00
ed ffcee6d390 add tooltips and more mojibake compat 2021-03-07 04:14:55 +01:00
ed de32838346 key notation normalization (why tho) 2021-03-07 02:46:17 +01:00
ed b9a4e47ea2 mojibake support for the spa stuff 2021-03-06 22:48:49 +01:00
ed 57d994422d logging cleanup 2021-03-06 17:38:56 +01:00
ed 6ecd745323 so much for sessionStorage 2021-03-06 16:34:55 +01:00
ed bd769f5bdb fix py2 + encourage py3 2021-03-06 02:42:17 +01:00
ed 2381692aba js cfg 2021-03-06 02:30:36 +01:00
ed 24fdada0a0 did you know rhel 7 has an sqlite3 from 2015 2021-03-06 02:28:49 +01:00
ed bb5169710a warn people when they're gonna have a bad time 2021-03-06 00:30:05 +01:00
ed 9cde2352f3 v0.9.4 2021-03-05 02:06:18 +01:00
ed 482dd7a938 v0.9.3 2021-03-05 00:00:22 +01:00
ed bddcc69438 v0.9.2 2021-03-04 22:58:22 +01:00
ed 19d4540630 good 2021-03-04 22:38:12 +01:00
ed 4f5f6c81f5 add buttons to adjust tree width 2021-03-04 22:34:09 +01:00
ed 7e4c1238ba oh 2021-03-04 21:12:54 +01:00
ed f7196ac773 dodge pushstate size limit 2021-03-04 21:06:59 +01:00
ed 7a7c832000 sfx-builder: support ancient git versions 2021-03-04 20:30:28 +01:00
ed 2b4ccdbebb multithread the slow mtag backends 2021-03-04 20:28:03 +01:00
ed 0d16b49489 broke this too 2021-03-04 01:35:09 +01:00
ed 768405b691 tree broke 2021-03-04 01:32:44 +01:00
ed da01413b7b remove speedbumps 2021-03-04 01:21:04 +01:00
ed 914e22c53e async tagging of incoming files 2021-03-03 18:36:05 +01:00
ed 43a23bf733 v0.9.1 2021-03-03 01:28:32 +01:00
ed 92bb00c6d2 faster sorting 2021-03-03 01:27:41 +01:00
ed b0b97a2648 fix bugs 2021-03-03 00:46:15 +01:00
ed 2c452fe323 readme nitpicks 2021-03-02 01:02:13 +01:00
ed ad73d0c77d update feature list in readme 2021-03-02 00:31:08 +01:00
ed 7f9bf1c78c v0.9.0 2021-03-02 00:12:15 +01:00
ed 61a6bc3a65 make browser columns compactable 2021-03-02 00:07:04 +01:00
ed 46e10b0e9f yab 2021-03-01 03:15:41 +01:00
ed 8441206e26 read media-tags from files (for display/searching) 2021-03-01 02:50:10 +01:00
ed 9fdc5ee748 use one sqlite3 cursor, closes #1 2021-02-25 22:30:40 +01:00
ed 00ff133387 support receiving chunked PUT 2021-02-25 22:26:03 +01:00
ed 96164cb934 v0.8.3 2021-02-22 21:58:37 +01:00
ed 82fb21ae69 v0.8.2 2021-02-22 21:40:55 +01:00
ed 89d4a2b4c4 hide up2k mode-toggle in read-only folders 2021-02-22 21:27:44 +01:00
ed fc0c7ff374 correct up2k mode in mixed-r/w 2021-02-22 21:11:30 +01:00
ed 5148c4f2e9 include pro/epilogues in ?ls 2021-02-22 21:09:57 +01:00
ed c3b59f7bcf restore win8/7/xp support 2021-02-22 20:59:44 +01:00
ed 61e148202b too much 2021-02-22 20:56:19 +01:00
ed 8a4e0739bc v0.8.1 2021-02-22 03:54:34 +01:00
ed f75c5f2fe5 v0.8.0 2021-02-22 03:46:02 +01:00
ed 81d5859588 h 2021-02-22 03:33:24 +01:00
ed 721886bb7a this isnt really helping is it 2021-02-22 03:01:32 +01:00
ed b23c272820 mention the search syntax 2021-02-22 02:33:30 +01:00
ed cd02bfea7a better path/name search syntax 2021-02-22 02:16:47 +01:00
ed 6774bd88f9 make search/upload toggling more visible 2021-02-22 01:25:13 +01:00
ed 1046a4f376 update web deps 2021-02-22 00:47:53 +01:00
ed 8081f9ddfd add up2k cleanup button 2021-02-22 00:47:21 +01:00
ed fa656577d1 prevent non-spa navigation while uploading 2021-02-21 21:08:53 +01:00
ed b14b86990f toggle upload widgets in spa 2021-02-21 20:50:12 +01:00
ed 2a6dd7b512 add close button to search results 2021-02-21 05:33:57 +00:00
ed feebdee88b correctness 2021-02-21 05:15:08 +00:00
ed 99d9277f5d look at him go 2021-02-21 05:36:26 +01:00
ed 9af64d6156 debug pypy3/7.3.3/gcc9.2.0/gentoo 2021-02-21 02:48:25 +00:00
ed 5e3775c1af fuse.py prefers ?ls if available 2021-02-21 02:07:34 +00:00
ed 2d2e8a3da7 less jank ?ls 2021-02-21 01:31:49 +00:00
ed b2a560b76f update readme with new features 2021-02-21 00:29:10 +00:00
ed 39397a489d rearrange readme status list 2021-02-21 00:26:29 +00:00
ed ff593a0904 fix folder tree presentation in mixed-r/w volumes 2021-02-20 19:10:16 +00:00
ed f12789cf44 reversible mojibake marshaling for sqlite 2021-02-20 18:12:36 +00:00
ed 4f8cf2fc87 qol 2021-02-20 17:39:08 +01:00
ed fda98730ac 77.6KiB changeset nice 2021-02-20 04:59:43 +00:00
ed 06c6ddffb6 v0.7.7 2021-02-14 02:13:52 +01:00
ed d29f0c066c logging 2021-02-14 01:32:16 +01:00
ed c9e4de3346 up2k: fix rejected files not counting as progress 2021-02-13 04:30:46 +01:00
ed ca0b97f72d oh cool 2021-02-13 03:59:38 +01:00
ed b38f20b408 up2k: make tabsync optional 2021-02-13 03:45:40 +01:00
ed 05b1dbaf56 up2k: upload semaphore across tabs/windows 2021-02-13 02:57:51 +01:00
ed b8481e32ba lovely priority inversions 2021-02-12 23:53:13 +01:00
ed 9c03c65e07 v0.7.6 2021-02-12 20:53:29 +01:00
ed d8ed006b9b up2k: 128 MiB runahead 2021-02-12 20:41:42 +01:00
ed 63c0623a5e vscode: windows support 2021-02-12 19:47:18 +01:00
ed fd84506db0 don't list up2k db in browser 2021-02-12 19:25:57 +01:00
ed d8bcb44e44 vscode: no-debug launcher 2021-02-12 19:25:01 +01:00
ed 56a26b0916 up2k: print final commit too 2021-02-12 17:10:08 +01:00
ed efcf1d6b90 add cfssl.sh 2021-02-12 07:30:20 +00:00
ed 9f578bfec6 v0.7.5 2021-02-12 07:06:38 +00:00
ed 1f170d7d28 up2k scanner messages less useless 2021-02-12 07:04:35 +00:00
ed 5ae14cf9be up2k scanner more better 2021-02-12 01:07:55 +00:00
ed aaf9d53be9 more ssl options 2021-02-12 00:31:28 +00:00
ed 75c73f7ba7 add --http-only (might as well) 2021-02-11 22:54:40 +00:00
ed b6dba8beee imagine going plaintext in the middle of a tls reply 2021-02-11 22:50:59 +00:00
ed 94521cdc1a add --https-only 2021-02-11 22:48:10 +00:00
ed 3365b1c355 add --ssl-ver (ssl/tls versions to allow) 2021-02-11 21:24:17 +00:00
ed 6c957c4923 v0.7.4 2021-02-04 01:01:42 +01:00
ed 833997f04c shrink sfx.py from 515k to 472k 2021-02-04 01:01:11 +01:00
ed 68d51e4037 rem 2021-02-04 01:00:41 +01:00
ed ce274d2011 handle url-encoded posts 2021-02-03 23:18:11 +01:00
ed 280778ed43 catch macos socket errors 2021-02-03 22:32:16 +01:00
ed 0f558ecbbf upgrade bundled jinja2 2021-02-03 22:32:01 +01:00
ed 58f9e05d93 v0.7.3 2021-02-03 00:50:51 +01:00
ed 1ec981aea7 bind multiple ip/ports 2021-02-03 00:49:51 +01:00
ed 2a90286a7c dim the socket debug msgs 2021-02-03 00:25:13 +01:00
ed 12d25d09b2 limit gz/br unpacker to embedded resources 2021-02-03 00:19:14 +01:00
ed a039fae1a4 remove extra anon-rw warning 2021-02-03 00:17:12 +01:00
ed 322b9abadc v0.7.2 2021-01-29 00:52:41 +01:00
ed 0aaf954cea up2k: increase purge timeout 2021-01-29 00:52:22 +01:00
ed c2d22aa3d1 up2k: make confirmation optional 2021-01-29 00:49:35 +01:00
ed 6934c75bba nice 2021-01-29 00:43:57 +01:00
ed c58cf78f86 yabe 2021-01-24 16:14:01 +01:00
ed 7f0de790ab more macports compat 2021-01-23 21:19:29 +01:00
ed d4bb4e3a73 v0.7.1 2021-01-23 19:55:35 +01:00
ed d25612d038 make-sfx: support macports 2021-01-23 19:55:24 +01:00
ed 116b2351b0 mention howto purge partial uploads 2021-01-23 19:25:25 +01:00
ed 69b83dfdc4 up2k: limit runahead in client 2021-01-23 19:05:45 +01:00
ed 3b1839c2ce up2k: ask before starting the upload 2021-01-23 18:51:08 +01:00
ed 13742ebdf8 verify that PARTIALs exist after a restart 2021-01-23 18:49:43 +01:00
ed 634657bea1 up2k: discard empty PARTIALs 2021-01-23 18:10:11 +01:00
ed 46e70d50b7 v0.7.0 2021-01-10 17:49:56 +01:00
ed d64e9b85a7 prefer sqlite over registry snaps 2021-01-10 17:47:27 +01:00
ed fb853edbe3 prevent index loss on mid-write crash 2021-01-10 17:16:55 +01:00
ed cc076c1be1 persist/timeout incomplete uploads too 2021-01-10 16:47:35 +01:00
ed 98cc9a6755 mojibake support + exception handling 2021-01-10 09:48:26 +01:00
ed 7bd2b9c23a sqlite3 as up2k db + build index on boot + rproxy ip fix 2021-01-10 09:27:11 +01:00
ed de724a1ff3 up2k: add volume flag to reject existing files 2021-01-09 15:20:02 +01:00
ed 2163055dae media-player: play links don't scroll on click 2021-01-09 14:40:56 +01:00
ed 93ed0fc10b v0.6.3 2021-01-07 01:09:32 +01:00
ed 0d98cefd40 fix dumb 2021-01-07 01:06:31 +01:00
ed d58988a033 use sendfile when possible 2021-01-07 00:50:42 +01:00
ed 2acfab1e3f cleanup 2021-01-06 22:54:54 +01:00
ed b915dfe9a6 nagle adds ~.2sec delay on last packet 2021-01-06 21:08:52 +00:00
ed 25bd5a823e fuse-client: add timestamps to logger 2021-01-06 17:40:42 +01:00
ed 1c35de4716 fuse-client: cache tweaks 2021-01-06 17:22:07 +01:00
ed 4c00435a0a fuse: add windows-explorer settings 2021-01-06 17:18:37 +01:00
ed 844e3079a8 saved for posterity 2021-01-06 17:13:24 +01:00
ed 4778cb5b2c readme: add quickstart 2021-01-02 22:57:48 +01:00
ed ec5d60b919 fuse-client: fix directory parser 2021-01-01 21:54:56 +01:00
ed e1f4b960e8 oh no 2020-12-20 02:33:37 +01:00
ed 669e46da54 update TODOs 2020-12-14 09:19:43 +01:00
ed ba94cc5df7 v0.6.2 2020-12-14 04:28:21 +01:00
ed d08245c3df v0.6.1 2020-12-14 03:51:24 +01:00
ed 5c18d12cbf self-upgrading upgrader... getting too meta 2020-12-14 03:45:59 +01:00
ed 580a42dec7 sfx-repack: support wget 2020-12-14 02:59:15 +01:00
ed 29286e159b up2k-client: ignore rejected dupes 2020-12-12 00:55:42 +01:00
ed 19bcf90e9f support uploads with huge filenames 2020-12-12 00:35:54 +01:00
ed dae9c00742 always display world-readable subvolumes 2020-12-04 23:28:18 +01:00
ed 35324ceb7c tests: support windows 2020-12-04 23:26:46 +01:00
ed 5aadd47199 dodge python-bug #7980 2020-12-01 23:20:44 +01:00
ed 7d9057cc62 v0.6.0 2020-12-01 02:58:11 +01:00
ed c4b322b883 this commit sponsored by eslint 2020-12-01 02:25:46 +01:00
ed 19b09c898a fix sfx repack whoops 2020-11-30 03:27:27 +01:00
ed eafe2098b6 v0.5.7 2020-11-30 03:01:14 +01:00
ed 2bc6a20d71 md: poll server for changes 2020-11-30 03:00:44 +01:00
408 changed files with 107673 additions and 5580 deletions

12
.eslintrc.json Normal file
View file

@ -0,0 +1,12 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
}
}

2
.gitattributes vendored
View file

@ -1,4 +1,6 @@
* text eol=lf
*.reg text eol=crlf
*.png binary
*.gif binary

49
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,49 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: '9001'
---
NOTE:
**please use english, or include an english translation.** aside from that,
all of the below are optional, consider them as inspiration, delete and rewrite at will, thx md
### Describe the bug
a description of what the bug is
### To Reproduce
List of steps to reproduce the issue, or, if it's hard to reproduce, then at least a detailed explanation of what you did to run into it
### Expected behavior
a description of what you expected to happen
### Screenshots
if applicable, add screenshots to help explain your problem, such as the kickass crashpage :^)
### Server details (if you are using docker/podman)
remove the ones that are not relevant:
* **server OS / version:**
* **how you're running copyparty:** (docker/podman/something-else)
* **docker image:** (variant, version, and arch if you know)
* **copyparty arguments and/or config-file:**
### Server details (if you're NOT using docker/podman)
remove the ones that are not relevant:
* **server OS / version:**
* **what copyparty did you grab:** (sfx/exe/pip/arch/...)
* **how you're running it:** (in a terminal, as a systemd-service, ...)
* run copyparty with `--version` and grab the last 3 lines (they start with `copyparty`, `CPython`, `sqlite`) and paste them below this line:
* **copyparty arguments and/or config-file:**
### Client details
if the issue is possibly on the client-side, then mention some of the following:
* the device type and model:
* OS version:
* browser version:
### Additional context
any other context about the problem here

View file

@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: '9001'
---
NOTE:
**please use english, or include an english translation.** aside from that,
all of the below are optional, consider them as inspiration, delete and rewrite at will
**is your feature request related to a problem? Please describe.**
a description of what the problem is, for example, `I'm always frustrated when [...]` or `Why is it not possible to [...]`
**Describe the idea / solution you'd like**
a description of what you want to happen
**Describe any alternatives you've considered**
a description of any alternative solutions or features you've considered
**Additional context**
add any other context or screenshots about the feature request here

View file

@ -0,0 +1,10 @@
---
name: Something else
about: "┐(゚∀゚)┌"
title: ''
labels: ''
assignees: ''
---

7
.github/branch-rename.md vendored Normal file
View file

@ -0,0 +1,7 @@
modernize your local checkout of the repo like so,
```sh
git branch -m master hovudstraum
git fetch origin
git branch -u origin/hovudstraum hovudstraum
git remote set-head origin -a
```

2
.github/pull_request_template.md vendored Normal file
View file

@ -0,0 +1,2 @@
To show that your contribution is compatible with the MIT License, please include the following text somewhere in this PR description:
This PR complies with the DCO; https://developercertificate.org/

34
.gitignore vendored
View file

@ -5,18 +5,44 @@ __pycache__/
MANIFEST.in
MANIFEST
copyparty.egg-info/
buildenv/
build/
dist/
sfx/
.venv/
/buildenv/
/build/
/dist/
/py2/
/sfx*
/pyz/
/unt/
/log/
# ide
*.sublime-workspace
# winmerge
*.bak
# apple pls
.DS_Store
# derived
copyparty/res/COPYING.txt
copyparty/web/deps/
srv/
scripts/docker/i/
scripts/deps-docker/uncomment.py
contrib/package/arch/pkg/
contrib/package/arch/src/
# state/logs
up.*.txt
.hist/
scripts/docker/*.out
scripts/docker/*.err
/perf.*
# nix build output link
result
# IDEA config
.idea/

30
.vscode/launch.json vendored
View file

@ -8,16 +8,30 @@
"module": "copyparty",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"justMyCode": false,
"env": {
"PYDEVD_DISABLE_FILE_VALIDATION": "1",
"PYTHONWARNINGS": "always", //error
},
"args": [
//"-nw",
"-ed",
"-emp",
"-a",
"ed:wark",
"-v",
"srv::r:aed"
"-e2dsa",
"-e2ts",
"-mtp=.bpm=f,bin/mtag/audio-bpm.py",
"-aed:wark",
"-vsrv::r:rw,ed:c,dupe",
"-vdist:dist:r"
]
},
{
"name": "No debug",
"preLaunchTask": "no_dbg",
"type": "python",
//"request": "attach", "port": 42069
// fork: nc -l 42069 </dev/null
},
{
"name": "Run active unit test",
"type": "python",
@ -30,5 +44,13 @@
"${file}"
]
},
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
},
]
}

57
.vscode/launch.py vendored Executable file
View file

@ -0,0 +1,57 @@
#!/usr/bin/env python3
# takes arguments from launch.json
# is used by no_dbg in tasks.json
# launches 10x faster than mspython debugpy
# and is stoppable with ^C
import re
import os
import sys
print(sys.executable)
import json5
import shlex
import subprocess as sp
with open(".vscode/launch.json", "r", encoding="utf-8") as f:
tj = f.read()
oj = json5.loads(tj)
argv = oj["configurations"][0]["args"]
try:
sargv = " ".join([shlex.quote(x) for x in argv])
print(sys.executable + " -m copyparty " + sargv + "\n")
except:
pass
argv = [os.path.expanduser(x) if x.startswith("~") else x for x in argv]
sfx = ""
if len(sys.argv) > 1 and os.path.isfile(sys.argv[1]):
sfx = sys.argv[1]
sys.argv = [sys.argv[0]] + sys.argv[2:]
argv += sys.argv[1:]
if sfx:
argv = [sys.executable, sfx] + argv
sp.check_call(argv)
elif re.search(" -j ?[0-9]", " ".join(argv)):
argv = [sys.executable, "-Wa", "-m", "copyparty"] + argv
sp.check_call(argv)
else:
sys.path.insert(0, os.getcwd())
from copyparty.__main__ import main as copyparty
try:
copyparty(["a"] + argv)
except SystemExit as ex:
if ex.code:
raise
print("\n\033[32mokke\033[0m")
sys.exit(1)

29
.vscode/settings.json vendored
View file

@ -22,8 +22,10 @@
"terminal.ansiBrightCyan": "#9cf0ed",
"terminal.ansiBrightWhite": "#ffffff",
},
"python.terminal.activateEnvironment": false,
"python.analysis.enablePytestSupport": false,
"python.analysis.typeCheckingMode": "standard",
"python.testing.pytestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": true,
"python.testing.unittestArgs": [
"-v",
@ -32,29 +34,16 @@
"-p",
"test_*.py"
],
"python.linting.pylintEnabled": true,
"python.linting.flake8Enabled": true,
"python.linting.banditEnabled": true,
"python.linting.flake8Args": [
"--max-line-length=120",
"--ignore=E722,F405,E203,W503,W293,E402",
],
"python.linting.banditArgs": [
"--ignore=B104"
],
"python.formatting.provider": "black",
"editor.formatOnSave": true,
// python3 -m isort --py=27 --profile=black ~/dev/copyparty/{copyparty,tests}/*.py && python3 -m black -t py27 ~/dev/copyparty/{copyparty,tests,bin}/*.py $(find ~/dev/copyparty/copyparty/stolen -iname '*.py')
"editor.formatOnSave": false,
"[html]": {
"editor.formatOnSave": false,
"editor.autoIndent": "keep",
},
"[css]": {
"editor.formatOnSave": false,
},
"files.associations": {
"*.makefile": "makefile"
},
"editor.codeActionsOnSaveTimeout": 9001,
"editor.formatOnSaveTimeout": 9001,
//
// things you may wanna edit:
//
"python.pythonPath": "/usr/bin/python3",
//"python.linting.enabled": true,
}

19
.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,19 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "pre",
"command": "true;rm -rf inc/* inc/.hist/;mkdir -p inc;",
"type": "shell"
},
{
"label": "no_dbg",
"type": "shell",
"command": "${config:python.pythonPath}",
"args": [
"-Wa", //-We
".vscode/launch.py"
]
}
]
}

24
CODE_OF_CONDUCT.md Normal file
View file

@ -0,0 +1,24 @@
in the words of Abraham Lincoln:
> Be excellent to each other... and... PARTY ON, DUDES!
more specifically I'll paraphrase some examples from a german automotive corporation as they cover all the bases without being too wordy
## Examples of unacceptable behavior
* intimidation, harassment, trolling
* insulting, derogatory, harmful or prejudicial comments
* posting private information without permission
* political or personal attacks
## Examples of expected behavior
* being nice, friendly, welcoming, inclusive, mindful and empathetic
* acting considerate, modest, respectful
* using polite and inclusive language
* criticize constructively and accept constructive criticism
* respect different points of view
## finally and even more specifically,
* parse opinions and feedback objectively without prejudice
* it's the message that matters, not who said it
aaand that's how you say `be nice` in a way that fills half a floppy w

58
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,58 @@
* **found a bug?** [create an issue!](https://github.com/9001/copyparty/issues) or let me know in the [discord](https://discord.gg/25J8CdTT6G) :>
* **fixed a bug?** create a PR or post a patch! big thx in advance :>
* **have a cool idea?** let's discuss it! anywhere's fine, you choose.
but please:
# do not use AI / LMM when writing code
copyparty is 100% organic, free-range, human-written software!
> ⚠ you are now entering a no-copilot zone
the *only* place where LMM/AI *may* be accepted is for [localization](https://github.com/9001/copyparty/tree/hovudstraum/docs/rice#translations) if you are fluent and have confirmed that the translation is accurate.
sorry for the harsh tone, but this is important to me 🙏
# contribution ideas
## documentation
I think we can agree that the documentation leaves a LOT to be desired. I've realized I'm not exactly qualified for this 😅 but maybe the [soon-to-come setup GUI](https://github.com/9001/copyparty/issues/57) will make this more manageable. The best documentation is the one that never had to be written, right? :> so I suppose we can give this a wait-and-see approach for a bit longer.
## crazy ideas & features
assuming they won't cause too much problems or side-effects :>
i think someone was working on a way to list directories over DNS for example...
if you wanna have a go at coding it up yourself then maybe mention the idea on discord before you get too far, otherwise just go nuts 👍
## others
aside from documentation and ideas, some other things that would be cool to have some help with is:
* **translations** -- the copyparty web-UI has translations for english and norwegian at the top of [browser.js](https://github.com/9001/copyparty/blob/hovudstraum/copyparty/web/browser.js); if you'd like to add a translation for another language then that'd be welcome! and if that language has a grammar that doesn't fit into the way the strings are assembled, then we'll fix that as we go :>
* but please note that support for [RTL (Right-to-Left) languages](https://en.wikipedia.org/wiki/Right-to-left_script) is currently not planned, since the javascript is a bit too jank for that
* **UI ideas** -- at some point I was thinking of rewriting the UI in react/preact/something-not-vanilla-javascript, but I'll admit the comfiness of not having any build stage combined with raw performance has kinda convinced me otherwise :p but I'd be very open to ideas on how the UI could be improved, or be more intuitive.
* **docker improvements** -- I don't really know what I'm doing when it comes to containers, so I'm sure there's a *huge* room for improvement here, mainly regarding how you're supposed to use the container with kubernetes / docker-compose / any of the other popular ways to do things. At some point I swear I'll start learning about docker so I can pick up clach04's [docker-compose draft](https://github.com/9001/copyparty/issues/38) and learn how that stuff ticks, unless someone beats me to it!
* **packaging** for various linux distributions -- this could either be as simple as just plopping the sfx.py in the right place and calling that from systemd (the archlinux package [originally did this](https://github.com/9001/copyparty/pull/18)); maybe with a small config-file which would cause copyparty to load settings from `/etc/copyparty.d` (like the [archlinux package](https://github.com/9001/copyparty/tree/hovudstraum/contrib/package/arch) does with `copyparty.conf`), or it could be a proper installation of the copyparty python package into /usr/lib or similar (the archlinux package [eventually went for this approach](https://github.com/9001/copyparty/pull/26))
* [fpm](https://github.com/jordansissel/fpm) can probably help with the technical part of it, but someone needs to handle distro relations :-)
* **software integration** -- I'm sure there's a lot of usecases where copyparty could complement something else, or the other way around, so any ideas or any work in this regard would be dope. This doesn't necessarily have to be code inside copyparty itself;
* [hooks](https://github.com/9001/copyparty/tree/hovudstraum/bin/hooks) -- these are small programs which are called by copyparty when certain things happen (files are uploaded, someone hits a 404, etc.), and could be a fun way to add support for more usecases
* [parser plugins](https://github.com/9001/copyparty/tree/hovudstraum/bin/mtag) -- if you want to have copyparty analyze and index metadata for some oddball file-formats, then additional plugins would be neat :>

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019 ed
Copyright (c) 2019 ed <oss@ocv.me>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

2987
README.md

File diff suppressed because it is too large Load diff

9
SECURITY.md Normal file
View file

@ -0,0 +1,9 @@
# Security Policy
if you hit something extra juicy pls let me know on either of the following
* email -- `copyparty@ocv.ze` except `ze` should be `me`
* [mastodon dm](https://layer8.space/@tripflag) -- `@tripflag@layer8.space`
* [github private vulnerability report](https://github.com/9001/copyparty/security/advisories/new), wow that form is complicated
* [twitter dm](https://twitter.com/tripflag) (if im somehow not banned yet)
no bug bounties sorry! all i can offer is greetz in the release notes

View file

@ -1,36 +1,83 @@
# copyparty-fuse.py
# [`u2c.py`](u2c.py)
* command-line up2k client [(webm)](https://ocv.me/stuff/u2cli.webm)
* file uploads, file-search, autoresume of aborted/broken uploads
* sync local folder to server
* generally faster than browsers
* if something breaks just restart it
# [`partyjournal.py`](partyjournal.py)
produces a chronological list of all uploads by collecting info from up2k databases and the filesystem
* outputs a standalone html file
* optional mapping from IP-addresses to nicknames
# [`partyfuse.py`](partyfuse.py)
* mount a copyparty server as a local filesystem (read-only)
* **supports Windows!** -- expect `194 MiB/s` sequential read
* **supports Linux** -- expect `117 MiB/s` sequential read
* **supports Linux** -- expect `600 MiB/s` sequential read
* **supports macos** -- expect `85 MiB/s` sequential read
filecache is default-on for windows and macos;
* macos readsize is 64kB, so speed ~32 MiB/s without the cache
* windows readsize varies by software; explorer=1M, pv=32k
note that copyparty should run with `-ed` to enable dotfiles (hidden otherwise)
also consider using [../docs/rclone.md](../docs/rclone.md) instead for 5x performance
and consider using [../docs/rclone.md](../docs/rclone.md) instead; usually a bit faster, especially on windows
## to run this on windows:
* install [winfsp](https://github.com/billziss-gh/winfsp/releases/latest) and [python 3](https://www.python.org/downloads/)
* [x] add python 3.x to PATH (it asks during install)
* `python -m pip install --user fusepy`
* `python ./copyparty-fuse.py n: http://192.168.1.69:3923/`
* `python -m pip install --user fusepy` (or grab a copy of `fuse.py` from the `connect` page on your copyparty, and keep it in the same folder)
* `python ./partyfuse.py n: http://192.168.1.69:3923/`
10% faster in [msys2](https://www.msys2.org/), 700% faster if debug prints are enabled:
* `pacman -S mingw64/mingw-w64-x86_64-python{,-pip}`
* `/mingw64/bin/python3 -m pip install --user fusepy`
* `/mingw64/bin/python3 ./copyparty-fuse.py [...]`
* `/mingw64/bin/python3 ./partyfuse.py [...]`
you could replace winfsp with [dokan](https://github.com/dokan-dev/dokany/releases/latest), let me know if you [figure out how](https://github.com/dokan-dev/dokany/wiki/FUSE)
(winfsp's sshfs leaks, doesn't look like winfsp itself does, should be fine)
# copyparty-fuse🅱.py
# [`partyfuse2.py`](partyfuse2.py)
* mount a copyparty server as a local filesystem (read-only)
* does the same thing except more correct, `samba` approves
* **supports Linux** -- expect `18 MiB/s` (wait what)
* **supports Macos** -- probably
# [`partyfuse-streaming.py`](partyfuse-streaming.py)
* pretend this doesn't exist
# [`mtag/`](mtag/)
* standalone programs which perform misc. file analysis
* copyparty can Popen programs like these during file indexing to collect additional metadata
# [`dbtool.py`](dbtool.py)
upgrade utility which can show db info and help transfer data between databases, for example when a new version of copyparty is incompatible with the old DB and automatically rebuilds the DB from scratch, but you have some really expensive `-mtp` parsers and want to copy over the tags from the old db
for that example (upgrading to v0.11.20), first launch the new version of copyparty like usual, let it make a backup of the old db and rebuild the new db until the point where it starts running mtp (colored messages as it adds the mtp tags), that's when you hit CTRL-C and patch in the old mtp tags from the old db instead
so assuming you have `-mtp` parsers to provide the tags `key` and `.bpm`:
```
cd /mnt/nas/music/.hist
~/src/copyparty/bin/dbtool.py -ls up2k.db
~/src/copyparty/bin/dbtool.py -src up2k.*.v3 up2k.db -cmp
~/src/copyparty/bin/dbtool.py -src up2k.*.v3 up2k.db -rm-mtp-flag -copy key
~/src/copyparty/bin/dbtool.py -src up2k.*.v3 up2k.db -rm-mtp-flag -copy .bpm -vac
```
# [`prisonparty.sh`](prisonparty.sh)
* run copyparty in a chroot, preventing any accidental file access
* creates bindmounts for /bin, /lib, and so on, see `sysdirs=`
# [`bubbleparty.sh`](bubbleparty.sh)
* run copyparty in an isolated process, preventing any accidental file access and more

19
bin/bubbleparty.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh
# usage: ./bubbleparty.sh ./copyparty-sfx.py ....
bwrap \
--unshare-all \
--ro-bind /usr /usr \
--ro-bind /bin /bin \
--ro-bind /lib /lib \
--ro-bind /etc/resolv.conf /etc/resolv.conf \
--dev-bind /dev /dev \
--dir /tmp \
--dir /var \
--bind $(pwd) $(pwd) \
--share-net \
--die-with-parent \
--file 11 /etc/passwd \
--file 12 /etc/group \
"$@" \
11< <(getent passwd $(id -u) 65534) \
12< <(getent group $(id -g) 65534)

305
bin/dbtool.py Executable file
View file

@ -0,0 +1,305 @@
#!/usr/bin/env python3
import os
import sys
import time
import shutil
import sqlite3
import argparse
DB_VER1 = 3
DB_VER2 = 5
BY_PATH = None
NC = None
def die(msg):
print("\033[31m\n" + msg + "\n\033[0m")
sys.exit(1)
def read_ver(db):
for tab in ["ki", "kv"]:
try:
c = db.execute(r"select v from {} where k = 'sver'".format(tab))
except:
continue
rows = c.fetchall()
if rows:
return int(rows[0][0])
return "corrupt"
def ls(db):
nfiles = next(db.execute("select count(w) from up"))[0]
ntags = next(db.execute("select count(w) from mt"))[0]
print(f"{nfiles} files")
print(f"{ntags} tags\n")
print("number of occurences for each tag,")
print(" 'x' = file has no tags")
print(" 't:mtp' = the mtp flag (file not mtp processed yet)")
print()
for k, nk in db.execute("select k, count(k) from mt group by k order by k"):
print(f"{nk:9} {k}")
def compare(n1, d1, n2, d2, verbose):
nt = next(d1.execute("select count(w) from up"))[0]
n = 0
miss = 0
for w1, rd, fn in d1.execute("select w, rd, fn from up"):
n += 1
if n % 25_000 == 0:
m = f"\033[36mchecked {n:,} of {nt:,} files in {n1} against {n2}\033[0m"
print(m)
if rd.split("/", 1)[0] == ".hist":
continue
if BY_PATH:
q = "select w from up where rd = ? and fn = ?"
hit = d2.execute(q, (rd, fn)).fetchone()
else:
q = "select w from up where substr(w,1,16) = ? and +w = ?"
hit = d2.execute(q, (w1[:16], w1)).fetchone()
if not hit:
miss += 1
if verbose:
print(f"file in {n1} missing in {n2}: [{w1}] {rd}/{fn}")
print(f" {miss} files in {n1} missing in {n2}\n")
nt = next(d1.execute("select count(w) from mt"))[0]
n = 0
miss = {}
nmiss = 0
for w1s, k, v in d1.execute("select * from mt"):
n += 1
if n % 100_000 == 0:
m = f"\033[36mchecked {n:,} of {nt:,} tags in {n1} against {n2}, so far {nmiss} missing tags\033[0m"
print(m)
q = "select w, rd, fn from up where substr(w,1,16) = ?"
w1, rd, fn = d1.execute(q, (w1s,)).fetchone()
if rd.split("/", 1)[0] == ".hist":
continue
if BY_PATH:
q = "select w from up where rd = ? and fn = ?"
w2 = d2.execute(q, (rd, fn)).fetchone()
else:
q = "select w from up where substr(w,1,16) = ? and +w = ?"
w2 = d2.execute(q, (w1s, w1)).fetchone()
if w2:
w2 = w2[0]
v2 = None
if w2:
v2 = d2.execute(
"select v from mt where w = ? and +k = ?", (w2[:16], k)
).fetchone()
if v2:
v2 = v2[0]
# if v != v2 and v2 and k in [".bpm", "key"] and n2 == "src":
# print(f"{w} [{rd}/{fn}] {k} = [{v}] / [{v2}]")
if v2 is not None:
if k.startswith("."):
try:
diff = abs(float(v) - float(v2))
if diff > float(v) / 0.9:
v2 = None
else:
v2 = v
except:
pass
if v != v2:
v2 = None
if v2 is None:
nmiss += 1
try:
miss[k] += 1
except:
miss[k] = 1
if verbose:
print(f"missing in {n2}: [{w1}] [{rd}/{fn}] {k} = {v}")
for k, v in sorted(miss.items()):
if v:
print(f"{n1} has {v:7} more {k:<7} tags than {n2}")
print(f"in total, {nmiss} missing tags in {n2}\n")
def copy_mtp(d1, d2, tag, rm):
nt = next(d1.execute("select count(w) from mt where k = ?", (tag,)))[0]
n = 0
ncopy = 0
nskip = 0
for w1s, k, v in d1.execute("select * from mt where k = ?", (tag,)):
n += 1
if n % 25_000 == 0:
m = f"\033[36m{n:,} of {nt:,} tags checked, so far {ncopy} copied, {nskip} skipped\033[0m"
print(m)
q = "select w, rd, fn from up where substr(w,1,16) = ?"
w1, rd, fn = d1.execute(q, (w1s,)).fetchone()
if rd.split("/", 1)[0] == ".hist":
continue
if BY_PATH:
q = "select w from up where rd = ? and fn = ?"
w2 = d2.execute(q, (rd, fn)).fetchone()
else:
q = "select w from up where substr(w,1,16) = ? and +w = ?"
w2 = d2.execute(q, (w1s, w1)).fetchone()
if not w2:
continue
w2s = w2[0][:16]
hit = d2.execute("select v from mt where w = ? and +k = ?", (w2s, k)).fetchone()
if hit:
hit = hit[0]
if hit != v:
if NC and hit is not None:
nskip += 1
continue
ncopy += 1
if hit is not None:
d2.execute("delete from mt where w = ? and +k = ?", (w2s, k))
d2.execute("insert into mt values (?,?,?)", (w2s, k, v))
if rm:
d2.execute("delete from mt where w = ? and +k = 't:mtp'", (w2s,))
d2.commit()
print(f"copied {ncopy} {tag} tags over, skipped {nskip}")
def examples():
print(
"""
# clearing the journal
./dbtool.py up2k.db
# copy tags ".bpm" and "key" from old.db to up2k.db, and remove the mtp flag from matching files (so copyparty won't run any mtps on it)
./dbtool.py -ls up2k.db
./dbtool.py -src old.db up2k.db -cmp
./dbtool.py -src old.v3 up2k.db -rm-mtp-flag -copy key
./dbtool.py -src old.v3 up2k.db -rm-mtp-flag -copy .bpm -vac
"""
)
def main():
global NC, BY_PATH # pylint: disable=global-statement
os.system("")
print()
ap = argparse.ArgumentParser()
ap.add_argument("db", help="database to work on")
ap.add_argument("-h2", action="store_true", help="show examples")
ap.add_argument("-src", metavar="DB", type=str, help="database to copy from")
ap2 = ap.add_argument_group("informational / read-only stuff")
ap2.add_argument("-v", action="store_true", help="verbose")
ap2.add_argument("-ls", action="store_true", help="list summary for db")
ap2.add_argument("-cmp", action="store_true", help="compare databases")
ap2 = ap.add_argument_group("options which modify target db")
ap2.add_argument("-copy", metavar="TAG", type=str, help="mtp tag to copy over")
ap2.add_argument(
"-rm-mtp-flag",
action="store_true",
help="when an mtp tag is copied over, also mark that file as done, so copyparty won't run any mtps on those files",
)
ap2.add_argument("-vac", action="store_true", help="optimize DB")
ap2 = ap.add_argument_group("behavior modifiers")
ap2.add_argument(
"-nc",
action="store_true",
help="no-clobber; don't replace/overwrite existing tags",
)
ap2.add_argument(
"-by-path",
action="store_true",
help="match files based on location rather than warks (content-hash), use this if the databases have different wark salts",
)
ar = ap.parse_args()
if ar.h2:
examples()
return
NC = ar.nc
BY_PATH = ar.by_path
for v in [ar.db, ar.src]:
if v and not os.path.exists(v):
die("database must exist")
db = sqlite3.connect(ar.db)
ds = sqlite3.connect(ar.src) if ar.src else None
# revert journals
for d, p in [[db, ar.db], [ds, ar.src]]:
if not d:
continue
pj = "{}-journal".format(p)
if not os.path.exists(pj):
continue
d.execute("create table foo (bar int)")
d.execute("drop table foo")
if ar.copy:
db.close()
shutil.copy2(ar.db, "{}.bak.dbtool.{:x}".format(ar.db, int(time.time())))
db = sqlite3.connect(ar.db)
for d, n in [[ds, "src"], [db, "dst"]]:
if not d:
continue
ver = read_ver(d)
if ver == "corrupt":
die("{} database appears to be corrupt, sorry")
iver = int(ver)
if iver < DB_VER1 or iver > DB_VER2:
m = f"{n} db is version {ver}, this tool only supports versions between {DB_VER1} and {DB_VER2}, please upgrade it with copyparty first"
die(m)
if ar.ls:
ls(db)
if ar.cmp:
if not ds:
die("need src db to compare against")
compare("src", ds, "dst", db, ar.v)
compare("dst", db, "src", ds, ar.v)
if ar.copy:
copy_mtp(ds, db, ar.copy, ar.rm_mtp_flag)
if __name__ == "__main__":
main()

37
bin/handlers/README.md Normal file
View file

@ -0,0 +1,37 @@
replace the standard 404 / 403 responses with plugins
# usage
load plugins either globally with `--on404 ~/dev/copyparty/bin/handlers/sorry.py` or for a specific volume with `:c,on404=~/handlers/sorry.py`
# api
each plugin must define a `main()` which takes 3 arguments;
* `cli` is an instance of [copyparty/httpcli.py](https://github.com/9001/copyparty/blob/hovudstraum/copyparty/httpcli.py) (the monstrosity itself)
* `vn` is the VFS which overlaps with the requested URL, and
* `rem` is the URL remainder below the VFS mountpoint
* so `vn.vpath + rem` == `cli.vpath` == original request
# examples
## on404
* [redirect.py](redirect.py) sends an HTTP 301 or 302, redirecting the client to another page/file
* [randpic.py](randpic.py) redirects `/foo/bar/randpic.jpg` to a random pic in `/foo/bar/`
* [sorry.py](answer.py) replies with a custom message instead of the usual 404
* [nooo.py](nooo.py) replies with an endless noooooooooooooo
* [never404.py](never404.py) 100% guarantee that 404 will never be a thing again as it automatically creates dummy files whenever necessary
* [caching-proxy.py](caching-proxy.py) transforms copyparty into a squid/varnish knockoff
## on403
* [ip-ok.py](ip-ok.py) disables security checks if client-ip is 1.2.3.4
# notes
* on403 only works for trivial stuff (basic http access) since I haven't been able to think of any good usecases for it (was just easy to add while doing on404)

36
bin/handlers/caching-proxy.py Executable file
View file

@ -0,0 +1,36 @@
# assume each requested file exists on another webserver and
# download + mirror them as they're requested
# (basically pretend we're warnish)
import os
import requests
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from copyparty.httpcli import HttpCli
def main(cli: "HttpCli", vn, rem):
url = "https://mirrors.edge.kernel.org/alpine/" + rem
abspath = os.path.join(vn.realpath, rem)
# sneaky trick to preserve a requests-session between downloads
# so it doesn't have to spend ages reopening https connections;
# luckily we can stash it inside the copyparty client session,
# name just has to be definitely unused so "hacapo_req_s" it is
req_s = getattr(cli.conn, "hacapo_req_s", None) or requests.Session()
setattr(cli.conn, "hacapo_req_s", req_s)
try:
os.makedirs(os.path.dirname(abspath), exist_ok=True)
with req_s.get(url, stream=True, timeout=69) as r:
r.raise_for_status()
with open(abspath, "wb", 64 * 1024) as f:
for buf in r.iter_content(chunk_size=64 * 1024):
f.write(buf)
except:
os.unlink(abspath)
return "false"
return "retry"

6
bin/handlers/ip-ok.py Executable file
View file

@ -0,0 +1,6 @@
# disable permission checks and allow access if client-ip is 1.2.3.4
def main(cli, vn, rem):
if cli.ip == "1.2.3.4":
return "allow"

11
bin/handlers/never404.py Executable file
View file

@ -0,0 +1,11 @@
# create a dummy file and let copyparty return it
def main(cli, vn, rem):
print("hello", cli.ip)
abspath = vn.canonical(rem)
with open(abspath, "wb") as f:
f.write(b"404? not on MY watch!")
return "retry"

16
bin/handlers/nooo.py Executable file
View file

@ -0,0 +1,16 @@
# reply with an endless "noooooooooooooooooooooooo"
def say_no():
yield b"n"
while True:
yield b"o" * 4096
def main(cli, vn, rem):
cli.send_headers(None, 404, "text/plain")
for chunk in say_no():
cli.s.sendall(chunk)
return "false"

35
bin/handlers/randpic.py Normal file
View file

@ -0,0 +1,35 @@
import os
import random
from urllib.parse import quote
# assuming /foo/bar/ is a valid URL but /foo/bar/randpic.png does not exist,
# hijack the 404 with a redirect to a random pic in that folder
#
# thx to lia & kipu for the idea
def main(cli, vn, rem):
req_fn = rem.split("/")[-1]
if not cli.can_read or not req_fn.startswith("randpic"):
return
req_abspath = vn.canonical(rem)
req_ap_dir = os.path.dirname(req_abspath)
files_in_dir = os.listdir(req_ap_dir)
if "." in req_fn:
file_ext = "." + req_fn.split(".")[-1]
files_in_dir = [x for x in files_in_dir if x.lower().endswith(file_ext)]
if not files_in_dir:
return
selected_file = random.choice(files_in_dir)
req_url = "/".join([vn.vpath, rem]).strip("/")
req_dir = req_url.rsplit("/", 1)[0]
new_url = "/".join([req_dir, quote(selected_file)]).strip("/")
cli.reply(b"redirecting...", 302, headers={"Location": "/" + new_url})
return "true"

52
bin/handlers/redirect.py Normal file
View file

@ -0,0 +1,52 @@
# if someone hits a 404, redirect them to another location
def send_http_302_temporary_redirect(cli, new_path):
"""
replies with an HTTP 302, which is a temporary redirect;
"new_path" can be any of the following:
- "http://a.com/" would redirect to another website,
- "/foo/bar" would redirect to /foo/bar on the same server;
note the leading '/' in the location which is important
"""
cli.reply(b"redirecting...", 302, headers={"Location": new_path})
def send_http_301_permanent_redirect(cli, new_path):
"""
replies with an HTTP 301, which is a permanent redirect;
otherwise identical to send_http_302_temporary_redirect
"""
cli.reply(b"redirecting...", 301, headers={"Location": new_path})
def send_errorpage_with_redirect_link(cli, new_path):
"""
replies with a website explaining that the page has moved;
"new_path" must be an absolute location on the same server
but without a leading '/', so for example "foo/bar"
would redirect to "/foo/bar"
"""
cli.redirect(new_path, click=False, msg="this page has moved")
def main(cli, vn, rem):
"""
this is the function that gets called by copyparty;
note that vn.vpath and cli.vpath does not have a leading '/'
so we're adding the slash in the debug messages below
"""
print(f"this client just hit a 404: {cli.ip}")
print(f"they were accessing this volume: /{vn.vpath}")
print(f"and the original request-path (straight from the URL) was /{cli.vpath}")
print(f"...which resolves to the following filesystem path: {vn.canonical(rem)}")
new_path = "/foo/bar/"
print(f"will now redirect the client to {new_path}")
# uncomment one of these:
send_http_302_temporary_redirect(cli, new_path)
#send_http_301_permanent_redirect(cli, new_path)
#send_errorpage_with_redirect_link(cli, new_path)
return "true"

7
bin/handlers/sorry.py Executable file
View file

@ -0,0 +1,7 @@
# sends a custom response instead of the usual 404
def main(cli, vn, rem):
msg = f"sorry {cli.ip} but {cli.vpath} doesn't exist"
return str(cli.reply(msg.encode("utf-8"), 404, "text/plain"))

37
bin/hooks/README.md Normal file
View file

@ -0,0 +1,37 @@
standalone programs which are executed by copyparty when an event happens (upload, file rename, delete, ...)
these programs either take zero arguments, or a filepath (the affected file), or a json message with filepath + additional info
run copyparty with `--help-hooks` for usage details / hook type explanations (xm/xbu/xau/xiu/xbc/xac/xbr/xar/xbd/xad/xban)
> **note:** in addition to event hooks (the stuff described here), copyparty has another api to run your programs/scripts while providing way more information such as audio tags / video codecs / etc and optionally daisychaining data between scripts in a processing pipeline; if that's what you want then see [mtp plugins](../mtag/) instead
# after upload
* [notify.py](notify.py) shows a desktop notification ([example](https://user-images.githubusercontent.com/241032/215335767-9c91ed24-d36e-4b6b-9766-fb95d12d163f.png))
* [notify2.py](notify2.py) uses the json API to show more context
* [image-noexif.py](image-noexif.py) removes image exif by overwriting / directly editing the uploaded file
* [discord-announce.py](discord-announce.py) announces new uploads on discord using webhooks ([example](https://user-images.githubusercontent.com/241032/215304439-1c1cb3c8-ec6f-4c17-9f27-81f969b1811a.png))
* [reject-mimetype.py](reject-mimetype.py) rejects uploads unless the mimetype is acceptable
* [into-the-cache-it-goes.py](into-the-cache-it-goes.py) avoids bugs in caching proxies by immediately downloading each file that is uploaded
* [podcast-normalizer.py](podcast-normalizer.py) creates a second file with dynamic-range-compression whenever an audio file is uploaded
* good example of the `idx` [hook effect](https://github.com/9001/copyparty/blob/hovudstraum/docs/devnotes.md#hook-effects) to tell copyparty about additional files to scan/index
# upload batches
these are `--xiu` hooks; unlike `xbu` and `xau` (which get executed on every single file), `xiu` hooks are given a list of recent uploads on STDIN after the server has gone idle for N seconds, reducing server load + providing more context
* [xiu.py](xiu.py) is a "minimal" example showing a list of filenames + total filesize
* [xiu-sha.py](xiu-sha.py) produces a sha512 checksum list in the volume root
# before upload
* [reject-extension.py](reject-extension.py) rejects uploads if they match a list of file extensions
* [reloc-by-ext.py](reloc-by-ext.py) redirects an upload to another destination based on the file extension
* good example of the `reloc` [hook effect](https://github.com/9001/copyparty/blob/hovudstraum/docs/devnotes.md#hook-effects)
# on message
* [wget.py](wget.py) lets you download files by POSTing URLs to copyparty
* [qbittorrent-magnet.py](qbittorrent-magnet.py) starts downloading a torrent if you post a magnet url
* [usb-eject.py](usb-eject.py) adds web-UI buttons to safe-remove usb flashdrives shared through copyparty
* [msg-log.py](msg-log.py) is a guestbook; logs messages to a doc in the same folder

77
bin/hooks/discord-announce.py Executable file
View file

@ -0,0 +1,77 @@
#!/usr/bin/env python3
import sys
import json
import requests
from copyparty.util import humansize, quotep
_ = r"""
announces a new upload on discord
example usage as global config:
--xau f,t5,j,bin/hooks/discord-announce.py
parameters explained,
xau = execute after upload
f = fork; don't delay other hooks while this is running
t5 = timeout if it's still running after 5 sec
j = this hook needs upload information as json (not just the filename)
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xau=f,t5,j,bin/hooks/discord-announce.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/inc as volume /inc,
readable by everyone, read-write for user 'ed',
running this plugin on all uploads with the params explained above)
example usage as a volflag in a copyparty config file:
[/inc]
srv/inc
accs:
r: *
rw: ed
flags:
xau: f,t5,j,bin/hooks/discord-announce.py
replace "xau" with "xbu" to announce Before upload starts instead of After completion
# how to discord:
first create the webhook url; https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
then use this to design your message: https://discohook.org/
"""
def main():
WEBHOOK = "https://discord.com/api/webhooks/1234/base64"
WEBHOOK = "https://discord.com/api/webhooks/1066830390280597718/M1TDD110hQA-meRLMRhdurych8iyG35LDoI1YhzbrjGP--BXNZodZFczNVwK4Ce7Yme5"
# read info from copyparty
inf = json.loads(sys.argv[1])
vpath = inf["vp"]
filename = vpath.split("/")[-1]
url = f"https://{inf['host']}/{quotep(vpath)}"
# compose the message to discord
j = {
"title": filename,
"url": url,
"description": url.rsplit("/", 1)[0],
"color": 0x449900,
"fields": [
{"name": "Size", "value": humansize(inf["sz"])},
{"name": "User", "value": inf["user"]},
{"name": "IP", "value": inf["ip"]},
],
}
for v in j["fields"]:
v["inline"] = True
r = requests.post(WEBHOOK, json={"embeds": [j]})
print(f"discord: {r}\n", end="")
if __name__ == "__main__":
main()

72
bin/hooks/image-noexif.py Executable file
View file

@ -0,0 +1,72 @@
#!/usr/bin/env python3
import os
import sys
import subprocess as sp
_ = r"""
remove exif tags from uploaded images; the eventhook edition of
https://github.com/9001/copyparty/blob/hovudstraum/bin/mtag/image-noexif.py
dependencies:
exiftool / perl-Image-ExifTool
being an upload hook, this will take effect after upload completion
but before copyparty has hashed/indexed the file, which means that
copyparty will never index the original file, so deduplication will
not work as expected... which is mostly OK but ehhh
note: modifies the file in-place, so don't set the `f` (fork) flag
example usages; either as global config (all volumes) or as volflag:
--xau bin/hooks/image-noexif.py
-v srv/inc:inc:r:rw,ed:c,xau=bin/hooks/image-noexif.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
explained:
share fs-path srv/inc at /inc (readable by all, read-write for user ed)
running this xau (execute-after-upload) plugin for all uploaded files
"""
# filetypes to process; ignores everything else
EXTS = ("jpg", "jpeg", "avif", "heif", "heic")
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p.encode("utf-8")
def main():
fp = sys.argv[1]
ext = fp.lower().split(".")[-1]
if ext not in EXTS:
return
cwd, fn = os.path.split(fp)
os.chdir(cwd)
f1 = fsenc(fn)
cmd = [
b"exiftool",
b"-exif:all=",
b"-iptc:all=",
b"-xmp:all=",
b"-P",
b"-overwrite_original",
b"--",
f1,
]
sp.check_output(cmd)
print("image-noexif: stripped")
if __name__ == "__main__":
try:
main()
except:
pass

View file

@ -0,0 +1,140 @@
#!/usr/bin/env python3
import sys
import json
import shutil
import platform
import subprocess as sp
from urllib.parse import quote
_ = r"""
try to avoid race conditions in caching proxies
(primarily cloudflare, but probably others too)
by means of the most obvious solution possible:
just as each file has finished uploading, use
the server's external URL to download the file
so that it ends up in the cache, warm and snug
this intentionally delays the upload response
as it waits for the file to finish downloading
before copyparty is allowed to return the URL
NOTE: you must edit this script before use,
replacing https://example.com with your URL
NOTE: if the files are only accessible with a
password and/or filekey, you must also add
a cromulent password in the PASSWORD field
NOTE: needs either wget, curl, or "requests":
python3 -m pip install --user -U requests
example usage as global config:
--xau j,t10,bin/hooks/into-the-cache-it-goes.py
parameters explained,
xau = execute after upload
j = this hook needs upload information as json (not just the filename)
t10 = abort download and continue if it takes longer than 10sec
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xau=j,t10,bin/hooks/into-the-cache-it-goes.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/inc as volume /inc,
readable by everyone, read-write for user 'ed',
running this plugin on all uploads with params explained above)
example usage as a volflag in a copyparty config file:
[/inc]
srv/inc
accs:
r: *
rw: ed
flags:
xau: j,t10,bin/hooks/into-the-cache-it-goes.py
"""
# replace this with your site's external URL
# (including the :portnumber if necessary)
SITE_URL = "https://example.com"
# if downloading is protected by passwords or filekeys,
# specify a valid password between the quotes below:
PASSWORD = ""
# if file is larger than this, skip download
MAX_MEGABYTES = 8
# =============== END OF CONFIG ===============
WINDOWS = platform.system() == "Windows"
def main():
fun = download_with_python
if shutil.which("curl"):
fun = download_with_curl
elif shutil.which("wget"):
fun = download_with_wget
inf = json.loads(sys.argv[1])
if inf["sz"] > 1024 * 1024 * MAX_MEGABYTES:
print("[into-the-cache] file is too large; will not download")
return
file_url = "/"
if inf["vp"]:
file_url += inf["vp"] + "/"
file_url += inf["ap"].replace("\\", "/").split("/")[-1]
file_url = SITE_URL.rstrip("/") + quote(file_url, safe=b"/")
print("[into-the-cache] %s(%s)" % (fun.__name__, file_url))
fun(file_url, PASSWORD.strip())
print("[into-the-cache] Download OK")
def download_with_curl(url, pw):
cmd = ["curl"]
if pw:
cmd += ["-HPW:%s" % (pw,)]
nah = sp.DEVNULL
sp.check_call(cmd + [url], stdout=nah, stderr=nah)
def download_with_wget(url, pw):
cmd = ["wget", "-O"]
cmd += ["nul" if WINDOWS else "/dev/null"]
if pw:
cmd += ["--header=PW:%s" % (pw,)]
nah = sp.DEVNULL
sp.check_call(cmd + [url], stdout=nah, stderr=nah)
def download_with_python(url, pw):
import requests
headers = {}
if pw:
headers["PW"] = pw
with requests.get(url, headers=headers, stream=True) as r:
r.raise_for_status()
for _ in r.iter_content(chunk_size=1024 * 256):
pass
if __name__ == "__main__":
main()

136
bin/hooks/msg-log.py Executable file
View file

@ -0,0 +1,136 @@
#!/usr/bin/env python
# coding: utf-8
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
from __future__ import print_function, unicode_literals
import json
import os
import sys
import time
try:
from datetime import datetime, timezone
except:
from datetime import datetime
_ = r"""
use copyparty as a dumb messaging server / guestbook thing;
accepts guestbook entries from 📟 (message-to-server-log) in the web-ui
initially contributed by @clach04 in https://github.com/9001/copyparty/issues/35 (thanks!)
example usage as global config:
python copyparty-sfx.py --xm j,bin/hooks/msg-log.py
parameters explained,
xm = execute on message (📟)
j = this hook needs message information as json (not just the message-text)
example usage as a volflag (per-volume config):
python copyparty-sfx.py -v srv/log:log:r:c,xm=j,bin/hooks/msg-log.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/log as volume /log, readable by everyone,
running this plugin on all messages with the params explained above)
example usage as a volflag in a copyparty config file:
[/log]
srv/log
accs:
r: *
flags:
xm: j,bin/hooks/msg-log.py
"""
# output filename
FILENAME = os.environ.get("COPYPARTY_MESSAGE_FILENAME", "") or "README.md"
# set True to write in descending order (newest message at top of file);
# note that this becomes very slow/expensive as the file gets bigger
DESCENDING = True
# the message template; the following parameters are provided by copyparty and can be referenced below:
# 'ap' = absolute filesystem path where the message was posted
# 'vp' = virtual path (URL 'path') where the message was posted
# 'mt' = 'at' = unix-timestamp when the message was posted
# 'datetime' = ISO-8601 time when the message was posted
# 'sz' = message size in bytes
# 'host' = the server hostname which the user was accessing (URL 'host')
# 'user' = username (if logged in), otherwise '*'
# 'txt' = the message text itself
# (uncomment the print(msg_info) to see if additional information has been introduced by copyparty since this was written)
TEMPLATE = """
🕒 %(datetime)s, 👤 %(user)s @ %(ip)s
%(txt)s
"""
def write_ascending(filepath, msg_text):
with open(filepath, "a", encoding="utf-8", errors="replace") as outfile:
outfile.write(msg_text)
def write_descending(filepath, msg_text):
lockpath = filepath + ".lock"
got_it = False
for _ in range(16):
try:
os.mkdir(lockpath)
got_it = True
break
except:
time.sleep(0.1)
continue
if not got_it:
return sys.exit(1)
try:
oldpath = filepath + ".old"
os.rename(filepath, oldpath)
with open(oldpath, "r", encoding="utf-8", errors="replace") as infile, open(
filepath, "w", encoding="utf-8", errors="replace"
) as outfile:
outfile.write(msg_text)
while True:
buf = infile.read(4096)
if not buf:
break
outfile.write(buf)
finally:
try:
os.unlink(oldpath)
except:
pass
os.rmdir(lockpath)
def main(argv=None):
if argv is None:
argv = sys.argv
msg_info = json.loads(sys.argv[1])
# print(msg_info)
try:
dt = datetime.fromtimestamp(msg_info["at"], timezone.utc)
except:
dt = datetime.utcfromtimestamp(msg_info["at"])
msg_info["datetime"] = dt.strftime("%Y-%m-%d, %H:%M:%S")
msg_text = TEMPLATE % msg_info
filepath = os.path.join(msg_info["ap"], FILENAME)
if DESCENDING and os.path.exists(filepath):
write_descending(filepath, msg_text)
else:
write_ascending(filepath, msg_text)
print(msg_text)
if __name__ == "__main__":
main()

66
bin/hooks/notify.py Executable file
View file

@ -0,0 +1,66 @@
#!/usr/bin/env python3
import os
import sys
import subprocess as sp
from plyer import notification
_ = r"""
show os notification on upload; works on windows, linux, macos, android
depdencies:
windows: python3 -m pip install --user -U plyer
linux: python3 -m pip install --user -U plyer
macos: python3 -m pip install --user -U plyer pyobjus
android: just termux and termux-api
example usages; either as global config (all volumes) or as volflag:
--xau f,bin/hooks/notify.py
-v srv/inc:inc:r:rw,ed:c,xau=f,bin/hooks/notify.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/inc as volume /inc,
readable by everyone, read-write for user 'ed',
running this plugin on all uploads with the params listed below)
parameters explained,
xau = execute after upload
f = fork so it doesn't block uploads
"""
try:
from copyparty.util import humansize
except:
def humansize(n):
return n
def main():
fp = sys.argv[1]
dp, fn = os.path.split(fp)
try:
sz = humansize(os.path.getsize(fp))
except:
sz = "?"
msg = "{} ({})\n📁 {}".format(fn, sz, dp)
title = "File received"
if "com.termux" in sys.executable:
sp.run(["termux-notification", "-t", title, "-c", msg])
return
icon = "emblem-documents-symbolic" if sys.platform == "linux" else ""
notification.notify(
title=title,
message=msg,
app_icon=icon,
timeout=10,
)
if __name__ == "__main__":
main()

73
bin/hooks/notify2.py Executable file
View file

@ -0,0 +1,73 @@
#!/usr/bin/env python3
import json
import os
import sys
import subprocess as sp
from datetime import datetime, timezone
from plyer import notification
_ = r"""
same as notify.py but with additional info (uploader, ...)
and also supports --xm (notify on 📟 message)
example usages; either as global config (all volumes) or as volflag:
--xm f,j,bin/hooks/notify2.py
--xau f,j,bin/hooks/notify2.py
-v srv/inc:inc:r:rw,ed:c,xm=f,j,bin/hooks/notify2.py
-v srv/inc:inc:r:rw,ed:c,xau=f,j,bin/hooks/notify2.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/inc as volume /inc,
readable by everyone, read-write for user 'ed',
running this plugin on all uploads / msgs with the params listed below)
parameters explained,
xau = execute after upload
f = fork so it doesn't block uploads
j = provide json instead of filepath list
"""
try:
from copyparty.util import humansize
except:
def humansize(n):
return n
def main():
inf = json.loads(sys.argv[1])
fp = inf["ap"]
sz = humansize(inf["sz"])
dp, fn = os.path.split(fp)
dt = datetime.fromtimestamp(inf["mt"], timezone.utc)
mt = dt.strftime("%Y-%m-%d %H:%M:%S")
msg = f"{fn} ({sz})\n📁 {dp}"
title = "File received"
icon = "emblem-documents-symbolic" if sys.platform == "linux" else ""
if inf.get("txt"):
msg = inf["txt"]
title = "Message received"
icon = "mail-unread-symbolic" if sys.platform == "linux" else ""
msg += f"\n👤 {inf['user']} ({inf['ip']})\n🕒 {mt}"
if "com.termux" in sys.executable:
sp.run(["termux-notification", "-t", title, "-c", msg])
return
notification.notify(
title=title,
message=msg,
app_icon=icon,
timeout=10,
)
if __name__ == "__main__":
main()

121
bin/hooks/podcast-normalizer.py Executable file
View file

@ -0,0 +1,121 @@
#!/usr/bin/env python3
import json
import os
import sys
import subprocess as sp
_ = r"""
sends all uploaded audio files through an aggressive
dynamic-range-compressor to even out the volume levels
dependencies:
ffmpeg
being an xau hook, this gets eXecuted After Upload completion
but before copyparty has started hashing/indexing the file, so
we'll create a second normalized copy in a subfolder and tell
copyparty to hash/index that additional file as well
example usage as global config:
-e2d -e2t --xau j,c1,bin/hooks/podcast-normalizer.py
parameters explained,
e2d/e2t = enable database and metadata indexing
xau = execute after upload
j = this hook needs upload information as json (not just the filename)
c1 = this hook returns json on stdout, so tell copyparty to read that
example usage as a volflag (per-volume config):
-v srv/inc/pods:inc/pods:r:rw,ed:c,xau=j,c1,bin/hooks/podcast-normalizer.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share fs-path srv/inc/pods at URL /inc/pods,
readable by all, read-write for user ed,
running this xau (exec-after-upload) plugin for all uploaded files)
example usage as a volflag in a copyparty config file:
[/inc/pods]
srv/inc/pods
accs:
r: *
rw: ed
flags:
e2d # enables file indexing
e2t # metadata tags too
xau: j,c1,bin/hooks/podcast-normalizer.py
"""
########################################################################
### CONFIG
# filetypes to process; ignores everything else
EXTS = "mp3 flac ogg oga opus m4a aac wav wma"
# the name of the subdir to put the normalized files in
SUBDIR = "normalized"
########################################################################
# try to enable support for crazy filenames
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p.encode("utf-8")
def main():
# read info from copyparty
inf = json.loads(sys.argv[1])
vpath = inf["vp"]
abspath = inf["ap"]
# check if the file-extension is on the to-be-processed list
ext = abspath.lower().split(".")[-1]
if ext not in EXTS.split():
return
# jump into the folder where the file was uploaded
# and create the subfolder to place the normalized copy inside
dirpath, filename = os.path.split(abspath)
os.chdir(fsenc(dirpath))
os.makedirs(SUBDIR, exist_ok=True)
# the input and output filenames to give ffmpeg
fname_in = fsenc(f"./{filename}")
fname_out = fsenc(f"{SUBDIR}/{filename}.opus")
# fmt: off
# create and run the ffmpeg command
cmd = [
b"ffmpeg",
b"-nostdin",
b"-hide_banner",
b"-i", fname_in,
b"-af", b"dynaudnorm=f=100:g=9", # the normalizer config
b"-c:a", b"libopus",
b"-b:a", b"128k",
fname_out,
]
# fmt: on
sp.check_output(cmd)
# and finally, tell copyparty about the new file
# so it appears in the database and rss-feed:
vpath = f"{SUBDIR}/{filename}.opus"
print(json.dumps({"idx": {"vp": [vpath]}}))
# (it's fine to give it a relative path like that; it gets
# resolved relative to the folder the file was uploaded into)
if __name__ == "__main__":
try:
main()
except Exception as ex:
print("podcast-normalizer failed; %r" % (ex,))

128
bin/hooks/qbittorrent-magnet.py Executable file
View file

@ -0,0 +1,128 @@
#!/usr/bin/env python3
# coding: utf-8
import os
import sys
import json
import shutil
import subprocess as sp
_ = r"""
start downloading a torrent by POSTing a magnet URL to copyparty,
for example using 📟 (message-to-server-log) in the web-ui
by default it will download the torrent to the folder you were in
when you pasted the magnet into the message-to-server-log field
you can optionally specify another location by adding a whitespace
after the magnet URL followed by the name of the subfolder to DL into,
or for example "anime/airing" would download to /srv/media/anime/airing
because the keyword "anime" is in the DESTS config below
needs python3
example usage as global config (not a good idea):
python copyparty-sfx.py --xm aw,f,j,t60,bin/hooks/qbittorrent-magnet.py
parameters explained,
xm = execute on message (📟)
aw = only users with write-access can use this
f = fork; don't delay other hooks while this is running
j = provide message information as json (not just the text)
t60 = abort if qbittorrent has to think about it for more than 1 min
example usage as a volflag (per-volume config, much better):
-v srv/qb:qb:A,ed:c,xm=aw,f,j,t60,bin/hooks/qbittorrent-magnet.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/qb as volume /qb with Admin for user 'ed',
running this plugin on all messages with the params explained above)
example usage as a volflag in a copyparty config file:
[/qb]
srv/qb
accs:
A: ed
flags:
xm: aw,f,j,t60,bin/hooks/qbittorrent-magnet.py
the volflag examples only kicks in if you send the torrent magnet
while you're in the /qb folder (or any folder below there)
"""
# list of usernames to allow
ALLOWLIST = [ "ed", "morpheus" ]
# list of destination aliases to translate into full filesystem
# paths; takes effect if the first folder component in the
# custom download location matches anything in this dict
DESTS = {
"iso": "/srv/pub/linux-isos",
"anime": "/srv/media/anime",
}
def main():
inf = json.loads(sys.argv[1])
url = inf["txt"]
if not url.lower().startswith("magnet:?"):
# not a magnet, abort
return
if inf["user"] not in ALLOWLIST:
print("🧲 denied for user", inf["user"])
return
# might as well run the command inside the filesystem folder
# which matches the URL that the magnet message was sent to
os.chdir(inf["ap"])
# is there is a custom download location in the url?
dst = ""
if " " in url:
url, dst = url.split(" ", 1)
# is the location in the predefined list of locations?
parts = dst.replace("\\", "/").split("/")
if parts[0] in DESTS:
dst = os.path.join(DESTS[parts[0]], *(parts[1:]))
else:
# nope, so download to the current folder instead;
# comment the dst line below to instead use the default
# download location from your qbittorrent settings
dst = inf["ap"]
pass
# archlinux has a -nox suffix for qbittorrent if headless
# so check if we should be using that
if shutil.which("qbittorrent-nox"):
torrent_bin = "qbittorrent-nox"
else:
torrent_bin = "qbittorrent"
# the command to add a new torrent, adjust if necessary
cmd = [torrent_bin, url]
if dst:
cmd += ["--save-path=%s" % (dst,)]
# if copyparty and qbittorrent are running as different users
# you may have to do something like the following
# (assuming qbittorrent* is nopasswd-allowed in sudoers):
#
# cmd = ["sudo", "-u", "qbitter"] + cmd
print("🧲", cmd)
try:
sp.check_call(cmd)
except:
print("🧲 FAILED TO ADD", url)
if __name__ == "__main__":
main()

35
bin/hooks/reject-extension.py Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/env python3
import sys
_ = r"""
reject file uploads by file extension
example usage as global config:
--xbu c,bin/hooks/reject-extension.py
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xbu=c,bin/hooks/reject-extension.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/inc as volume /inc,
readable by everyone, read-write for user 'ed',
running this plugin on all uploads with the params listed below)
parameters explained,
xbu = execute before upload
c = check result, reject upload if error
"""
def main():
bad = "exe scr com pif bat ps1 jar msi"
ext = sys.argv[1].split(".")[-1]
sys.exit(1 if ext in bad.split() else 0)
if __name__ == "__main__":
main()

44
bin/hooks/reject-mimetype.py Executable file
View file

@ -0,0 +1,44 @@
#!/usr/bin/env python3
import sys
import magic
_ = r"""
reject file uploads by mimetype
dependencies (linux, macos):
python3 -m pip install --user -U python-magic
dependencies (windows):
python3 -m pip install --user -U python-magic-bin
example usage as global config:
--xau c,bin/hooks/reject-mimetype.py
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xau=c,bin/hooks/reject-mimetype.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/inc as volume /inc,
readable by everyone, read-write for user 'ed',
running this plugin on all uploads with the params listed below)
parameters explained,
xau = execute after upload
c = check result, reject upload if error
"""
def main():
ok = ["image/jpeg", "image/png"]
mt = magic.from_file(sys.argv[1], mime=True)
print(mt)
sys.exit(1 if mt not in ok else 0)
if __name__ == "__main__":
main()

130
bin/hooks/reloc-by-ext.py Normal file
View file

@ -0,0 +1,130 @@
#!/usr/bin/env python3
import json
import os
import re
import sys
_ = r"""
relocate/redirect incoming uploads according to file extension or name
example usage as global config:
--xbu j,c1,bin/hooks/reloc-by-ext.py
parameters explained,
xbu = execute before upload
j = this hook needs upload information as json (not just the filename)
c1 = this hook returns json on stdout, so tell copyparty to read that
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xbu=j,c1,bin/hooks/reloc-by-ext.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/inc as volume /inc,
readable by everyone, read-write for user 'ed',
running this plugin on all uploads with the params explained above)
example usage as a volflag in a copyparty config file:
[/inc]
srv/inc
accs:
r: *
rw: ed
flags:
xbu: j,c1,bin/hooks/reloc-by-ext.py
note: this could also work as an xau hook (after-upload), but
because it doesn't need to read the file contents its better
as xbu (before-upload) since that's safer / less buggy,
and only xbu works with up2k (dragdrop into browser)
"""
PICS = "avif bmp gif heic heif jpeg jpg jxl png psd qoi tga tif tiff webp"
VIDS = "3gp asf avi flv mkv mov mp4 mpeg mpeg2 mpegts mpg mpg2 nut ogm ogv rm ts vob webm wmv"
MUSIC = "aac aif aiff alac amr ape dfpwm flac m4a mp3 ogg opus ra tak tta wav wma wv"
def main():
inf = json.loads(sys.argv[1])
vdir, fn = os.path.split(inf["vp"])
try:
fn, ext = fn.rsplit(".", 1)
except:
# no file extension; pretend it's "bin"
ext = "bin"
ext = ext.lower()
# this function must end by printing the action to perform;
# that's handled by the print(json.dumps(... at the bottom
#
# the action can contain the following keys:
# "vp" is the folder URL to move the upload to,
# "ap" is the filesystem-path to move it to (but "vp" is safer),
# "fn" overrides the final filename to use
##
## some example actions to take; pick one by
## selecting it inside the print at the end:
##
# move all uploads to one specific folder
into_junk = {"vp": "/junk"}
# create a subfolder named after the filetype and move it into there
into_subfolder = {"vp": ext}
# move it into a toplevel folder named after the filetype
into_toplevel = {"vp": "/" + ext}
# move it into a filetype-named folder next to the target folder
into_sibling = {"vp": "../" + ext}
# move images into "/just/pics", vids into "/just/vids",
# music into "/just/tunes", and anything else as-is
if ext in PICS.split():
by_category = {"vp": "/just/pics"}
elif ext in VIDS.split():
by_category = {"vp": "/just/vids"}
elif ext in MUSIC.split():
by_category = {"vp": "/just/tunes"}
else:
by_category = {} # no action
# now choose the default effect to apply; can be any of these:
# into_junk into_subfolder into_toplevel into_sibling by_category
effect = into_sibling
##
## but we can keep going, adding more speicifc rules
## which can take precedence, replacing the fallback
## effect we just specified:
##
fn = fn.lower() # lowercase filename to make this easier
if "screenshot" in fn:
effect = {"vp": "/ss"}
if "mpv_" in fn:
effect = {"vp": "/anishots"}
elif "debian" in fn or "biebian" in fn:
effect = {"vp": "/linux-ISOs"}
elif re.search(r"ep(isode |\.)?[0-9]", fn):
effect = {"vp": "/podcasts"}
# regex lets you grab a part of the matching
# text and use that in the upload path:
m = re.search(r"\b(op|ed)([^a-z]|$)", fn)
if m:
# the regex matched; use "anime-op" or "anime-ed"
effect = {"vp": "/anime-" + m[1]}
# aaand DO IT
print(json.dumps({"reloc": effect}))
if __name__ == "__main__":
main()

62
bin/hooks/usb-eject.js Normal file
View file

@ -0,0 +1,62 @@
// see usb-eject.py for usage
function usbclick() {
var o = QS('#treeul a[dst="/usb/"]') || QS('#treepar a[dst="/usb/"]');
if (o)
o.click();
}
function eject_cb() {
var t = ('' + this.responseText).trim();
if (t.indexOf('can be safely unplugged') < 0 && t.indexOf('Device can be removed') < 0)
return toast.err(30, 'usb eject failed:\n\n' + t);
toast.ok(5, esc(t.replace(/ - /g, '\n\n')).trim());
usbclick(); setTimeout(usbclick, 10);
};
function add_eject_2(a) {
var aw = a.getAttribute('href').split(/\//g);
if (aw.length != 4 || aw[3])
return;
var v = aw[2],
k = 'umount_' + v;
for (var b = 0; b < 9; b++) {
var o = ebi(k);
if (!o)
break;
o.parentNode.removeChild(o);
}
a.appendChild(mknod('span', k, '⏏'), a);
o = ebi(k);
o.style.cssText = 'position:absolute; right:1em; margin-top:-.2em; font-size:1.3em';
o.onclick = function (e) {
ev(e);
var xhr = new XHR();
xhr.open('POST', get_evpath(), true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');
xhr.send('msg=' + uricom_enc(':usb-eject:' + v + ':'));
xhr.onload = xhr.onerror = eject_cb;
toast.inf(10, "ejecting " + v + "...");
};
};
function add_eject() {
var o = QSA('#treeul a[href^="/usb/"]') || QSA('#treepar a[href^="/usb/"]');
for (var a = o.length - 1; a > 0; a--)
add_eject_2(o[a]);
};
(function() {
var f0 = treectl.rendertree;
treectl.rendertree = function (res, ts, top0, dst, rst) {
var ret = f0(res, ts, top0, dst, rst);
add_eject();
return ret;
};
})();
setTimeout(add_eject, 50);

62
bin/hooks/usb-eject.py Normal file
View file

@ -0,0 +1,62 @@
#!/usr/bin/env python3
import os
import stat
import subprocess as sp
import sys
from urllib.parse import unquote_to_bytes as unquote
"""
if you've found yourself using copyparty to serve flashdrives on a LAN
and your only wish is that the web-UI had a button to unmount / safely
remove those flashdrives, then boy howdy are you in the right place :D
put usb-eject.js in the webroot (or somewhere else http-accessible)
then run copyparty with these args:
-v /run/media/egon:/usb:A:c,hist=/tmp/junk
--xm=c1,bin/hooks/usb-eject.py
--js-browser=/usb-eject.js
which does the following respectively,
* share all of /run/media/egon as /usb with admin for everyone
and put the histpath somewhere it won't cause trouble
* run the usb-eject hook with stdout redirect to the web-ui
* add the complementary usb-eject.js to the browser
"""
MOUNT_BASE = b"/run/media/egon/"
def main():
try:
label = sys.argv[1].split(":usb-eject:")[1].split(":")[0]
mp = MOUNT_BASE + unquote(label)
# print("ejecting [%s]... " % (mp,), end="")
mp = os.path.abspath(os.path.realpath(mp))
st = os.lstat(mp)
if not stat.S_ISDIR(st.st_mode) or not mp.startswith(MOUNT_BASE):
raise Exception("not a regular directory")
# if you're running copyparty as root (thx for the faith)
# you'll need something like this to make dbus talkative
cmd = b"sudo -u egon DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus gio mount -e"
# but if copyparty and the ui-session is running
# as the same user (good) then this is plenty
cmd = b"gio mount -e"
cmd = cmd.split(b" ") + [mp]
ret = sp.check_output(cmd).decode("utf-8", "replace")
print(ret.strip() or (label + " can be safely unplugged"))
except Exception as ex:
print("unmount failed: %r" % (ex,))
if __name__ == "__main__":
main()

77
bin/hooks/wget.py Executable file
View file

@ -0,0 +1,77 @@
#!/usr/bin/env python3
import os
import sys
import json
import subprocess as sp
_ = r"""
use copyparty as a file downloader by POSTing URLs as
application/x-www-form-urlencoded (for example using the
📟 message-to-server-log in the web-ui)
example usage as global config:
--xm aw,f,j,t3600,bin/hooks/wget.py
parameters explained,
xm = execute on message-to-server-log
aw = only users with write-access can use this
f = fork; don't delay other hooks while this is running
j = provide message information as json (not just the text)
c3 = mute all output
t3600 = timeout and abort download after 1 hour
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xm=aw,f,j,t3600,bin/hooks/wget.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/inc as volume /inc,
readable by everyone, read-write for user 'ed',
running this plugin on all messages with the params explained above)
example usage as a volflag in a copyparty config file:
[/inc]
srv/inc
accs:
r: *
rw: ed
flags:
xm: aw,f,j,t3600,bin/hooks/wget.py
the volflag examples only kicks in if you send the message
while you're in the /inc folder (or any folder below there)
"""
def main():
inf = json.loads(sys.argv[1])
url = inf["txt"]
if "://" not in url:
url = "https://" + url
proto = url.split("://")[0].lower()
if proto not in ("http", "https", "ftp", "ftps"):
raise Exception("bad proto {}".format(proto))
os.chdir(inf["ap"])
name = url.split("?")[0].split("/")[-1]
tfn = "-- DOWNLOADING " + name
print(f"{tfn}\n", end="")
open(tfn, "wb").close()
cmd = ["wget", "--trust-server-names", "-nv", "--", url]
try:
sp.check_call(cmd)
except:
t = "-- FAILED TO DONWLOAD " + name
print(f"{t}\n", end="")
open(t, "wb").close()
os.unlink(tfn)
if __name__ == "__main__":
main()

111
bin/hooks/xiu-sha.py Executable file
View file

@ -0,0 +1,111 @@
#!/usr/bin/env python3
import hashlib
import json
import sys
from datetime import datetime, timezone
_ = r"""
this hook will produce a single sha512 file which
covers all recent uploads (plus metadata comments)
use this with --xiu, which makes copyparty buffer
uploads until server is idle, providing file infos
on stdin (filepaths or json)
example usage as global config:
--xiu i5,j,bin/hooks/xiu-sha.py
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xiu=i5,j,bin/hooks/xiu-sha.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/inc as volume /inc,
readable by everyone, read-write for user 'ed',
running this plugin on batches of uploads with the params listed below)
parameters explained,
xiu = execute after uploads...
i5 = ...after volume has been idle for 5sec
j = provide json instead of filepath list
note the "f" (fork) flag is not set, so this xiu
will block other xiu hooks while it's running
"""
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p
UTC = timezone.utc
def humantime(ts):
return datetime.fromtimestamp(ts, UTC).strftime("%Y-%m-%d %H:%M:%S")
def find_files_root(inf):
di = 9000
for f1, f2 in zip(inf, inf[1:]):
p1 = f1["ap"].replace("\\", "/").rsplit("/", 1)[0]
p2 = f2["ap"].replace("\\", "/").rsplit("/", 1)[0]
di = min(len(p1), len(p2), di)
di = next((i for i in range(di) if p1[i] != p2[i]), di)
return di + 1
def find_vol_root(inf):
return len(inf[0]["ap"][: -len(inf[0]["vp"])])
def main():
zb = sys.stdin.buffer.read()
zs = zb.decode("utf-8", "replace")
inf = json.loads(zs)
# root directory (where to put the sha512 file);
# di = find_files_root(inf) # next to the file closest to volume root
di = find_vol_root(inf) # top of the entire volume
ret = []
total_sz = 0
for md in inf:
ap = md["ap"]
rp = ap[di:]
total_sz += md["sz"]
fsize = "{:,}".format(md["sz"])
mtime = humantime(md["mt"])
up_ts = humantime(md["at"])
h = hashlib.sha512()
with open(fsenc(md["ap"]), "rb", 512 * 1024) as f:
while True:
buf = f.read(512 * 1024)
if not buf:
break
h.update(buf)
cksum = h.hexdigest()
meta = " | ".join([md["wark"], up_ts, mtime, fsize, md["ip"]])
ret.append("# {}\n{} *{}".format(meta, cksum, rp))
ret.append("# {} files, {} bytes total".format(len(inf), total_sz))
ret.append("")
ftime = datetime.now(UTC).strftime("%Y-%m%d-%H%M%S.%f")
fp = "{}xfer-{}.sha512".format(inf[0]["ap"][:di], ftime)
with open(fsenc(fp), "wb") as f:
f.write("\n".join(ret).encode("utf-8", "replace"))
print("wrote checksums to {}".format(fp))
if __name__ == "__main__":
main()

50
bin/hooks/xiu.py Executable file
View file

@ -0,0 +1,50 @@
#!/usr/bin/env python3
import json
import sys
_ = r"""
this hook prints absolute filepaths + total size
use this with --xiu, which makes copyparty buffer
uploads until server is idle, providing file infos
on stdin (filepaths or json)
example usage as global config:
--xiu i1,j,bin/hooks/xiu.py
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xiu=i1,j,bin/hooks/xiu.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^
(share filesystem-path srv/inc as volume /inc,
readable by everyone, read-write for user 'ed',
running this plugin on batches of uploads with the params listed below)
parameters explained,
xiu = execute after uploads...
i1 = ...after volume has been idle for 1sec
j = provide json instead of filepath list
note the "f" (fork) flag is not set, so this xiu
will block other xiu hooks while it's running
"""
def main():
zb = sys.stdin.buffer.read()
zs = zb.decode("utf-8", "replace")
inf = json.loads(zs)
total_sz = 0
for upload in inf:
sz = upload["sz"]
total_sz += sz
print("{:9} {}".format(sz, upload["ap"]))
print("{} files, {} bytes total".format(len(inf), total_sz))
if __name__ == "__main__":
main()

70
bin/mtag/README.md Normal file
View file

@ -0,0 +1,70 @@
standalone programs which take an audio file as argument
you may want to forget about all this fancy complicated stuff and just use [event hooks](../hooks/) instead (which doesn't need `-e2ts` or ffmpeg)
----
**NOTE:** these all require `-e2ts` to be functional, meaning you need to do at least one of these: `apt install ffmpeg` or `pip3 install mutagen`
some of these rely on libraries which are not MIT-compatible
* [audio-bpm.py](./audio-bpm.py) detects the BPM of music using the BeatRoot Vamp Plugin; imports GPL2
* [audio-key.py](./audio-key.py) detects the melodic key of music using the Mixxx fork of keyfinder; imports GPL3
these invoke standalone programs which are GPL or similar, so is legally fine for most purposes:
* [media-hash.py](./media-hash.py) generates checksums for audio and video streams; uses FFmpeg (LGPL or GPL)
* [image-noexif.py](./image-noexif.py) removes exif tags from images; uses exiftool (GPLv1 or artistic-license)
these do not have any problematic dependencies at all:
* [cksum.py](./cksum.py) computes various checksums
* [exe.py](./exe.py) grabs metadata from .exe and .dll files (example for retrieving multiple tags with one parser)
* [wget.py](./wget.py) lets you download files by POSTing URLs to copyparty
* also available as an [event hook](../hooks/wget.py)
## dangerous plugins
plugins in this section should only be used with appropriate precautions:
* [very-bad-idea.py](./very-bad-idea.py) combined with [meadup.js](https://github.com/9001/copyparty/blob/hovudstraum/contrib/plugins/meadup.js) converts copyparty into a janky yet extremely flexible chromecast clone
* also adds a virtual keyboard by @steinuil to the basic-upload tab for comfy couch crowd control
* anything uploaded through the [android app](https://github.com/9001/party-up) (files or links) are executed on the server, meaning anyone can infect your PC with malware... so protect this with a password and keep it on a LAN!
* [kamelåså](https://github.com/steinuil/kameloso) is a much better (and MUCH safer) alternative to this plugin
* powered by [chicken-curry-banana-pineapple-peanut pizza](https://a.ocv.me/pub/g/i/2025/01/298437ce-8351-4c8c-861c-fa131d217999.jpg?cache) so you know it's good
* and, unlike this plugin, kamelåså even has windows support (nice)
# dependencies
run [`install-deps.sh`](install-deps.sh) to build/install most dependencies required by these programs (supports windows/linux/macos)
*alternatively* (or preferably) use packages from your distro instead, then you'll need at least these:
* from distro: `numpy vamp-plugin-sdk beatroot-vamp mixxx-keyfinder ffmpeg`
* from pip: `keyfinder vamp`
# usage from copyparty
`copyparty -e2dsa -e2ts` followed by any combination of these:
* `-mtp key=f,audio-key.py`
* `-mtp .bpm=f,audio-bpm.py`
* `-mtp ahash,vhash=f,media-hash.py`
* `f,` makes the detected value replace any existing values
* the `.` in `.bpm` indicates numeric value
* assumes the python files are in the folder you're launching copyparty from, replace the filename with a relative/absolute path if that's not the case
* `mtp` modules will not run if a file has existing tags in the db, so clear out the tags with `-e2tsr` the first time you launch with new `mtp` options
## usage with volflags
instead of affecting all volumes, you can set the options for just one volume like so:
`copyparty -v /mnt/nas/music:/music:r:c,e2dsa:c,e2ts` immediately followed by any combination of these:
* `:c,mtp=key=f,audio-key.py`
* `:c,mtp=.bpm=f,audio-bpm.py`
* `:c,mtp=ahash,vhash=f,media-hash.py`

92
bin/mtag/audio-bpm.py Executable file
View file

@ -0,0 +1,92 @@
#!/usr/bin/env python
import os
import sys
import vamp
import tempfile
import numpy as np
import subprocess as sp
from copyparty.util import fsenc
"""
dep: vamp
dep: beatroot-vamp
dep: ffmpeg
"""
# save beat timestamps to ".beats/filename.txt"
SAVE = False
def det(tf):
# fmt: off
sp.check_call([
b"ffmpeg",
b"-nostdin",
b"-hide_banner",
b"-v", b"fatal",
b"-y", b"-i", fsenc(sys.argv[1]),
b"-map", b"0:a:0",
b"-ac", b"1",
b"-ar", b"22050",
b"-t", b"360",
b"-f", b"f32le",
fsenc(tf)
])
# fmt: on
with open(tf, "rb") as f:
d = np.fromfile(f, dtype=np.float32)
try:
# 98% accuracy on jcore
c = vamp.collect(d, 22050, "beatroot-vamp:beatroot")
cl = c["list"]
except:
# fallback; 73% accuracy
plug = "vamp-example-plugins:fixedtempo"
c = vamp.collect(d, 22050, plug, parameters={"maxdflen": 40})
print(c["list"][0]["label"].split(" ")[0])
return
# throws if detection failed:
beats = [float(x["timestamp"]) for x in cl]
bds = [b - a for a, b in zip(beats, beats[1:])]
bds.sort()
n0 = int(len(bds) * 0.2)
n1 = int(len(bds) * 0.75) + 1
bds = bds[n0:n1]
bpm = sum(bds)
bpm = round(60 * (len(bds) / bpm), 2)
print(f"{bpm:.2f}")
if SAVE:
fdir, fname = os.path.split(sys.argv[1])
bdir = os.path.join(fdir, ".beats")
try:
os.mkdir(fsenc(bdir))
except:
pass
fp = os.path.join(bdir, fname) + ".txt"
with open(fsenc(fp), "wb") as f:
txt = "\n".join([f"{x:.2f}" for x in beats])
f.write(txt.encode("utf-8"))
def main():
with tempfile.NamedTemporaryFile(suffix=".pcm", delete=False) as f:
f.write(b"h")
tf = f.name
try:
det(tf)
except:
pass # mute
finally:
os.unlink(tf)
if __name__ == "__main__":
main()

123
bin/mtag/audio-key-slicing.py Executable file
View file

@ -0,0 +1,123 @@
#!/usr/bin/env python
import re
import os
import sys
import tempfile
import subprocess as sp
import keyfinder
from copyparty.util import fsenc
"""
dep: github/mixxxdj/libkeyfinder
dep: pypi/keyfinder
dep: ffmpeg
note: this is a janky edition of the regular audio-key.py,
slicing the files at 20sec intervals and keeping 5sec from each,
surprisingly accurate but still garbage (446 ok, 69 bad, 13% miss)
it is fast tho
"""
def get_duration():
# TODO provide ffprobe tags to mtp as json
# fmt: off
dur = sp.check_output([
"ffprobe",
"-hide_banner",
"-v", "fatal",
"-show_streams",
"-show_format",
fsenc(sys.argv[1])
])
# fmt: on
dur = dur.decode("ascii", "replace").split("\n")
dur = [x.split("=")[1] for x in dur if x.startswith("duration=")]
dur = [float(x) for x in dur if re.match(r"^[0-9\.,]+$", x)]
return list(sorted(dur))[-1] if dur else None
def get_segs(dur):
# keep first 5s of each 20s,
# keep entire last segment
ofs = 0
segs = []
while True:
seg = [ofs, 5]
segs.append(seg)
if dur - ofs < 20:
seg[-1] = int(dur - seg[0])
break
ofs += 20
return segs
def slice(tf):
dur = get_duration()
dur = min(dur, 600) # max 10min
segs = get_segs(dur)
# fmt: off
cmd = [
"ffmpeg",
"-nostdin",
"-hide_banner",
"-v", "fatal",
"-y"
]
for seg in segs:
cmd.extend([
"-ss", str(seg[0]),
"-i", fsenc(sys.argv[1])
])
filt = ""
for n, seg in enumerate(segs):
filt += "[{}:a:0]atrim=duration={}[a{}]; ".format(n, seg[1], n)
prev = "a0"
for n in range(1, len(segs)):
nxt = "b{}".format(n)
filt += "[{}][a{}]acrossfade=d=0.5[{}]; ".format(prev, n, nxt)
prev = nxt
cmd.extend([
"-filter_complex", filt[:-2],
"-map", "[{}]".format(nxt),
"-sample_fmt", "s16",
tf
])
# fmt: on
# print(cmd)
sp.check_call(cmd)
def det(tf):
slice(tf)
print(keyfinder.key(tf).camelot())
def main():
with tempfile.NamedTemporaryFile(suffix=".flac", delete=False) as f:
f.write(b"h")
tf = f.name
try:
det(tf)
finally:
os.unlink(tf)
pass
if __name__ == "__main__":
main()

55
bin/mtag/audio-key.py Executable file
View file

@ -0,0 +1,55 @@
#!/usr/bin/env python
import os
import sys
import tempfile
import subprocess as sp
import keyfinder
from copyparty.util import fsenc
"""
dep: github/mixxxdj/libkeyfinder
dep: pypi/keyfinder
dep: ffmpeg
"""
# tried trimming the first/last 5th, bad idea,
# misdetects 9a law field (Sphere Caliber) as 10b,
# obvious when mixing 9a ghostly parapara ship
def det(tf):
# fmt: off
sp.check_call([
b"ffmpeg",
b"-nostdin",
b"-hide_banner",
b"-v", b"fatal",
b"-y", b"-i", fsenc(sys.argv[1]),
b"-map", b"0:a:0",
b"-t", b"300",
b"-sample_fmt", b"s16",
fsenc(tf)
])
# fmt: on
print(keyfinder.key(tf).camelot())
def main():
with tempfile.NamedTemporaryFile(suffix=".flac", delete=False) as f:
f.write(b"h")
tf = f.name
try:
det(tf)
except:
pass # mute
finally:
os.unlink(tf)
if __name__ == "__main__":
main()

93
bin/mtag/cksum.py Executable file
View file

@ -0,0 +1,93 @@
#!/usr/bin/env python3
import sys
import json
import struct
import base64
import hashlib
try:
from zlib_ng import zlib_ng as zlib
except:
import zlib
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p
"""
calculates various checksums for uploads,
usage: -mtp crc32,md5,sha1,sha256b=ad,bin/mtag/cksum.py
"""
def main():
config = "crc32 md5 md5b sha1 sha1b sha256 sha256b sha512/240 sha512b/240"
# b suffix = base64 encoded
# slash = truncate to n bits
known = {
"md5": hashlib.md5,
"sha1": hashlib.sha1,
"sha256": hashlib.sha256,
"sha512": hashlib.sha512,
}
config = config.split()
hashers = {
k: v()
for k, v in known.items()
if k in [x.split("/")[0].rstrip("b") for x in known]
}
crc32 = 0 if "crc32" in config else None
with open(fsenc(sys.argv[1]), "rb", 512 * 1024) as f:
while True:
buf = f.read(64 * 1024)
if not buf:
break
for x in hashers.values():
x.update(buf)
if crc32 is not None:
crc32 = zlib.crc32(buf, crc32)
ret = {}
for s in config:
alg = s.split("/")[0]
b64 = alg.endswith("b")
alg = alg.rstrip("b")
if alg in hashers:
v = hashers[alg].digest()
elif alg == "crc32":
v = crc32
if v < 0:
v &= 2 ** 32 - 1
v = struct.pack(">L", v)
else:
raise Exception("what is {}".format(s))
if "/" in s:
v = v[: int(int(s.split("/")[1]) / 8)]
if b64:
v = base64.b64encode(v).decode("ascii").rstrip("=")
else:
try:
v = v.hex()
except:
import binascii
v = binascii.hexlify(v)
ret[s] = v
print(json.dumps(ret, indent=4))
if __name__ == "__main__":
main()

96
bin/mtag/exe.py Normal file
View file

@ -0,0 +1,96 @@
#!/usr/bin/env python
import sys
import time
import json
import pefile
"""
retrieve exe info,
example for multivalue providers
"""
def unk(v):
return "unk({:04x})".format(v)
class PE2(pefile.PE):
def __init__(self, *a, **ka):
for k in [
# -- parse_data_directories:
"parse_import_directory",
"parse_export_directory",
# "parse_resources_directory",
"parse_debug_directory",
"parse_relocations_directory",
"parse_directory_tls",
"parse_directory_load_config",
"parse_delay_import_directory",
"parse_directory_bound_imports",
# -- full_load:
"parse_rich_header",
]:
setattr(self, k, self.noop)
super(PE2, self).__init__(*a, **ka)
def noop(*a, **ka):
pass
try:
pe = PE2(sys.argv[1], fast_load=False)
except:
sys.exit(0)
arch = pe.FILE_HEADER.Machine
if arch == 0x14C:
arch = "x86"
elif arch == 0x8664:
arch = "x64"
else:
arch = unk(arch)
try:
buildtime = time.gmtime(pe.FILE_HEADER.TimeDateStamp)
buildtime = time.strftime("%Y-%m-%d_%H:%M:%S", buildtime)
except:
buildtime = "invalid"
ui = pe.OPTIONAL_HEADER.Subsystem
if ui == 2:
ui = "GUI"
elif ui == 3:
ui = "cmdline"
else:
ui = unk(ui)
extra = {}
if hasattr(pe, "FileInfo"):
for v1 in pe.FileInfo:
for v2 in v1:
if v2.name != "StringFileInfo":
continue
for v3 in v2.StringTable:
for k, v in v3.entries.items():
v = v.decode("utf-8", "replace").strip()
if not v:
continue
if k in [b"FileVersion", b"ProductVersion"]:
extra["ver"] = v
if k in [b"OriginalFilename", b"InternalName"]:
extra["orig"] = v
r = {
"arch": arch,
"built": buildtime,
"ui": ui,
"cksum": "{:08x}".format(pe.OPTIONAL_HEADER.CheckSum),
}
r.update(extra)
print(json.dumps(r, indent=4))

9
bin/mtag/file-ext.py Normal file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env python
import sys
"""
example that just prints the file extension
"""
print(sys.argv[1].split(".")[-1])

61
bin/mtag/guestbook-read.py Executable file
View file

@ -0,0 +1,61 @@
#!/usr/bin/env python3
"""
fetch latest msg from guestbook and return as tag
example copyparty config to use this:
--urlform save,get -vsrv/hello:hello:w:c,e2ts,mtp=guestbook=t10,ad,p,bin/mtag/guestbook-read.py:mte=+guestbook
explained:
for realpath srv/hello (served at /hello), write-only for eveyrone,
enable file analysis on upload (e2ts),
use mtp plugin "bin/mtag/guestbook-read.py" to provide metadata tag "guestbook",
do this on all uploads regardless of extension,
t10 = 10 seconds timeout for each dwonload,
ad = parse file regardless if FFmpeg thinks it is audio or not
p = request upload info as json on stdin (need ip)
mte=+guestbook enabled indexing of that tag for this volume
PS: this requires e2ts to be functional,
meaning you need to do at least one of these:
* apt install ffmpeg
* pip3 install mutagen
"""
import json
import os
import sqlite3
import sys
# set 0 to allow infinite msgs from one IP,
# other values delete older messages to make space,
# so 1 only keeps latest msg
NUM_MSGS_TO_KEEP = 1
def main():
fp = os.path.abspath(sys.argv[1])
fdir = os.path.dirname(fp)
zb = sys.stdin.buffer.read()
zs = zb.decode("utf-8", "replace")
md = json.loads(zs)
ip = md["up_ip"]
# can put the database inside `fdir` if you'd like,
# by default it saves to PWD:
# os.chdir(fdir)
db = sqlite3.connect("guestbook.db3")
with db:
t = "select msg from gb where ip = ? order by ts desc"
r = db.execute(t, (ip,)).fetchone()
if r:
print(r[0])
if __name__ == "__main__":
main()

111
bin/mtag/guestbook.py Normal file
View file

@ -0,0 +1,111 @@
#!/usr/bin/env python3
"""
store messages from users in an sqlite database
which can be read from another mtp for example
takes input from application/x-www-form-urlencoded POSTs,
for example using the message/pager function on the website
example copyparty config to use this:
--urlform save,get -vsrv/hello:hello:w:c,e2ts,mtp=xgb=ebin,t10,ad,p,bin/mtag/guestbook.py:mte=+xgb
explained:
for realpath srv/hello (served at /hello),write-only for eveyrone,
enable file analysis on upload (e2ts),
use mtp plugin "bin/mtag/guestbook.py" to provide metadata tag "xgb",
do this on all uploads with the file extension "bin",
t300 = 300 seconds timeout for each dwonload,
ad = parse file regardless if FFmpeg thinks it is audio or not
p = request upload info as json on stdin
mte=+xgb enabled indexing of that tag for this volume
PS: this requires e2ts to be functional,
meaning you need to do at least one of these:
* apt install ffmpeg
* pip3 install mutagen
"""
import json
import os
import sqlite3
import sys
from urllib.parse import unquote_to_bytes as unquote
# set 0 to allow infinite msgs from one IP,
# other values delete older messages to make space,
# so 1 only keeps latest msg
NUM_MSGS_TO_KEEP = 1
def main():
fp = os.path.abspath(sys.argv[1])
fdir = os.path.dirname(fp)
fname = os.path.basename(fp)
if not fname.startswith("put-") or not fname.endswith(".bin"):
raise Exception("not a post file")
zb = sys.stdin.buffer.read()
zs = zb.decode("utf-8", "replace")
md = json.loads(zs)
buf = b""
with open(fp, "rb") as f:
while True:
b = f.read(4096)
buf += b
if len(buf) > 4096:
raise Exception("too big")
if not b:
break
if not buf:
raise Exception("file is empty")
buf = unquote(buf.replace(b"+", b" "))
txt = buf.decode("utf-8")
if not txt.startswith("msg="):
raise Exception("does not start with msg=")
ip = md["up_ip"]
ts = md["up_at"]
txt = txt[4:]
# can put the database inside `fdir` if you'd like,
# by default it saves to PWD:
# os.chdir(fdir)
db = sqlite3.connect("guestbook.db3")
try:
db.execute("select 1 from gb").fetchone()
except:
with db:
db.execute("create table gb (ip text, ts real, msg text)")
db.execute("create index gb_ip on gb(ip)")
with db:
if NUM_MSGS_TO_KEEP == 1:
t = "delete from gb where ip = ?"
db.execute(t, (ip,))
t = "insert into gb values (?,?,?)"
db.execute(t, (ip, ts, txt))
if NUM_MSGS_TO_KEEP > 1:
t = "select ts from gb where ip = ? order by ts desc"
hits = db.execute(t, (ip,)).fetchall()
if len(hits) > NUM_MSGS_TO_KEEP:
lim = hits[NUM_MSGS_TO_KEEP][0]
t = "delete from gb where ip = ? and ts <= ?"
db.execute(t, (ip, lim))
print(txt)
if __name__ == "__main__":
main()

95
bin/mtag/image-noexif.py Normal file
View file

@ -0,0 +1,95 @@
#!/usr/bin/env python3
"""
remove exif tags from uploaded images
dependencies:
exiftool
about:
creates a "noexif" subfolder and puts exif-stripped copies of each image there,
the reason for the subfolder is to avoid issues with the up2k.db / deduplication:
if the original image is modified in-place, then copyparty will keep the original
hash in up2k.db for a while (until the next volume rescan), so if the image is
reuploaded after a rescan then the upload will be renamed and kept as a dupe
alternatively you could switch the logic around, making a copy of the original
image into a subfolder named "exif" and modify the original in-place, but then
up2k.db will be out of sync until the next rescan, so any additional uploads
of the same image will get symlinked (deduplicated) to the modified copy
instead of the original in "exif"
or maybe delete the original image after processing, that would kinda work too
example copyparty config to use this:
-v/mnt/nas/pics:pics:rwmd,ed:c,e2ts,mte=+noexif:c,mtp=noexif=ejpg,ejpeg,ad,bin/mtag/image-noexif.py
explained:
for realpath /mnt/nas/pics (served at /pics) with read-write-modify-delete for ed,
enable file analysis on upload (e2ts),
append "noexif" to the list of known tags (mtp),
and use mtp plugin "bin/mtag/image-noexif.py" to provide that tag,
do this on all uploads with the file extension "jpg" or "jpeg",
ad = parse file regardless if FFmpeg thinks it is audio or not
PS: this requires e2ts to be functional,
meaning you need to do at least one of these:
* apt install ffmpeg
* pip3 install mutagen
and your python must have sqlite3 support compiled in
"""
import os
import sys
import filecmp
import subprocess as sp
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p.encode("utf-8")
def main():
cwd, fn = os.path.split(sys.argv[1])
if os.path.basename(cwd) == "noexif":
return
os.chdir(cwd)
f1 = fsenc(fn)
f2 = fsenc(os.path.join(b"noexif", fn))
cmd = [
b"exiftool",
b"-exif:all=",
b"-iptc:all=",
b"-xmp:all=",
b"-P",
b"-o",
b"noexif/",
b"--",
f1,
]
sp.check_output(cmd)
if not os.path.exists(f2):
print("failed")
return
if filecmp.cmp(f1, f2, shallow=False):
print("clean")
else:
print("exif")
# lastmod = os.path.getmtime(f1)
# times = (int(time.time()), int(lastmod))
# os.utime(f2, times)
if __name__ == "__main__":
try:
main()
except:
pass

313
bin/mtag/install-deps.sh Executable file
View file

@ -0,0 +1,313 @@
#!/bin/bash
set -e
# install dependencies for audio-*.py
#
# linux/alpine: requires gcc g++ make cmake patchelf {python3,ffmpeg,fftw,libsndfile}-dev py3-{wheel,pip} py3-numpy{,-dev}
# linux/debian: requires libav{codec,device,filter,format,resample,util}-dev {libfftw3,python3,libsndfile1}-dev python3-{numpy,pip} vamp-{plugin-sdk,examples} patchelf cmake
# linux/fedora: requires gcc gcc-c++ make cmake patchelf {python3,ffmpeg,fftw,libsndfile}-devel python3-numpy vamp-plugin-sdk qm-vamp-plugins
# linux/arch: requires gcc make cmake patchelf python3 ffmpeg fftw libsndfile python-{numpy,wheel,pip,setuptools}
# win64: requires msys2-mingw64 environment
# macos: requires macports
#
# has the following manual dependencies, especially on mac:
# https://www.vamp-plugins.org/pack.html
#
# installs stuff to the following locations:
# ~/pe/
# whatever your python uses for --user packages
#
# does the following terrible things:
# modifies the keyfinder python lib to load the .so in ~/pe
export FORCE_COLOR=1
linux=1
win=
[ ! -z "$MSYSTEM" ] || [ -e /msys2.exe ] && {
[ "$MSYSTEM" = MINGW64 ] || {
echo windows detected, msys2-mingw64 required
exit 1
}
pacman -S --needed mingw-w64-x86_64-{ffmpeg,python,python-pip,vamp-plugin-sdk}
win=1
linux=
}
mac=
[ $(uname -s) = Darwin ] && {
#pybin="$(printf '%s\n' /opt/local/bin/python* | (sed -E 's/(.*\/[^/0-9]+)([0-9]?[^/]*)$/\2 \1/' || cat) | (sort -nr || cat) | (sed -E 's/([^ ]*) (.*)/\2\1/' || cat) | grep -E '/(python|pypy)[0-9\.-]*$' | head -n 1)"
pybin=/opt/local/bin/python3.9
[ -e "$pybin" ] || {
echo mac detected, python3 from macports required
exit 1
}
pkgs='ffmpeg python39 py39-wheel'
ninst=$(port installed | awk '/^ /{print$1}' | sort | uniq | grep -E '^('"$(echo "$pkgs" | tr ' ' '|')"')$' | wc -l)
[ $ninst -eq 3 ] || {
sudo port install $pkgs
}
mac=1
linux=
}
hash -r
[ $mac ] || {
command -v python3 && pybin=python3 || pybin=python
}
$pybin -c 'import numpy' ||
$pybin -m pip install --user numpy
command -v gnutar && tar() { gnutar "$@"; }
command -v gtar && tar() { gtar "$@"; }
command -v gsed && sed() { gsed "$@"; }
need() {
command -v $1 >/dev/null || {
echo need $1
exit 1
}
}
need cmake
need ffmpeg
need $pybin
#need patchelf
td="$(mktemp -d)"
cln() {
rm -rf "$td"
}
trap cln EXIT
cd "$td"
pwd
dl_text() {
command -v curl >/dev/null && exec curl "$@"
exec wget -O- "$@"
}
dl_files() {
local yolo= ex=
[ $1 = "yolo" ] && yolo=1 && ex=k && shift
command -v curl >/dev/null && exec curl -${ex}JOL "$@"
[ $yolo ] && ex=--no-check-certificate
exec wget --trust-server-names $ex "$@"
}
export -f dl_files
github_tarball() {
rm -rf g
mkdir g
cd g
dl_text "$1" |
tee ../json |
(
# prefer jq if available
jq -r '.tarball_url' ||
# fallback to awk (sorry)
awk -F\" '/"tarball_url": "/ {print$4}'
) |
tee /dev/stderr |
head -n 1 |
tr -d '\r' | tr '\n' '\0' |
xargs -0 bash -c 'dl_files "$@"' _
mv * ../tgz
cd ..
}
gitlab_tarball() {
dl_text "$1" |
tee json |
(
# prefer jq if available
jq -r '.[0].assets.sources[]|select(.format|test("tar.gz")).url' ||
# fallback to abomination
tr \" '\n' | grep -E '\.tar\.gz$' | head -n 1
) |
tee /dev/stderr |
head -n 1 |
tr -d '\r' | tr '\n' '\0' |
tee links |
xargs -0 bash -c 'dl_files "$@"' _
}
install_keyfinder() {
# windows support:
# use msys2 in mingw-w64 mode
# pacman -S --needed mingw-w64-x86_64-{ffmpeg,python}
[ -e $HOME/pe/keyfinder ] && {
echo found a keyfinder build in ~/pe, skipping
return
}
cd "$td"
github_tarball https://api.github.com/repos/mixxxdj/libkeyfinder/releases/latest
ls -al
tar -xf tgz
rm tgz
cd mixxxdj-libkeyfinder*
h="$HOME"
so="lib/libkeyfinder.so"
memes=(-DBUILD_TESTING=OFF)
[ $win ] &&
so="bin/libkeyfinder.dll" &&
h="$(printf '%s\n' "$USERPROFILE" | tr '\\' '/')" &&
memes+=(-G "MinGW Makefiles")
[ $mac ] &&
so="lib/libkeyfinder.dylib"
cmake -DCMAKE_INSTALL_PREFIX="$h/pe/keyfinder" "${memes[@]}" -S . -B build
cmake --build build --parallel $(nproc || echo 4)
cmake --install build
libpath="$h/pe/keyfinder/$so"
[ $linux ] && [ ! -e "$libpath" ] &&
so=lib64/libkeyfinder.so
libpath="$h/pe/keyfinder/$so"
[ -e "$libpath" ] || {
echo "so not found at $sop"
exit 1
}
x=${-//[^x]/}; set -x; cat /etc/alpine-release
# rm -rf /Users/ed/Library/Python/3.9/lib/python/site-packages/*keyfinder*
CFLAGS="-I$h/pe/keyfinder/include -I/opt/local/include -I/usr/include/ffmpeg" \
CXXFLAGS="-I$h/pe/keyfinder/include -I/opt/local/include -I/usr/include/ffmpeg" \
LDFLAGS="-L$h/pe/keyfinder/lib -L$h/pe/keyfinder/lib64 -L/opt/local/lib" \
PKG_CONFIG_PATH="/c/msys64/mingw64/lib/pkgconfig:$h/pe/keyfinder/lib/pkgconfig" \
$pybin -m pip install --user keyfinder
[ "$x" ] || set +x
pypath="$($pybin -c 'import keyfinder; print(keyfinder.__file__)')"
for pyso in "${pypath%/*}"/*.so; do
[ -e "$pyso" ] || break
patchelf --set-rpath "${libpath%/*}" "$pyso" ||
echo "WARNING: patchelf failed (only fatal on musl-based distros)"
done
mv "$pypath"{,.bak}
(
printf 'import ctypes\nctypes.cdll.LoadLibrary("%s")\n' "$libpath"
cat "$pypath.bak"
) >"$pypath"
echo
echo libkeyfinder successfully installed to the following locations:
echo " $libpath"
echo " $pypath"
}
have_beatroot() {
$pybin -c 'import vampyhost, sys; plugs = vampyhost.list_plugins(); sys.exit(0 if "beatroot-vamp:beatroot" in plugs else 1)'
}
install_vamp() {
# windows support:
# use msys2 in mingw-w64 mode
# pacman -S --needed mingw-w64-x86_64-{ffmpeg,python,python-pip,vamp-plugin-sdk}
$pybin -m pip install --user vamp || {
printf '\n\033[7malright, trying something else...\033[0m\n'
$pybin -m pip install --user --no-build-isolation vamp
}
cd "$td"
echo '#include <vamp-sdk/Plugin.h>' | g++ -x c++ -c -o /dev/null - || [ -e ~/pe/vamp-sdk ] || {
printf '\033[33mcould not find the vamp-sdk, building from source\033[0m\n'
(dl_files yolo https://ocv.me/mirror/vamp-plugin-sdk-2.10.0.tar.gz)
sha512sum -c <(
echo "153b7f2fa01b77c65ad393ca0689742d66421017fd5931d216caa0fcf6909355fff74706fabbc062a3a04588a619c9b515a1dae00f21a57afd97902a355c48ed -"
) <vamp-plugin-sdk-2.10.0.tar.gz
tar -xf vamp-plugin-sdk-2.10.0.tar.gz
rm -- *.tar.gz
ls -al
cd vamp-plugin-sdk-*
printf '%s\n' "int main(int argc, char **argv) { return 0; }" > host/vamp-simple-host.cpp
./configure --disable-programs --prefix=$HOME/pe/vamp-sdk
make -j1 install
}
cd "$td"
have_beatroot || {
printf '\033[33mcould not find the vamp beatroot plugin, building from source\033[0m\n'
(dl_files yolo https://ocv.me/mirror/beatroot-vamp-v1.0.tar.gz)
sha512sum -c <(
echo "1f444d1d58ccf565c0adfe99f1a1aa62789e19f5071e46857e2adfbc9d453037bc1c4dcb039b02c16240e9b97f444aaff3afb625c86aa2470233e711f55b6874 -"
) <beatroot-vamp-v1.0.tar.gz
tar -xf beatroot-vamp-v1.0.tar.gz
rm -- *.tar.gz
cd beatroot-vamp-v1.0
[ -e ~/pe/vamp-sdk ] &&
sed -ri 's`^(CFLAGS :=.*)`\1 -I'$HOME'/pe/vamp-sdk/include`' Makefile.linux ||
sed -ri 's`^(CFLAGS :=.*)`\1 -I/usr/include/vamp-sdk`' Makefile.linux
make -f Makefile.linux -j4 LDFLAGS="-L$HOME/pe/vamp-sdk/lib -L/usr/lib64"
# /home/ed/vamp /home/ed/.vamp /usr/local/lib/vamp
mkdir ~/vamp
cp -pv beatroot-vamp.* ~/vamp/
}
have_beatroot &&
printf '\033[32mfound the vamp beatroot plugin, nice\033[0m\n' ||
printf '\033[31mWARNING: could not find the vamp beatroot plugin, please install it for optimal results\033[0m\n'
}
# not in use because it kinda segfaults, also no windows support
install_soundtouch() {
cd "$td"
gitlab_tarball https://gitlab.com/api/v4/projects/soundtouch%2Fsoundtouch/releases
tar -xvf soundtouch-*
rm -- *.tar.gz
cd soundtouch-*
# https://github.com/jrising/pysoundtouch
./bootstrap
./configure --enable-integer-samples CXXFLAGS="-fPIC" --prefix="$HOME/pe/soundtouch"
make -j$(nproc || echo 4)
make install
CFLAGS=-I$HOME/pe/soundtouch/include/ \
LDFLAGS=-L$HOME/pe/soundtouch/lib \
$pybin -m pip install --user git+https://github.com/snowxmas/pysoundtouch.git
pypath="$($pybin -c 'import importlib; print(importlib.util.find_spec("soundtouch").origin)')"
libpath="$(echo "$HOME/pe/soundtouch/lib/")"
patchelf --set-rpath "$libpath" "$pypath"
echo
echo soundtouch successfully installed to the following locations:
echo " $libpath"
echo " $pypath"
}
[ "$1" = keyfinder ] && { install_keyfinder; exit $?; }
[ "$1" = soundtouch ] && { install_soundtouch; exit $?; }
[ "$1" = vamp ] && { install_vamp; exit $?; }
echo no args provided, installing keyfinder and vamp
install_keyfinder
install_vamp

73
bin/mtag/media-hash.py Normal file
View file

@ -0,0 +1,73 @@
#!/usr/bin/env python
import re
import sys
import json
import time
import base64
import hashlib
import subprocess as sp
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p.encode("utf-8")
"""
dep: ffmpeg
"""
def det():
# fmt: off
cmd = [
b"ffmpeg",
b"-nostdin",
b"-hide_banner",
b"-v", b"fatal",
b"-i", fsenc(sys.argv[1]),
b"-f", b"framemd5",
b"-"
]
# fmt: on
p = sp.Popen(cmd, stdout=sp.PIPE)
# ps = io.TextIOWrapper(p.stdout, encoding="utf-8")
ps = p.stdout
chans = {}
for ln in ps:
if ln.startswith(b"#stream#"):
break
m = re.match(r"^#media_type ([0-9]): ([a-zA-Z])", ln.decode("utf-8"))
if m:
chans[m.group(1)] = m.group(2)
hashers = [hashlib.sha512(), hashlib.sha512()]
for ln in ps:
n = int(ln[:1])
v = ln.rsplit(b",", 1)[-1].strip()
hashers[n].update(v)
r = {}
for k, v in chans.items():
dg = hashers[int(k)].digest()[:12]
dg = base64.urlsafe_b64encode(dg).decode("ascii")
r[v[0].lower() + "hash"] = dg
print(json.dumps(r, indent=4))
def main():
try:
det()
except:
pass # mute
if __name__ == "__main__":
main()

38
bin/mtag/mousepad.py Normal file
View file

@ -0,0 +1,38 @@
#!/usr/bin/env python3
import os
import sys
import subprocess as sp
"""
mtp test -- opens a texteditor
usage:
-vsrv/v1:v1:r:c,mte=+x1:c,mtp=x1=ad,p,bin/mtag/mousepad.py
explained:
c,mte: list of tags to index in this volume
c,mtp: add new tag provider
x1: dummy tag to provide
ad: dontcare if audio or not
p: priority 1 (run after initial tag-scan with ffprobe or mutagen)
"""
def main():
env = os.environ.copy()
env["DISPLAY"] = ":0.0"
if False:
# open the uploaded file
fp = sys.argv[-1]
else:
# display stdin contents (`oth_tags`)
fp = "/dev/stdin"
p = sp.Popen(["/usr/bin/mousepad", fp])
p.communicate()
main()

76
bin/mtag/rclone-upload.py Normal file
View file

@ -0,0 +1,76 @@
#!/usr/bin/env python
import json
import os
import subprocess as sp
import sys
import time
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p.encode("utf-8")
_ = r"""
first checks the tag "vidchk" which must be "ok" to continue,
then uploads all files to some cloud storage (RCLONE_REMOTE)
and DELETES THE ORIGINAL FILES if rclone returns 0 ("success")
deps:
rclone
usage:
-mtp x2=t43200,ay,p2,bin/mtag/rclone-upload.py
explained:
t43200: timeout 12h
ay: only process files which contain audio (including video with audio)
p2: set priority 2 (after vidchk's suggested priority of 1),
so the output of vidchk will be passed in here
complete usage example as vflags along with vidchk:
-vsrv/vidchk:vidchk:r:rw,ed:c,e2dsa,e2ts,mtp=vidchk=t600,p,bin/mtag/vidchk.py:c,mtp=rupload=t43200,ay,p2,bin/mtag/rclone-upload.py:c,mte=+vidchk,rupload
setup: see https://rclone.org/drive/
if you wanna use this script standalone / separately from copyparty,
either set CONDITIONAL_UPLOAD False or provide the following stdin:
{"vidchk":"ok"}
"""
RCLONE_REMOTE = "notmybox"
CONDITIONAL_UPLOAD = True
def main():
fp = sys.argv[1]
if CONDITIONAL_UPLOAD:
zb = sys.stdin.buffer.read()
zs = zb.decode("utf-8", "replace")
md = json.loads(zs)
chk = md.get("vidchk", None)
if chk != "ok":
print(f"vidchk={chk}", file=sys.stderr)
sys.exit(1)
dst = f"{RCLONE_REMOTE}:".encode("utf-8")
cmd = [b"rclone", b"copy", b"--", fsenc(fp), dst]
t0 = time.time()
try:
sp.check_call(cmd)
except:
print("rclone failed", file=sys.stderr)
sys.exit(1)
print(f"{time.time() - t0:.1f} sec")
os.unlink(fsenc(fp))
if __name__ == "__main__":
main()

View file

@ -0,0 +1,21 @@
// ==UserScript==
// @name twitter-unmute
// @namespace http://ocv.me/
// @version 0.1
// @description memes
// @author ed <irc.rizon.net>
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?domain=twitter.com
// @grant GM_addStyle
// ==/UserScript==
function grunnur() {
setInterval(function () {
//document.querySelector('div[aria-label="Unmute"]').click();
document.querySelector('video').muted = false;
}, 200);
}
var scr = document.createElement('script');
scr.textContent = '(' + grunnur.toString() + ')();';
(document.head || document.getElementsByTagName('head')[0]).appendChild(scr);

39
bin/mtag/res/yt-ipr.conf Normal file
View file

@ -0,0 +1,39 @@
# example config file to use copyparty as a youtube manifest collector,
# use with copyparty like: python copyparty.py -c yt-ipr.conf
#
# see docs/example.conf for a better explanation of the syntax, but
# newlines are block separators, so adding blank lines inside a volume definition is bad
# (use comments as separators instead)
# create user ed, password wark
u ed:wark
# create a volume at /ytm which stores files at ./srv/ytm
./srv/ytm
/ytm
# write-only, but read-write for user ed
w
rw ed
# rescan the volume on startup
c e2dsa
# collect tags from all new files since last scan
c e2ts
# optionally enable compression to make the files 50% smaller
c pk
# only allow uploads which are between 16k and 1m large
c sz=16k-1m
# allow up to 10 uploads over 5 minutes from each ip
c maxn=10,300
# move uploads into subfolders: YEAR-MONTH / DAY-HOUR / <upload>
c rotf=%Y-%m/%d-%H
# delete uploads when they are 24 hours old
c lifetime=86400
# add the parser and tell copyparty what tags it can expect from it
c mtp=yt-id,yt-title,yt-author,yt-channel,yt-views,yt-private,yt-manifest,yt-expires=bin/mtag/yt-ipr.py
# decide which tags we want to index and in what order
c mte=yt-id,yt-title,yt-author,yt-channel,yt-views,yt-private,yt-manifest,yt-expires
# create any other volumes you'd like down here, or merge this with an existing config file

View file

@ -0,0 +1,47 @@
// ==UserScript==
// @name youtube-playerdata-hub
// @match https://youtube.com/*
// @match https://*.youtube.com/*
// @version 1.0
// @grant GM_addStyle
// ==/UserScript==
function main() {
var server = 'https://127.0.0.1:3923/ytm?pw=wark',
interval = 60; // sec
var sent = {};
function send(txt, mf_url, desc) {
if (sent[mf_url])
return;
fetch(server + '&_=' + Date.now(), { method: "PUT", body: txt });
console.log('[yt-pdh] yeet %d bytes, %s', txt.length, desc);
sent[mf_url] = 1;
}
function collect() {
try {
var pd = document.querySelector('ytd-watch-flexy');
if (!pd)
return console.log('[yt-pdh] no video found');
pd = pd.playerData;
var mu = pd.streamingData.dashManifestUrl || pd.streamingData.hlsManifestUrl;
if (!mu || !mu.length)
return console.log('[yt-pdh] no manifest found');
var desc = pd.videoDetails.videoId + ', ' + pd.videoDetails.title;
send(JSON.stringify(pd), mu, desc);
}
catch (ex) {
console.log("[yt-pdh]", ex);
}
}
setInterval(collect, interval * 1000);
}
var scr = document.createElement('script');
scr.textContent = '(' + main.toString() + ')();';
(document.head || document.getElementsByTagName('head')[0]).appendChild(scr);
console.log('[yt-pdh] a');

8
bin/mtag/sleep.py Normal file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env python
import time
import random
v = random.random() * 6
time.sleep(v)
print(f"{v:.2f}")

210
bin/mtag/very-bad-idea.py Executable file
View file

@ -0,0 +1,210 @@
#!/usr/bin/env python3
"""
WARNING -- DANGEROUS PLUGIN --
if someone is able to upload files to a copyparty which is
running this plugin, they can execute malware on your machine
so please keep this on a LAN and protect it with a password
here is a MUCH BETTER ALTERNATIVE (which also works on Windows):
https://github.com/steinuil/kameloso
----------------------------------------------------------------------
use copyparty as a chromecast replacement:
* post a URL and it will open in the default browser
* upload a file and it will open in the default application
* the `key` command simulates keyboard input
* the `x` command executes other xdotool commands
* the `c` command executes arbitrary unix commands
the android app makes it a breeze to post pics and links:
https://github.com/9001/party-up/releases
iOS devices can use the web-UI or the shortcut instead:
https://github.com/9001/copyparty#ios-shortcuts
example copyparty config to use this;
lets the user "kevin" with password "hunter2" use this plugin:
-a kevin:hunter2 --urlform save,get -v.::w,kevin:c,e2d,e2t,mte=+a1:c,mtp=a1=ad,kn,c0,bin/mtag/very-bad-idea.py
recommended deps:
apt install xdotool libnotify-bin mpv
python3 -m pip install --user -U streamlink yt-dlp
https://github.com/9001/copyparty/blob/hovudstraum/contrib/plugins/meadup.js
and you probably want `twitter-unmute.user.js` from the res folder
-----------------------------------------------------------------------
-- startup script:
-----------------------------------------------------------------------
#!/bin/bash
set -e
# create qr code
ip=$(ip r | awk '/^default/{print$(NF-2)}'); echo http://$ip:3923/ | qrencode -o - -s 4 >/dev/shm/cpp-qr.png
/usr/bin/feh -x /dev/shm/cpp-qr.png &
# reposition and make topmost (with janky raspbian support)
( sleep 0.5
xdotool search --name cpp-qr.png windowactivate --sync windowmove 1780 0
wmctrl -r :ACTIVE: -b toggle,above || true
ps aux | grep -E 'sleep[ ]7\.27' ||
while true; do
w=$(xdotool getactivewindow)
xdotool search --name cpp-qr.png windowactivate windowraise windowfocus
xdotool windowactivate $w
xdotool windowfocus $w
sleep 7.27 || break
done &
xeyes # distraction window to prevent ^w from closing the qr-code
) &
# bail if copyparty is already running
ps aux | grep -E '[3] copy[p]arty' && exit 0
# dumb chrome wrapper to allow autoplay
cat >/usr/local/bin/chromium-browser <<'EOF'
#!/bin/bash
set -e
/usr/bin/chromium-browser --autoplay-policy=no-user-gesture-required "$@"
EOF
chmod 755 /usr/local/bin/chromium-browser
# start the server
# note 1: replace hunter2 with a better password to access the server
# note 2: replace `-v.::rw` with `-v.::w` to disallow retrieving uploaded stuff
cd ~/Downloads; python3 copyparty-sfx.py -a kevin:hunter2 --urlform save,get -v.::rw,kevin:c,e2d,e2t,mte=+a1:c,mtp=a1=ad,kn,very-bad-idea.py
"""
import os
import sys
import time
import shutil
import subprocess as sp
from urllib.parse import unquote_to_bytes as unquote
from urllib.parse import quote
have_mpv = shutil.which("mpv")
have_vlc = shutil.which("vlc")
def main():
if len(sys.argv) > 2 and sys.argv[1] == "x":
# invoked on commandline for testing;
# python3 very-bad-idea.py x msg=https://youtu.be/dQw4w9WgXcQ
txt = " ".join(sys.argv[2:])
txt = quote(txt.replace(" ", "+"))
return open_post(txt.encode("utf-8"))
fp = os.path.abspath(sys.argv[1])
with open(fp, "rb") as f:
txt = f.read(4096)
if txt.startswith(b"msg="):
open_post(txt)
else:
open_url(fp)
def open_post(txt):
txt = unquote(txt.replace(b"+", b" ")).decode("utf-8")[4:]
try:
k, v = txt.split(" ", 1)
except:
return open_url(txt)
if k == "key":
sp.call(["xdotool", "key"] + v.split(" "))
elif k == "x":
sp.call(["xdotool"] + v.split(" "))
elif k == "c":
env = os.environ.copy()
while " " in v:
v1, v2 = v.split(" ", 1)
if "=" not in v1:
break
ek, ev = v1.split("=", 1)
env[ek] = ev
v = v2
sp.call(v.split(" "), env=env)
else:
open_url(txt)
def open_url(txt):
ext = txt.rsplit(".")[-1].lower()
sp.call(["notify-send", "--", txt])
if ext not in ["jpg", "jpeg", "png", "gif", "webp"]:
# sp.call(["wmctrl", "-c", ":ACTIVE:"]) # closes the active window correctly
sp.call(["killall", "vlc"])
sp.call(["killall", "mpv"])
sp.call(["killall", "feh"])
time.sleep(0.5)
for _ in range(20):
sp.call(["xdotool", "key", "ctrl+w"]) # closes the open tab correctly
# else:
# sp.call(["xdotool", "getactivewindow", "windowminimize"]) # minimizes the focused windo
# mpv is probably smart enough to use streamlink automatically
if try_mpv(txt):
print("mpv got it")
return
# or maybe streamlink would be a good choice to open this
if try_streamlink(txt):
print("streamlink got it")
return
# nope,
# close any error messages:
sp.call(["xdotool", "search", "--name", "Error", "windowclose"])
# sp.call(["xdotool", "key", "ctrl+alt+d"]) # doesnt work at all
# sp.call(["xdotool", "keydown", "--delay", "100", "ctrl+alt+d"])
# sp.call(["xdotool", "keyup", "ctrl+alt+d"])
sp.call(["xdg-open", txt])
def try_mpv(url):
t0 = time.time()
try:
print("trying mpv...")
sp.check_call(["mpv", "--fs", url])
return True
except:
# if it ran for 15 sec it probably succeeded and terminated
t = time.time()
return t - t0 > 15
def try_streamlink(url):
t0 = time.time()
try:
import streamlink
print("trying streamlink...")
streamlink.Streamlink().resolve_url(url)
if have_mpv:
args = "-m streamlink -p mpv -a --fs"
else:
args = "-m streamlink"
cmd = [sys.executable] + args.split() + [url, "best"]
t0 = time.time()
sp.check_call(cmd)
return True
except:
# if it ran for 10 sec it probably succeeded and terminated
t = time.time()
return t - t0 > 10
main()

131
bin/mtag/vidchk.py Executable file
View file

@ -0,0 +1,131 @@
#!/usr/bin/env python3
import json
import re
import os
import sys
import subprocess as sp
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p.encode("utf-8")
_ = r"""
inspects video files for errors and such
plus stores a bunch of metadata to filename.ff.json
usage:
-mtp vidchk=t600,ay,p,bin/mtag/vidchk.py
explained:
t600: timeout 10min
ay: only process files which contain audio (including video with audio)
p: set priority 1 (lowest priority after initial ffprobe/mutagen for base tags),
makes copyparty feed base tags into this script as json
if you wanna use this script standalone / separately from copyparty,
provide the video resolution on stdin as json: {"res":"1920x1080"}
"""
FAST = True # parse entire file at container level
# FAST = False # fully decode audio and video streams
# warnings to ignore
harmless = re.compile(
r"Unsupported codec with id |Could not find codec parameters.*Attachment:|analyzeduration"
+ r"|timescale not set"
)
def wfilter(lines):
return [x for x in lines if x.strip() and not harmless.search(x)]
def errchk(so, se, rc, dbg):
if dbg:
with open(dbg, "wb") as f:
f.write(b"so:\n" + so + b"\nse:\n" + se + b"\n")
if rc:
err = (so + se).decode("utf-8", "replace").split("\n", 1)
err = wfilter(err) or err
return f"ERROR {rc}: {err[0]}"
if se:
err = se.decode("utf-8", "replace").split("\n", 1)
err = wfilter(err)
if err:
return f"Warning: {err[0]}"
return None
def main():
fp = sys.argv[1]
zb = sys.stdin.buffer.read()
zs = zb.decode("utf-8", "replace")
md = json.loads(zs)
fdir = os.path.dirname(os.path.realpath(fp))
flag = os.path.join(fdir, ".processed")
if os.path.exists(flag):
return "already processed"
try:
w, h = [int(x) for x in md["res"].split("x")]
if not w + h:
raise Exception()
except:
return "could not determine resolution"
# grab streams/format metadata + 2 seconds of frames at the start and end
zs = "ffprobe -hide_banner -v warning -of json -show_streams -show_format -show_packets -show_data_hash crc32 -read_intervals %+2,999999%+2"
cmd = zs.encode("ascii").split(b" ") + [fsenc(fp)]
p = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.PIPE)
so, se = p.communicate()
# spaces to tabs, drops filesize from 69k to 48k
so = b"\n".join(
[
b"\t" * int((len(x) - len(x.lstrip())) / 4) + x.lstrip()
for x in (so or b"").split(b"\n")
]
)
with open(fsenc(f"{fp}.ff.json"), "wb") as f:
f.write(so)
err = errchk(so, se, p.returncode, f"{fp}.vidchk")
if err:
return err
if max(w, h) < 1280 and min(w, h) < 720:
return "resolution too small"
zs = (
"ffmpeg -y -hide_banner -nostdin -v warning"
+ " -err_detect +crccheck+bitstream+buffer+careful+compliant+aggressive+explode"
+ " -xerror -i"
)
cmd = zs.encode("ascii").split(b" ") + [fsenc(fp)]
if FAST:
zs = "-c copy -f null -"
else:
zs = "-vcodec rawvideo -acodec pcm_s16le -f null -"
cmd += zs.encode("ascii").split(b" ")
p = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.PIPE)
so, se = p.communicate()
return errchk(so, se, p.returncode, f"{fp}.vidchk")
if __name__ == "__main__":
print(main() or "ok")

94
bin/mtag/wget.py Normal file
View file

@ -0,0 +1,94 @@
#!/usr/bin/env python3
"""
DEPRECATED -- replaced by event hooks;
https://github.com/9001/copyparty/blob/hovudstraum/bin/hooks/wget.py
---
use copyparty as a file downloader by POSTing URLs as
application/x-www-form-urlencoded (for example using the
message/pager function on the website)
example copyparty config to use this:
--urlform save,get -vsrv/wget:wget:rwmd,ed:c,e2ts,mtp=title=ebin,t300,ad,bin/mtag/wget.py
explained:
for realpath srv/wget (served at /wget) with read-write-modify-delete for ed,
enable file analysis on upload (e2ts),
use mtp plugin "bin/mtag/wget.py" to provide metadata tag "title",
do this on all uploads with the file extension "bin",
t300 = 300 seconds timeout for each dwonload,
ad = parse file regardless if FFmpeg thinks it is audio or not
PS: this requires e2ts to be functional,
meaning you need to do at least one of these:
* apt install ffmpeg
* pip3 install mutagen
"""
import os
import sys
import subprocess as sp
from urllib.parse import unquote_to_bytes as unquote
def main():
fp = os.path.abspath(sys.argv[1])
fdir = os.path.dirname(fp)
fname = os.path.basename(fp)
if not fname.startswith("put-") or not fname.endswith(".bin"):
raise Exception("not a post file")
buf = b""
with open(fp, "rb") as f:
while True:
b = f.read(4096)
buf += b
if len(buf) > 4096:
raise Exception("too big")
if not b:
break
if not buf:
raise Exception("file is empty")
buf = unquote(buf.replace(b"+", b" "))
url = buf.decode("utf-8")
if not url.startswith("msg="):
raise Exception("does not start with msg=")
url = url[4:]
if "://" not in url:
url = "https://" + url
proto = url.split("://")[0].lower()
if proto not in ("http", "https", "ftp", "ftps"):
raise Exception("bad proto {}".format(proto))
os.chdir(fdir)
name = url.split("?")[0].split("/")[-1]
tfn = "-- DOWNLOADING " + name
open(tfn, "wb").close()
cmd = ["wget", "--trust-server-names", "--", url]
try:
sp.check_call(cmd)
# OPTIONAL:
# on success, delete the .bin file which contains the URL
os.unlink(fp)
except:
open("-- FAILED TO DONWLOAD " + name, "wb").close()
os.unlink(tfn)
print(url)
if __name__ == "__main__":
main()

198
bin/mtag/yt-ipr.py Normal file
View file

@ -0,0 +1,198 @@
#!/usr/bin/env python
import re
import os
import sys
import gzip
import json
import base64
import string
import urllib.request
from datetime import datetime
"""
youtube initial player response
it's probably best to use this through a config file; see res/yt-ipr.conf
but if you want to use plain arguments instead then:
-v srv/ytm:ytm:w:rw,ed
:c,e2ts,e2dsa
:c,sz=16k-1m:c,maxn=10,300:c,rotf=%Y-%m/%d-%H
:c,mtp=yt-id,yt-title,yt-author,yt-channel,yt-views,yt-private,yt-manifest,yt-expires=bin/mtag/yt-ipr.py
:c,mte=yt-id,yt-title,yt-author,yt-channel,yt-views,yt-private,yt-manifest,yt-expires
see res/yt-ipr.user.js for the example userscript to go with this
"""
def main():
try:
with gzip.open(sys.argv[1], "rt", encoding="utf-8", errors="replace") as f:
txt = f.read()
except:
with open(sys.argv[1], "r", encoding="utf-8", errors="replace") as f:
txt = f.read()
txt = "{" + txt.split("{", 1)[1]
try:
pd = json.loads(txt)
except json.decoder.JSONDecodeError as ex:
pd = json.loads(txt[: ex.pos])
# print(json.dumps(pd, indent=2))
if "videoDetails" in pd:
parse_youtube(pd)
else:
parse_freg(pd)
def get_expiration(url):
et = re.search(r"[?&]expire=([0-9]+)", url).group(1)
et = datetime.utcfromtimestamp(int(et))
return et.strftime("%Y-%m-%d, %H:%M")
def parse_youtube(pd):
vd = pd["videoDetails"]
sd = pd["streamingData"]
et = sd["adaptiveFormats"][0]["url"]
et = get_expiration(et)
mf = []
if "dashManifestUrl" in sd:
mf.append("dash")
if "hlsManifestUrl" in sd:
mf.append("hls")
r = {
"yt-id": vd["videoId"],
"yt-title": vd["title"],
"yt-author": vd["author"],
"yt-channel": vd["channelId"],
"yt-views": vd["viewCount"],
"yt-private": vd["isPrivate"],
# "yt-expires": sd["expiresInSeconds"],
"yt-manifest": ",".join(mf),
"yt-expires": et,
}
print(json.dumps(r))
freg_conv(pd)
def parse_freg(pd):
md = pd["metadata"]
r = {
"yt-id": md["id"],
"yt-title": md["title"],
"yt-author": md["channelName"],
"yt-channel": md["channelURL"].strip("/").split("/")[-1],
"yt-expires": get_expiration(list(pd["video"].values())[0]),
}
print(json.dumps(r))
def freg_conv(pd):
# based on getURLs.js v1.5 (2021-08-07)
# fmt: off
priority = {
"video": [
337, 315, 266, 138, # 2160p60
313, 336, # 2160p
308, # 1440p60
271, 264, # 1440p
335, 303, 299, # 1080p60
248, 169, 137, # 1080p
334, 302, 298, # 720p60
247, 136 # 720p
],
"audio": [
251, 141, 171, 140, 250, 249, 139
]
}
vid_id = pd["videoDetails"]["videoId"]
chan_id = pd["videoDetails"]["channelId"]
try:
thumb_url = pd["microformat"]["playerMicroformatRenderer"]["thumbnail"]["thumbnails"][0]["url"]
start_ts = pd["microformat"]["playerMicroformatRenderer"]["liveBroadcastDetails"]["startTimestamp"]
except:
thumb_url = f"https://img.youtube.com/vi/{vid_id}/maxresdefault.jpg"
start_ts = ""
# fmt: on
metadata = {
"title": pd["videoDetails"]["title"],
"id": vid_id,
"channelName": pd["videoDetails"]["author"],
"channelURL": "https://www.youtube.com/channel/" + chan_id,
"description": pd["videoDetails"]["shortDescription"],
"thumbnailUrl": thumb_url,
"startTimestamp": start_ts,
}
if [x for x in vid_id if x not in string.ascii_letters + string.digits + "_-"]:
print(f"malicious json", file=sys.stderr)
return
basepath = os.path.dirname(sys.argv[1])
thumb_fn = f"{basepath}/{vid_id}.jpg"
tmp_fn = f"{thumb_fn}.{os.getpid()}"
if not os.path.exists(thumb_fn) and (
thumb_url.startswith("https://img.youtube.com/vi/")
or thumb_url.startswith("https://i.ytimg.com/vi/")
):
try:
with urllib.request.urlopen(thumb_url) as fi:
with open(tmp_fn, "wb") as fo:
fo.write(fi.read())
os.rename(tmp_fn, thumb_fn)
except:
if os.path.exists(tmp_fn):
os.unlink(tmp_fn)
try:
with open(thumb_fn, "rb") as f:
thumb = base64.b64encode(f.read()).decode("ascii")
except:
thumb = "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k="
metadata["thumbnail"] = "data:image/jpeg;base64," + thumb
ret = {
"metadata": metadata,
"version": "1.5",
"createTime": datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ"),
}
for stream, itags in priority.items():
for itag in itags:
url = None
for afmt in pd["streamingData"]["adaptiveFormats"]:
if itag == afmt["itag"]:
url = afmt["url"]
break
if url:
ret[stream] = {itag: url}
break
fn = f"{basepath}/{vid_id}.urls.json"
with open(fn, "w", encoding="utf-8", errors="replace") as f:
f.write(json.dumps(ret, indent=4))
if __name__ == "__main__":
try:
main()
except:
# raise
pass

View file

@ -1,9 +1,9 @@
#!/usr/bin/env python3
from __future__ import print_function, unicode_literals
"""copyparty-fuse: remote copyparty as a local filesystem"""
"""partyfuse-streaming: remote copyparty as a local filesystem"""
__author__ = "ed <copyparty@ocv.me>"
__copyright__ = 2019
__copyright__ = 2020
__license__ = "MIT"
__url__ = "https://github.com/9001/copyparty/"
@ -12,7 +12,7 @@ __url__ = "https://github.com/9001/copyparty/"
mount a copyparty server (local or remote) as a filesystem
usage:
python copyparty-fuse.py ./music http://192.168.1.69:3923/
python partyfuse-streaming.py http://192.168.1.69:3923/ ./music
dependencies:
python3 -m pip install --user fusepy
@ -20,8 +20,10 @@ dependencies:
+ on Macos: https://osxfuse.github.io/
+ on Windows: https://github.com/billziss-gh/winfsp/releases/latest
get server cert:
awk '/-BEGIN CERTIFICATE-/ {a=1} a; /-END CERTIFICATE-/{exit}' <(openssl s_client -connect 127.0.0.1:3923 </dev/null 2>/dev/null) >cert.pem
this was a mistake:
fork of partyfuse.py with a streaming cache rather than readahead,
thought this was gonna be way faster (and it kind of is)
except the overhead of reopening connections on trunc totally kills it
"""
@ -40,6 +42,7 @@ import threading
import traceback
import http.client # py2: httplib
import urllib.parse
import calendar
from datetime import datetime
from urllib.parse import quote_from_bytes as quote
from urllib.parse import unquote_to_bytes as unquote
@ -59,12 +62,12 @@ except:
else:
libfuse = "apt install libfuse\n modprobe fuse"
print(
"\n could not import fuse; these may help:"
+ "\n python3 -m pip install --user fusepy\n "
+ libfuse
+ "\n"
)
m = """\033[33m
could not import fuse; these may help:
{} -m pip install --user fusepy
{}
\033[0m"""
print(m.format(sys.executable, libfuse))
raise
@ -100,7 +103,7 @@ def rice_tid():
def fancy_log(msg):
print("{} {}\n".format(rice_tid(), msg), end="")
print("{:6.3f} {} {}\n".format(time.time() % 60, rice_tid(), msg), end="")
def null_log(msg):
@ -151,7 +154,7 @@ def dewin(txt):
class RecentLog(object):
def __init__(self):
self.mtx = threading.Lock()
self.f = None # open("copyparty-fuse.log", "wb")
self.f = None # open("partyfuse.log", "wb")
self.q = []
thr = threading.Thread(target=self.printer)
@ -159,7 +162,7 @@ class RecentLog(object):
thr.start()
def put(self, msg):
msg = "{} {}\n".format(rice_tid(), msg)
msg = "{:6.3f} {} {}\n".format(time.time() % 60, rice_tid(), msg)
if self.f:
fmsg = " ".join([datetime.utcnow().strftime("%H%M%S.%f"), str(msg)])
self.f.write(fmsg.encode("utf-8"))
@ -182,9 +185,9 @@ class RecentLog(object):
print("".join(q), end="")
# [windows/cmd/cpy3] python dev\copyparty\bin\copyparty-fuse.py q: http://192.168.1.159:1234/
# [windows/cmd/msys2] C:\msys64\mingw64\bin\python3 dev\copyparty\bin\copyparty-fuse.py q: http://192.168.1.159:1234/
# [windows/mty/msys2] /mingw64/bin/python3 /c/Users/ed/dev/copyparty/bin/copyparty-fuse.py q: http://192.168.1.159:1234/
# [windows/cmd/cpy3] python dev\copyparty\bin\partyfuse.py q: http://192.168.1.159:1234/
# [windows/cmd/msys2] C:\msys64\mingw64\bin\python3 dev\copyparty\bin\partyfuse.py q: http://192.168.1.159:1234/
# [windows/mty/msys2] /mingw64/bin/python3 /c/Users/ed/dev/copyparty/bin/partyfuse.py q: http://192.168.1.159:1234/
#
# [windows] find /q/music/albums/Phant*24bit -printf '%s %p\n' | sort -n | tail -n 8 | sed -r 's/^[0-9]+ //' | while IFS= read -r x; do dd if="$x" of=/dev/null bs=4k count=8192 & done
# [alpine] ll t; for x in t/2020_0724_16{2,3}*; do dd if="$x" of=/dev/null bs=4k count=10240 & done
@ -202,10 +205,6 @@ class RecentLog(object):
# 3.1742 alpine urxvt cpy3 fancy_log
def get_tid():
return threading.current_thread().ident
def html_dec(txt):
return (
txt.replace("&lt;", "<")
@ -255,17 +254,18 @@ class Gateway(object):
self.ssl_context.load_verify_locations(ar.te)
self.conns = {}
if WINDOWS:
self.mtx = threading.Lock()
self.getconn = self.getconn_winfsp
else:
self.getconn = self.getconn_unix
def quotep(self, path):
path = path.encode("wtf-8")
return quote(path, safe="/")
def getconn(self, tid=None):
tid = tid or get_tid()
try:
return self.conns[tid]
except:
info("new conn [{}] [{}]".format(self.web_host, self.web_port))
def newconn(self):
info("\033[1;37;44mnew conn, {}\033[0m".format(len(self.conns) + 1))
args = {}
if not self.use_tls:
@ -276,35 +276,102 @@ class Gateway(object):
args = {"context": self.ssl_context}
conn = C(self.web_host, self.web_port, timeout=260, **args)
conn.rx_path = None
conn.rx_ofs = None
conn.rx = None
conn.cnode = None
return conn
def getconn_unix(self, key=None):
tid = threading.current_thread().ident
try:
return self.conns[tid]
except:
conn = self.newconn()
self.conns[tid] = conn
return conn
def closeconn(self, tid=None):
tid = tid or get_tid()
def getconn_winfsp(self, key="x"):
# hey wanna hear something fun
# winfsp uses a random thread for each read request
rm = None
ret = None
with self.mtx:
if dbg != null_log:
m = ["getconn [{}]".format(key)]
for k, v in sorted(self.conns.items()):
vpath = v[2].rx_path
c = 4 if not vpath else 2 if vpath in key else 3
m.append("\033[3{}m [{}] [{}]\033[0m".format(c, v[0], k))
dbg("\n".join(m))
try:
self.conns[tid].close()
del self.conns[tid]
ret = self.conns[key][2]
del self.conns[key]
except:
# pprint.pprint(self.conns.items())
for k, v in sorted(self.conns.items()):
if not v[2].rx_path:
del self.conns[k]
ret = v[2]
break
if not ret and len(self.conns) >= 8:
rm = sorted(self.conns.values())[0]
dbg("\033[1;37;41mdropping " + repr(rm) + "\033[0m")
if rm:
self.closeconn(rm[2])
return ret or self.newconn()
def putconn_winfsp(self, c, path):
with self.mtx:
self.conns["{} :{}".format(path, c.rx_ofs)] = [time.time(), id(c), c]
def closeconn(self, c):
try:
c.rx_path = None
c.cnode = None
c.close()
if not WINDOWS:
del self.conns[c]
return
with self.mtx:
for k, v in self.conns:
if c == v[2]:
del self.conns[k]
break
except:
pass
def sendreq(self, *args, headers={}, **kwargs):
tid = get_tid()
def sendreq(self, meth, path, headers, **kwargs):
if self.password:
headers["Cookie"] = "=".join(["cppwd", self.password])
c = self.getconn()
try:
c = self.getconn(tid)
c.request(*list(args), headers=headers, **kwargs)
return c.getresponse()
except:
dbg("bad conn")
if c.rx_path:
raise Exception()
self.closeconn(tid)
c.request(meth, path, headers=headers, **kwargs)
c.rx = c.getresponse()
return c
except:
tid = threading.current_thread().ident
dbg(
"\033[1;37;44mbad conn {:x}\n {} {}\n {}\033[0m".format(
tid, meth, path, c.rx_path if c else "(null)"
)
)
self.closeconn(c)
c = self.getconn()
try:
c = self.getconn(tid)
c.request(*list(args), headers=headers, **kwargs)
return c.getresponse()
c.request(meth, path, headers=headers, **kwargs)
c.rx = c.getresponse()
return c
except:
info("http connection failed:\n" + traceback.format_exc())
if self.use_tls and not self.ssl_context:
@ -320,54 +387,83 @@ class Gateway(object):
path = dewin(path)
web_path = self.quotep("/" + "/".join([self.web_root, path])) + "?dots"
r = self.sendreq("GET", web_path)
if r.status != 200:
self.closeconn()
c = self.sendreq("GET", web_path, {})
if c.rx.status != 200:
self.closeconn(c)
log(
"http error {} reading dir {} in {}".format(
r.status, web_path, rice_tid()
c.rx.status, web_path, rice_tid()
)
)
raise FuseOSError(errno.ENOENT)
if not r.getheader("Content-Type", "").startswith("text/html"):
if not c.rx.getheader("Content-Type", "").startswith("text/html"):
log("listdir on file: {}".format(path))
raise FuseOSError(errno.ENOENT)
try:
return self.parse_html(r)
ret = self.parse_html(c.rx)
if WINDOWS:
c.rx_ofs = 0
self.putconn_winfsp(c, path)
return ret
except:
info(repr(path) + "\n" + traceback.format_exc())
raise
def download_file_range(self, path, ofs1, ofs2):
c = self.getconn("{} :{}".format(path, ofs1))
if path == c.rx_path and ofs1 == c.rx_ofs:
try:
ret = c.rx.read(ofs2 - ofs1)
c.rx_ofs += len(ret)
c.rx_rem -= len(ret)
if not c.rx_rem:
c.rx_path = None
if WINDOWS:
self.putconn_winfsp(c, path)
return ret, c
except:
log("download resume failed")
if c.rx_path:
log("replacing download")
self.closeconn(c)
if bad_good:
path = dewin(path)
web_path = self.quotep("/" + "/".join([self.web_root, path])) + "?raw"
hdr_range = "bytes={}-{}".format(ofs1, ofs2 - 1)
hdr_range = "bytes={}-".format(ofs1)
info(
"DL {:4.0f}K\033[36m{:>9}-{:<9}\033[0m{}".format(
(ofs2 - ofs1) / 1024.0, ofs1, ofs2 - 1, hexler(path)
)
)
r = self.sendreq("GET", web_path, headers={"Range": hdr_range})
if r.status != http.client.PARTIAL_CONTENT:
self.closeconn()
c = self.sendreq("GET", web_path, {"Range": hdr_range})
if c.rx.status != http.client.PARTIAL_CONTENT:
self.closeconn(c)
raise Exception(
"http error {} reading file {} range {} in {}".format(
r.status, web_path, hdr_range, rice_tid()
c.rx.status, web_path, hdr_range, rice_tid()
)
)
return r.read()
ret = c.rx.read(ofs2 - ofs1)
c.rx_rem = int(c.rx.getheader("Content-Length")) - len(ret)
if c.rx_rem:
c.rx_ofs = ofs1 + len(ret)
c.rx_path = path
if WINDOWS:
self.putconn_winfsp(c, path)
return ret, c
def parse_html(self, datasrc):
ret = []
remainder = b""
ptn = re.compile(
r'^<tr><td>(-|DIR)</td><td><a[^>]* href="([^"]+)"[^>]*>([^<]+)</a></td><td>([^<]+)</td><td>([^<]+)</td></tr>$'
r'^<tr><td>(-|DIR|<a [^<]+</a>)</td><td><a[^>]* href="([^"]+)"[^>]*>([^<]+)</a></td><td>([^<]+)</td><td>[^<]+</td><td>([^<]+)</td></tr>$'
)
while True:
@ -400,12 +496,12 @@ class Gateway(object):
ts = 60 * 60 * 24 * 2
try:
sz = int(fsize)
ts = datetime.strptime(fdate, "%Y-%m-%d %H:%M:%S").timestamp()
ts = calendar.timegm(time.strptime(fdate, "%Y-%m-%d %H:%M:%S"))
except:
info("bad HTML or OS [{}] [{}]".format(fdate, fsize))
# python cannot strptime(1959-01-01) on windows
if ftype == "-":
if ftype != "DIR":
ret.append([fname, self.stat_file(ts, sz), 0])
else:
ret.append([fname, self.stat_dir(ts, sz), 0])
@ -520,6 +616,8 @@ class CPPF(Operations):
ncn = -1
dbg("cache request {}:{} |{}|".format(get1, get2, file_sz) + self._describe())
with self.filecache_mtx:
have_before = False
have_after = False
for cn in self.filecache:
ncn += 1
@ -528,6 +626,13 @@ class CPPF(Operations):
continue
cache2 = cache1 + len(cn.data)
if get1 == cache2:
have_before = True
if get2 == cache1:
have_after = True
if get2 <= cache1 or get1 >= cache2:
# request does not overlap with cached area at all
continue
@ -614,7 +719,10 @@ class CPPF(Operations):
elif cdr and (not car or len(car) < len(cdr)):
h_end = get1 + (get2 - get1) - len(cdr)
h_ofs = min(get1, h_end - 512 * 1024)
if have_before:
h_ofs = get1
else:
h_ofs = min(get1, h_end - 64 * 1024)
if h_ofs < 0:
h_ofs = 0
@ -627,7 +735,7 @@ class CPPF(Operations):
)
)
buf = self.gw.download_file_range(path, h_ofs, h_end)
buf, c = self.gw.download_file_range(path, h_ofs, h_end)
if len(buf) == h_end - h_ofs:
ret = buf[buf_ofs:] + cdr
else:
@ -640,49 +748,47 @@ class CPPF(Operations):
elif car:
h_ofs = get1 + len(car)
h_end = max(get2, h_ofs + 1024 * 1024)
if h_end > file_sz:
h_end = file_sz
buf_ofs = (get2 - get1) - len(car)
dbg(
"<cache> car {}, cdr {}:{} |{}| [:{}]".format(
len(car), h_ofs, h_end, h_end - h_ofs, buf_ofs
len(car), h_ofs, get2, get2 - h_ofs, buf_ofs
)
)
buf = self.gw.download_file_range(path, h_ofs, h_end)
buf, c = self.gw.download_file_range(path, h_ofs, get2)
ret = car + buf[:buf_ofs]
else:
if get2 - get1 <= 1024 * 1024:
h_ofs = get1 - 256 * 1024
h_end = get2 + 1024 * 1024
else:
# big enough, doesn't need pads
h_ofs = get1
h_end = get2
if not have_before:
if get2 - get1 <= 1024 * 1024:
h_ofs = get1 - 64 * 1024
if h_ofs < 0:
h_ofs = 0
if h_end > file_sz:
h_end = file_sz
buf_ofs = get1 - h_ofs
buf_end = buf_ofs + get2 - get1
dbg(
"<cache> {}:{} |{}| [{}:{}]".format(
h_ofs, h_end, h_end - h_ofs, buf_ofs, buf_end
h_ofs, get2, get2 - h_ofs, buf_ofs, buf_end
)
)
buf = self.gw.download_file_range(path, h_ofs, h_end)
buf, c = self.gw.download_file_range(path, h_ofs, get2)
ret = buf[buf_ofs:buf_end]
if c and c.cnode and len(c.cnode.data) + len(buf) < 1024 * 1024:
dbg(
"cache: {}(@{}) + {}(@{})".format(
len(c.cnode.data), c.cnode.tag[1], len(buf), buf_ofs, get1
)
)
c.cnode.data += buf
return ret
cn = CacheNode([path, h_ofs], buf)
with self.filecache_mtx:
if len(self.filecache) >= self.n_filecache:
@ -690,6 +796,7 @@ class CPPF(Operations):
else:
self.filecache.append(cn)
c.cnode = cn
return ret
def _readdir(self, path, fh=None):
@ -736,7 +843,7 @@ class CPPF(Operations):
if self.n_filecache and length <= cache_max:
ret = self.get_cached_file(path, offset, ofs2, file_sz)
else:
ret = self.gw.download_file_range(path, offset, ofs2)
ret = self.gw.download_file_range(path, offset, ofs2)[0]
return ret
@ -906,6 +1013,7 @@ class TheArgparseFormatter(
def main():
global info, log, dbg
time.strptime("19970815", "%Y%m%d") # python#7980
# filecache helps for reads that are ~64k or smaller;
# linux generally does 128k so the cache is a slowdown,
@ -960,7 +1068,7 @@ def main():
dbg = null_log
if WINDOWS:
os.system("")
os.system("rem")
for ch in '<>:"\\|?*':
# microsoft maps illegal characters to f0xx

1226
bin/partyfuse.py Executable file

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python3
from __future__ import print_function, unicode_literals
"""copyparty-fuseb: remote copyparty as a local filesystem"""
"""partyfuse2: remote copyparty as a local filesystem"""
__author__ = "ed <copyparty@ocv.me>"
__copyright__ = 2020
__license__ = "MIT"
@ -11,14 +11,18 @@ import re
import os
import sys
import time
import json
import stat
import errno
import struct
import codecs
import platform
import threading
import http.client # py2: httplib
import urllib.parse
from datetime import datetime
from urllib.parse import quote_from_bytes as quote
from urllib.parse import unquote_to_bytes as unquote
try:
import fuse
@ -28,9 +32,19 @@ try:
if not hasattr(fuse, "__version__"):
raise Exception("your fuse-python is way old")
except:
print(
"\n could not import fuse; these may help:\n python3 -m pip install --user fuse-python\n apt install libfuse\n modprobe fuse\n"
)
if WINDOWS:
libfuse = "install https://github.com/billziss-gh/winfsp/releases/latest"
elif MACOS:
libfuse = "install https://osxfuse.github.io/"
else:
libfuse = "apt install libfuse\n modprobe fuse"
m = """\033[33m
could not import fuse; these may help:
{} -m pip install --user fuse-python
{}
\033[0m"""
print(m.format(sys.executable, libfuse))
raise
@ -38,18 +52,22 @@ except:
mount a copyparty server (local or remote) as a filesystem
usage:
python ./copyparty-fuseb.py -f -o allow_other,auto_unmount,nonempty,url=http://192.168.1.69:3923 /mnt/nas
python ./partyfuse2.py -f -o allow_other,auto_unmount,nonempty,pw=wark,url=http://192.168.1.69:3923 /mnt/nas
dependencies:
sudo apk add fuse-dev python3-dev
python3 -m pip install --user fuse-python
fork of copyparty-fuse.py based on fuse-python which
fork of partyfuse.py based on fuse-python which
appears to be more compliant than fusepy? since this works with samba
(probably just my garbage code tbh)
"""
WINDOWS = sys.platform == "win32"
MACOS = platform.system() == "Darwin"
def threadless_log(msg):
print(msg + "\n", end="")
@ -93,6 +111,41 @@ def html_dec(txt):
)
def register_wtf8():
def wtf8_enc(text):
return str(text).encode("utf-8", "surrogateescape"), len(text)
def wtf8_dec(binary):
return bytes(binary).decode("utf-8", "surrogateescape"), len(binary)
def wtf8_search(encoding_name):
return codecs.CodecInfo(wtf8_enc, wtf8_dec, name="wtf-8")
codecs.register(wtf8_search)
bad_good = {}
good_bad = {}
def enwin(txt):
return "".join([bad_good.get(x, x) for x in txt])
for bad, good in bad_good.items():
txt = txt.replace(bad, good)
return txt
def dewin(txt):
return "".join([good_bad.get(x, x) for x in txt])
for bad, good in bad_good.items():
txt = txt.replace(good, bad)
return txt
class CacheNode(object):
def __init__(self, tag, data):
self.tag = tag
@ -115,8 +168,9 @@ class Stat(fuse.Stat):
class Gateway(object):
def __init__(self, base_url):
def __init__(self, base_url, pw):
self.base_url = base_url
self.pw = pw
ui = urllib.parse.urlparse(base_url)
self.web_root = ui.path.strip("/")
@ -135,8 +189,7 @@ class Gateway(object):
self.conns = {}
def quotep(self, path):
# TODO: mojibake support
path = path.encode("utf-8", "ignore")
path = path.encode("wtf-8")
return quote(path, safe="/")
def getconn(self, tid=None):
@ -159,20 +212,29 @@ class Gateway(object):
except:
pass
def sendreq(self, *args, **kwargs):
def sendreq(self, *args, **ka):
tid = get_tid()
if self.pw:
ck = "cppwd=" + self.pw
try:
ka["headers"]["Cookie"] = ck
except:
ka["headers"] = {"Cookie": ck}
try:
c = self.getconn(tid)
c.request(*list(args), **kwargs)
c.request(*list(args), **ka)
return c.getresponse()
except:
self.closeconn(tid)
c = self.getconn(tid)
c.request(*list(args), **kwargs)
c.request(*list(args), **ka)
return c.getresponse()
def listdir(self, path):
web_path = self.quotep("/" + "/".join([self.web_root, path])) + "?dots"
if bad_good:
path = dewin(path)
web_path = self.quotep("/" + "/".join([self.web_root, path])) + "?dots&ls"
r = self.sendreq("GET", web_path)
if r.status != 200:
self.closeconn()
@ -182,9 +244,12 @@ class Gateway(object):
)
)
return self.parse_html(r)
return self.parse_jls(r)
def download_file_range(self, path, ofs1, ofs2):
if bad_good:
path = dewin(path)
web_path = self.quotep("/" + "/".join([self.web_root, path])) + "?raw"
hdr_range = "bytes={}-{}".format(ofs1, ofs2 - 1)
log("downloading {}".format(hdr_range))
@ -200,40 +265,27 @@ class Gateway(object):
return r.read()
def parse_html(self, datasrc):
ret = []
remainder = b""
ptn = re.compile(
r"^<tr><td>(-|DIR)</td><td><a [^>]+>([^<]+)</a></td><td>([^<]+)</td><td>([^<]+)</td></tr>$"
)
def parse_jls(self, datasrc):
rsp = b""
while True:
buf = remainder + datasrc.read(4096)
# print('[{}]'.format(buf.decode('utf-8')))
buf = datasrc.read(1024 * 32)
if not buf:
break
remainder = b""
endpos = buf.rfind(b"\n")
if endpos >= 0:
remainder = buf[endpos + 1 :]
buf = buf[:endpos]
rsp += buf
lines = buf.decode("utf-8").split("\n")
for line in lines:
m = ptn.match(line)
if not m:
# print(line)
continue
rsp = json.loads(rsp.decode("utf-8"))
ret = []
for statfun, nodes in [
[self.stat_dir, rsp["dirs"]],
[self.stat_file, rsp["files"]],
]:
for n in nodes:
fname = unquote(n["href"].split("?")[0]).rstrip(b"/").decode("wtf-8")
if bad_good:
fname = enwin(fname)
ftype, fname, fsize, fdate = m.groups()
fname = html_dec(fname)
ts = datetime.strptime(fdate, "%Y-%m-%d %H:%M:%S").timestamp()
sz = int(fsize)
if ftype == "-":
ret.append([fname, self.stat_file(ts, sz), 0])
else:
ret.append([fname, self.stat_dir(ts, sz), 0])
ret.append([fname, statfun(n["ts"], n["sz"]), 0])
return ret
@ -262,6 +314,7 @@ class CPPF(Fuse):
Fuse.__init__(self, *args, **kwargs)
self.url = None
self.pw = None
self.dircache = []
self.dircache_mtx = threading.Lock()
@ -271,7 +324,7 @@ class CPPF(Fuse):
def init2(self):
# TODO figure out how python-fuse wanted this to go
self.gw = Gateway(self.url) # .decode('utf-8'))
self.gw = Gateway(self.url, self.pw) # .decode('utf-8'))
info("up")
def clean_dircache(self):
@ -536,6 +589,8 @@ class CPPF(Fuse):
def getattr(self, path):
log("getattr [{}]".format(path))
if WINDOWS:
path = enwin(path) # windows occasionally decodes f0xx to xx
path = path.strip("/")
try:
@ -567,8 +622,26 @@ class CPPF(Fuse):
def main():
time.strptime("19970815", "%Y%m%d") # python#7980
register_wtf8()
if WINDOWS:
os.system("rem")
for ch in '<>:"\\|?*':
# microsoft maps illegal characters to f0xx
# (e000 to f8ff is basic-plane private-use)
bad_good[ch] = chr(ord(ch) + 0xF000)
for n in range(0, 0x100):
# map surrogateescape to another private-use area
bad_good[chr(n + 0xDC00)] = chr(n + 0xF100)
for k, v in bad_good.items():
good_bad[v] = k
server = CPPF()
server.parser.add_option(mountopt="url", metavar="BASE_URL", default=None)
server.parser.add_option(mountopt="pw", metavar="PASSWORD", default=None)
server.parse(values=server, errex=1)
if not server.url or not str(server.url).startswith("http"):
print("\nerror:")
@ -576,7 +649,7 @@ def main():
print(" need argument: mount-path")
print("example:")
print(
" ./copyparty-fuseb.py -f -o allow_other,auto_unmount,nonempty,url=http://192.168.1.69:3923 /mnt/nas"
" ./partyfuse2.py -f -o allow_other,auto_unmount,nonempty,pw=wark,url=http://192.168.1.69:3923 /mnt/nas"
)
sys.exit(1)

177
bin/partyjournal.py Executable file
View file

@ -0,0 +1,177 @@
#!/usr/bin/env python3
"""
partyjournal.py: chronological history of uploads
2021-12-31, v0.1, ed <irc.rizon.net>, MIT-Licensed
https://github.com/9001/copyparty/blob/hovudstraum/bin/partyjournal.py
produces a chronological list of all uploads,
by collecting info from up2k databases and the filesystem
specify subnet `192.168.1.*` with argument `.=192.168.1.`,
affecting all successive mappings
usage:
./partyjournal.py > partyjournal.html .=192.168.1. cart=125 steen=114 steen=131 sleepy=121 fscarlet=144 ed=101 ed=123
"""
import sys
import base64
import sqlite3
import argparse
from datetime import datetime, timezone
from urllib.parse import quote_from_bytes as quote
from urllib.parse import unquote_to_bytes as unquote
FS_ENCODING = sys.getfilesystemencoding()
UTC = timezone.utc
class APF(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpFormatter):
pass
##
## snibbed from copyparty
def s3dec(v):
if not v.startswith("//"):
return v
v = base64.urlsafe_b64decode(v.encode("ascii")[2:])
return v.decode(FS_ENCODING, "replace")
def quotep(txt):
btxt = txt.encode("utf-8", "replace")
quot1 = quote(btxt, safe=b"/")
quot1 = quot1.encode("ascii")
quot2 = quot1.replace(b" ", b"+")
return quot2.decode("utf-8", "replace")
def html_escape(s, quote=False, crlf=False):
"""html.escape but also newlines"""
s = s.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
if quote:
s = s.replace('"', "&quot;").replace("'", "&#x27;")
if crlf:
s = s.replace("\r", "&#13;").replace("\n", "&#10;")
return s
## end snibs
##
def main():
ap = argparse.ArgumentParser(formatter_class=APF)
ap.add_argument("who", nargs="*")
ar = ap.parse_args()
imap = {}
subnet = ""
for v in ar.who:
if "=" not in v:
raise Exception("bad who: " + v)
k, v = v.split("=")
if k == ".":
subnet = v
continue
imap["{}{}".format(subnet, v)] = k
print(repr(imap), file=sys.stderr)
print(
"""\
<!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8"><style>
html, body {
color: #ccc;
background: #222;
font-family: sans-serif;
}
a {
color: #fc5;
}
td, th {
padding: .2em .5em;
border: 1px solid #999;
border-width: 0 1px 1px 0;
white-space: nowrap;
}
td:nth-child(1),
td:nth-child(2),
td:nth-child(3) {
font-family: monospace, monospace;
text-align: right;
}
tr:first-child {
position: sticky;
top: -1px;
}
th {
background: #222;
text-align: left;
}
</style></head><body><table><tr>
<th>wark</th>
<th>time</th>
<th>size</th>
<th>who</th>
<th>link</th>
</tr>"""
)
db_path = ".hist/up2k.db"
conn = sqlite3.connect(db_path)
q = r"pragma table_info(up)"
inf = conn.execute(q).fetchall()
cols = [x[1] for x in inf]
print("<!-- " + str(cols) + " -->")
# ['w', 'mt', 'sz', 'rd', 'fn', 'ip', 'at']
q = r"select * from up order by case when at > 0 then at else mt end"
for w, mt, sz, rd, fn, ip, at in conn.execute(q):
link = "/".join([s3dec(x) for x in [rd, fn] if x])
if fn.startswith("put-") and sz < 4096:
try:
with open(link, "rb") as f:
txt = f.read().decode("utf-8", "replace")
except:
continue
if txt.startswith("msg="):
txt = txt.encode("utf-8", "replace")
txt = unquote(txt.replace(b"+", b" "))
link = txt.decode("utf-8")[4:]
sz = "{:,}".format(sz)
dt = datetime.fromtimestamp(at if at > 0 else mt, UTC)
v = [
w[:16],
dt.strftime("%Y-%m-%d %H:%M:%S"),
sz,
imap.get(ip, ip),
]
row = "<tr>\n "
row += "\n ".join(["<td>{}</th>".format(x) for x in v])
row += '\n <td><a href="{}">{}</a></td>'.format(link, html_escape(link))
row += "\n</tr>"
print(row)
print("</table></body></html>")
if __name__ == "__main__":
main()

163
bin/prisonparty.sh Executable file
View file

@ -0,0 +1,163 @@
#!/bin/bash
set -e
# runs copyparty (or any other program really) in a chroot
#
# assumption: these directories, and everything within, are owned by root
sysdirs=(); for v in /bin /lib /lib32 /lib64 /sbin /usr /etc/alternatives ; do
[ -e $v ] && sysdirs+=($v)
done
# error-handler
help() { cat <<'EOF'
usage:
./prisonparty.sh <ROOTDIR> <USER|UID> <GROUP|GID> [VOLDIR [VOLDIR...]] -- python3 copyparty-sfx.py [...]
example:
./prisonparty.sh /var/lib/copyparty-jail cpp cpp /mnt/nas/music -- python3 copyparty-sfx.py -v /mnt/nas/music::rwmd
example for running straight from source (instead of using an sfx):
PYTHONPATH=$PWD ./prisonparty.sh /var/lib/copyparty-jail cpp cpp /mnt/nas/music -- python3 -um copyparty -v /mnt/nas/music::rwmd
note that if you have python modules installed as --user (such as bpm/key detectors),
you should add /home/foo/.local as a VOLDIR
EOF
exit 1
}
errs=
for c in awk chroot dirname getent lsof mknod mount realpath sed sort stat uniq; do
command -v $c >/dev/null || {
echo ERROR: command not found: $c
errs=1
}
done
[ $errs ] && exit 1
# read arguments
trap help EXIT
jail="$(realpath "$1")"; shift
uid="$1"; shift
gid="$1"; shift
vols=()
while true; do
v="$1"; shift
[ "$v" = -- ] && break # end of volumes
[ "$#" -eq 0 ] && break # invalid usage
vols+=( "$(realpath "$v" || echo "$v")" )
done
pybin="$1"; shift
pybin="$(command -v "$pybin")"
pyarg=
while true; do
v="$1"
[ "${v:0:1}" = - ] || break
pyarg="$pyarg $v"
shift
done
cpp="$1"; shift
[ -d "$cpp" ] && cppdir="$PWD" || {
# sfx, not module
cpp="$(realpath "$cpp")"
cppdir="$(dirname "$cpp")"
}
trap - EXIT
usr="$(getent passwd $uid | cut -d: -f1)"
[ "$usr" ] || { echo "ERROR invalid username/uid $uid"; exit 1; }
uid="$(getent passwd $uid | cut -d: -f3)"
grp="$(getent group $gid | cut -d: -f1)"
[ "$grp" ] || { echo "ERROR invalid groupname/gid $gid"; exit 1; }
gid="$(getent group $gid | cut -d: -f3)"
# debug/vis
echo
echo "chroot-dir = $jail"
echo "user:group = $uid:$gid ($usr:$grp)"
echo " copyparty = $cpp"
echo
printf '\033[33m%s\033[0m\n' "copyparty can access these folders and all their subdirectories:"
for v in "${vols[@]}"; do
printf '\033[36m ├─\033[0m %s \033[36m ── added by (You)\033[0m\n' "$v"
done
printf '\033[36m ├─\033[0m %s \033[36m ── where the copyparty binary is\033[0m\n' "$cppdir"
printf '\033[36m ╰─\033[0m %s \033[36m ── the folder you are currently in\033[0m\n' "$PWD"
vols+=("$cppdir" "$PWD")
echo
# remove any trailing slashes
jail="${jail%/}"
# bind-mount system directories and volumes
for a in {1..30}; do mkdir "$jail/.prisonlock" && break; sleep 0.1; done
printf '%s\n' "${sysdirs[@]}" "${vols[@]}" | sed -r 's`/$``' | LC_ALL=C sort | uniq |
while IFS= read -r v; do
[ -e "$v" ] || {
printf '\033[1;31mfolder does not exist:\033[0m %s\n' "$v"
continue
}
i1=$(stat -c%D.%i "$v/" 2>/dev/null || echo a)
i2=$(stat -c%D.%i "$jail$v/" 2>/dev/null || echo b)
[ $i1 = $i2 ] && continue
mount | grep -qF " $jail$v " && echo wtf $i1 $i2 $v && continue
mkdir -p "$jail$v"
mount --bind "$v" "$jail$v"
done
rmdir "$jail/.prisonlock" || true
cln() {
trap - EXIT
wait -f -n $p && rv=0 || rv=$?
cd /
echo "stopping chroot..."
for a in {1..30}; do mkdir "$jail/.prisonlock" && break; sleep 0.1; done
lsof "$jail" 2>/dev/null | grep -F "$jail" &&
echo "chroot is in use; will not unmount" ||
{
mount | grep -F " on $jail" |
awk '{sub(/ type .*/,"");sub(/.* on /,"");print}' |
LC_ALL=C sort -r | while IFS= read -r v; do
umount "$v" && echo "umount OK: $v"
done
}
rmdir "$jail/.prisonlock" || true
exit $rv
}
trap cln EXIT
# create a tmp
mkdir -p "$jail/tmp"
chmod 777 "$jail/tmp"
# create a dev
(cd $jail; mkdir -p dev; cd dev
[ -e null ] || mknod -m 666 null c 1 3
[ -e zero ] || mknod -m 666 zero c 1 5
[ -e random ] || mknod -m 444 random c 1 8
[ -e urandom ] || mknod -m 444 urandom c 1 9
)
# run copyparty
export HOME="$(getent passwd $uid | cut -d: -f6)"
export USER="$usr"
export LOGNAME="$USER"
#echo "pybin [$pybin]"
#echo "pyarg [$pyarg]"
#echo "cpp [$cpp]"
chroot --userspec=$uid:$gid "$jail" "$pybin" $pyarg "$cpp" "$@" &
p=$!
trap 'kill -USR1 $p' USR1
trap 'trap - INT TERM; kill $p' INT TERM
wait

1718
bin/u2c.py Executable file

File diff suppressed because it is too large Load diff

99
bin/unforget.py Executable file
View file

@ -0,0 +1,99 @@
#!/usr/bin/env python3
"""
unforget.py: rebuild db from logfiles
2022-09-07, v0.1, ed <irc.rizon.net>, MIT-Licensed
https://github.com/9001/copyparty/blob/hovudstraum/bin/unforget.py
only makes sense if running copyparty with --no-forget
(e.g. immediately shifting uploads to other storage)
usage:
xz -d < log | ./unforget.py .hist/up2k.db
"""
import re
import sys
import json
import base64
import sqlite3
import argparse
FS_ENCODING = sys.getfilesystemencoding()
class APF(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpFormatter):
pass
mem_cur = sqlite3.connect(":memory:").cursor()
mem_cur.execute(r"create table a (b text)")
def s3enc(rd: str, fn: str) -> tuple[str, str]:
ret: list[str] = []
for v in [rd, fn]:
try:
mem_cur.execute("select * from a where b = ?", (v,))
ret.append(v)
except:
wtf8 = v.encode(FS_ENCODING, "surrogateescape")
ret.append("//" + base64.urlsafe_b64encode(wtf8).decode("ascii"))
return ret[0], ret[1]
def main():
ap = argparse.ArgumentParser()
ap.add_argument("db")
ar = ap.parse_args()
db = sqlite3.connect(ar.db).cursor()
ptn_times = re.compile(r"no more chunks, setting times \(([0-9]+)")
at = 0
ctr = 0
for ln in [x.decode("utf-8", "replace").rstrip() for x in sys.stdin.buffer]:
if "no more chunks, setting times (" in ln:
m = ptn_times.search(ln)
if m:
at = int(m.group(1))
if '"hash": []' in ln:
try:
ofs = ln.find("{")
j = json.loads(ln[ofs:])
except:
continue
w = j["wark"]
if db.execute("select w from up where w = ?", (w,)).fetchone():
continue
# PYTHONPATH=/home/ed/dev/copyparty/ python3 -m copyparty -e2dsa -v foo:foo:rwmd,ed -aed:wark --no-forget
# 05:34:43.845 127.0.0.1 42496 no more chunks, setting times (1662528883, 1658001882)
# 05:34:43.863 127.0.0.1 42496 {"name": "f\"2", "purl": "/foo/bar/baz/", "size": 1674, "lmod": 1658001882, "sprs": true, "hash": [], "wark": "LKIWpp2jEAh9dH3fu-DobuURFGEKlODXDGTpZ1otMhUg"}
# | w | mt | sz | rd | fn | ip | at |
# | LKIWpp2jEAh9dH3fu-DobuURFGEKlODXDGTpZ1otMhUg | 1658001882 | 1674 | bar/baz | f"2 | 127.0.0.1 | 1662528883 |
rd, fn = s3enc(j["purl"].strip("/"), j["name"])
ip = ln.split(" ")[1].split("m")[-1]
q = "insert into up values (?,?,?,?,?,?,?)"
v = (w, int(j["lmod"]), int(j["size"]), rd, fn, ip, at)
db.execute(q, v)
ctr += 1
if ctr % 1024 == 1023:
print(f"{ctr} commit...")
db.connection.commit()
if ctr:
db.connection.commit()
print(f"unforgot {ctr} files")
if __name__ == "__main__":
main()

22
bin/up2k.sh Executable file → Normal file
View file

@ -8,7 +8,7 @@ set -e
##
## config
datalen=$((2*1024*1024*1024))
datalen=$((128*1024*1024))
target=127.0.0.1
posturl=/inc
passwd=wark
@ -37,10 +37,10 @@ gendata() {
# pipe a chunk, get the base64 checksum
gethash() {
printf $(
sha512sum | cut -c-64 |
sha512sum | cut -c-66 |
sed -r 's/ .*//;s/(..)/\\x\1/g'
) |
base64 -w0 | cut -c-43 |
base64 -w0 | cut -c-44 |
tr '+/' '-_'
}
@ -123,7 +123,7 @@ printf '\033[36m'
{
{
cat <<EOF
POST $posturl/handshake.php HTTP/1.1
POST $posturl/ HTTP/1.1
Connection: Close
Cookie: cppwd=$passwd
Content-Type: text/plain;charset=UTF-8
@ -145,14 +145,16 @@ printf '\033[0m\nwark: %s\n' $wark
##
## wait for signal to continue
w8=/dev/shm/$salt.w8
touch $w8
true || {
w8=/dev/shm/$salt.w8
touch $w8
echo "ready; rm -f $w8"
echo "ready; rm -f $w8"
while [ -e $w8 ]; do
while [ -e $w8 ]; do
sleep 0.2
done
done
}
##
@ -175,7 +177,7 @@ while [ $remains -gt 0 ]; do
{
cat <<EOF
POST $posturl/chunkpit.php HTTP/1.1
POST $posturl/ HTTP/1.1
Connection: Keep-Alive
Cookie: cppwd=$passwd
Content-Type: application/octet-stream

76
bin/zmq-recv.py Executable file
View file

@ -0,0 +1,76 @@
#!/usr/bin/env python3
import sys
import zmq
"""
zmq-recv.py: demo zmq receiver
2025-01-22, v1.0, ed <irc.rizon.net>, MIT-Licensed
https://github.com/9001/copyparty/blob/hovudstraum/bin/zmq-recv.py
basic zmq-server to receive events from copyparty; try one of
the below and then "send a message to serverlog" in the web-ui:
1) dumb fire-and-forget to any and all listeners;
run this script with "sub" and run copyparty with this:
--xm zmq:pub:tcp://*:5556
2) one lucky listener gets the message, blocks if no listeners:
run this script with "pull" and run copyparty with this:
--xm t3,zmq:push:tcp://*:5557
3) blocking syn/ack mode, client must ack each message;
run this script with "rep" and run copyparty with this:
--xm t3,zmq:req:tcp://localhost:5555
note: to conditionally block uploads based on message contents,
use rep_server to answer with "return 1" and run copyparty with
--xau t3,c,zmq:req:tcp://localhost:5555
"""
ctx = zmq.Context()
def sub_server():
# PUB/SUB allows any number of servers/clients, and
# messages are fire-and-forget
sck = ctx.socket(zmq.SUB)
sck.connect("tcp://localhost:5556")
sck.setsockopt_string(zmq.SUBSCRIBE, "")
while True:
print("copyparty says %r" % (sck.recv_string(),))
def pull_server():
# PUSH/PULL allows any number of servers/clients, and
# each message is sent to a exactly one PULL client
sck = ctx.socket(zmq.PULL)
sck.connect("tcp://localhost:5557")
while True:
print("copyparty says %r" % (sck.recv_string(),))
def rep_server():
# REP/REQ is a server/client pair where each message must be
# acked by the other before another message can be sent, so
# copyparty will do a blocking-wait for the ack
sck = ctx.socket(zmq.REP)
sck.bind("tcp://*:5555")
while True:
print("copyparty says %r" % (sck.recv_string(),))
reply = b"thx"
# reply = b"return 1" # non-zero to block an upload
sck.send(reply)
mode = sys.argv[1].lower() if len(sys.argv) > 1 else ""
if mode == "sub":
sub_server()
elif mode == "pull":
pull_server()
elif mode == "rep":
rep_server()
else:
print("specify mode as first argument: SUB | PULL | REP")

View file

@ -1,3 +1,6 @@
### [`plugins/`](plugins/)
* example extensions
### [`copyparty.bat`](copyparty.bat)
* launches copyparty with no arguments (anon read+write within same folder)
* intended for windows machines with no python.exe in PATH
@ -9,11 +12,59 @@
* assumes the webserver and copyparty is running on the same server/IP
* modify `10.13.1.1` as necessary if you wish to support browsers without javascript
### [`sharex.sxcu`](sharex.sxcu) - Windows screenshot uploader
* [sharex](https://getsharex.com/) config file to upload screenshots and grab the URL
* `RequestURL`: full URL to the target folder
* `pw`: password (remove the `pw` line if anon-write)
* the `act:bput` thing is optional since copyparty v1.9.29
* using an older sharex version, maybe sharex v12.1.1 for example? dw fam i got your back 👉😎👉 [`sharex12.sxcu`](sharex12.sxcu)
### [`ishare.iscu`](ishare.iscu) - MacOS screenshot uploader
* [ishare](https://isharemac.app/) config file to upload screenshots and grab the URL
* `RequestURL`: full URL to the target folder
* `pw`: password (remove the `pw` line if anon-write)
### [`flameshot.sh`](flameshot.sh) - Linux screenshot uploader
* takes a screenshot with [flameshot](https://flameshot.org/) on Linux, uploads it, and writes the URL to clipboard
### [`send-to-cpp.contextlet.json`](send-to-cpp.contextlet.json)
* browser integration, kind of? custom rightclick actions and stuff
* rightclick a pic and send it to copyparty straight from your browser
* for the [contextlet](https://addons.mozilla.org/en-US/firefox/addon/contextlets/) firefox extension
### [`media-osd-bgone.ps1`](media-osd-bgone.ps1)
* disables the [windows OSD popup](https://user-images.githubusercontent.com/241032/122821375-0e08df80-d2dd-11eb-9fd9-184e8aacf1d0.png) (the thing on the left) which appears every time you hit media hotkeys to adjust volume or change song while playing music with the copyparty web-ui, or most other audio players really
### [`explorer-nothumbs-nofoldertypes.reg`](explorer-nothumbs-nofoldertypes.reg)
* disables thumbnails and folder-type detection in windows explorer
* makes it way faster (especially for slow/networked locations (such as partyfuse))
### [`webdav-cfg.reg`](webdav-cfg.bat)
* improves the native webdav support in windows;
* removes the 47.6 MiB filesize limit when downloading from webdav
* optionally enables webdav basic-auth over plaintext http
* optionally helps disable wpad, removing the 10sec latency
### [`cfssl.sh`](cfssl.sh)
* creates CA and server certificates using cfssl
* give a 3rd argument to install it to your copyparty config
* systemd service at [`systemd/cfssl.service`](systemd/cfssl.service)
### [`zfs-tune.py`](zfs-tune.py)
* optimizes databases for optimal performance when stored on a zfs filesystem; also see [openzfs docs](https://openzfs.github.io/openzfs-docs/Performance%20and%20Tuning/Workload%20Tuning.html#database-workloads) and specifically the SQLite subsection
# OS integration
init-scripts to start copyparty as a service
* [`systemd/copyparty.service`](systemd/copyparty.service)
* [`systemd/copyparty.service`](systemd/copyparty.service) runs the sfx normally
* [`rc/copyparty`](rc/copyparty) runs sfx normally on freebsd, create a `copyparty` user
* [`systemd/prisonparty.service`](systemd/prisonparty.service) runs the sfx in a chroot
* [`openrc/copyparty`](openrc/copyparty)
# Reverse-proxy
copyparty has basic support for running behind another webserver
* [`nginx/copyparty.conf`](nginx/copyparty.conf)
copyparty supports running behind another webserver
* [`apache/copyparty.conf`](apache/copyparty.conf)
* [`haproxy/copyparty.conf`](haproxy/copyparty.conf)
* [`lighttpd/subdomain.conf`](lighttpd/subdomain.conf)
* [`lighttpd/subpath.conf`](lighttpd/subpath.conf)
* [`nginx/copyparty.conf`](nginx/copyparty.conf) -- recommended
* [`traefik/copyparty.yaml`](traefik/copyparty.yaml)

View file

@ -0,0 +1,29 @@
# if you would like to use unix-sockets (recommended),
# you must run copyparty with one of the following:
#
# -i unix:777:/dev/shm/party.sock
# -i unix:777:/dev/shm/party.sock,127.0.0.1
#
# if you are doing location-based proxying (such as `/stuff` below)
# you must run copyparty with --rp-loc=stuff
#
# on fedora/rhel, remember to setsebool -P httpd_can_network_connect 1
LoadModule proxy_module modules/mod_proxy.so
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
# NOTE: do not specify ProxyPassReverse
##
## then, enable one of the below:
# use subdomain proxying to unix-socket (best)
ProxyPass "/" "unix:///dev/shm/party.sock|http://whatever/"
# use subdomain proxying to 127.0.0.1 (slower)
#ProxyPass "/" "http://127.0.0.1:3923/"
# use subpath proxying to 127.0.0.1 (slow and maybe buggy)
#ProxyPass "/stuff" "http://127.0.0.1:3923/stuff"

105
contrib/cfssl.sh Executable file
View file

@ -0,0 +1,105 @@
#!/bin/bash
set -e
cat >/dev/null <<'EOF'
NOTE: copyparty is now able to do this automatically;
however you may wish to use this script instead if
you have specific needs (or if copyparty breaks)
this script generates a new self-signed TLS certificate and
replaces the default insecure one that comes with copyparty
as it is trivial to impersonate a copyparty server using the
default certificate, it is highly recommended to do this
this will create a self-signed CA, and a Server certificate
which gets signed by that CA -- you can run it multiple times
with different server-FQDNs / IPs to create additional certs
for all your different servers / (non-)copyparty services
EOF
# ca-name and server-fqdn
ca_name="$1"
srv_fqdn="$2"
[ -z "$srv_fqdn" ] && { cat <<'EOF'
need arg 1: ca name
need arg 2: server fqdn and/or IPs, comma-separated
optional arg 3: if set, write cert into copyparty cfg
example:
./cfssl.sh PartyCo partybox.local y
EOF
exit 1
}
command -v cfssljson 2>/dev/null || {
echo please install cfssl and try again
exit 1
}
gen_ca() {
(tee /dev/stderr <<EOF
{"CN": "$ca_name ca",
"CA": {"expiry":"87600h", "pathlen":0},
"key": {"algo":"rsa", "size":4096},
"names": [{"O":"$ca_name ca"}]}
EOF
)|
cfssl gencert -initca - |
cfssljson -bare ca
mv ca-key.pem ca.key
rm ca.csr
}
gen_srv() {
(tee /dev/stderr <<EOF
{"key": {"algo":"rsa", "size":4096},
"names": [{"O":"$ca_name - $srv_fqdn"}]}
EOF
)|
cfssl gencert -ca ca.pem -ca-key ca.key \
-profile=www -hostname="$srv_fqdn" - |
cfssljson -bare "$srv_fqdn"
mv "$srv_fqdn-key.pem" "$srv_fqdn.key"
rm "$srv_fqdn.csr"
}
# create ca if not exist
[ -e ca.key ] ||
gen_ca
# always create server cert
gen_srv
# dump cert info
show() {
openssl x509 -text -noout -in $1 |
awk '!o; {o=0} /[0-9a-f:]{16}/{o=1}'
}
show ca.pem
show "$srv_fqdn.pem"
echo
echo "successfully generated new certificates"
# write cert into copyparty config
[ -z "$3" ] || {
mkdir -p ~/.config/copyparty
cat "$srv_fqdn".{key,pem} ca.pem >~/.config/copyparty/cert.pem
echo "successfully replaced copyparty certificate"
}
# rm *.key *.pem
# cfssl print-defaults config
# cfssl print-defaults csr

View file

@ -0,0 +1,31 @@
Windows Registry Editor Version 5.00
; this will do 3 things, all optional:
; 1) disable thumbnails
; 2) delete all existing folder type settings/detections
; 3) disable folder type detection (force default columns)
;
; this makes the file explorer way faster,
; especially on slow/networked locations
; =====================================================================
; 1) disable thumbnails
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"IconsOnly"=dword:00000001
; =====================================================================
; 2) delete all existing folder type settings/detections
[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags]
[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU]
; =====================================================================
; 3) disable folder type detection
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
"FolderType"="NotSpecified"

14
contrib/flameshot.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
set -e
# take a screenshot with flameshot and send it to copyparty;
# the image url will be placed on your clipboard
password=wark
url=https://a.ocv.me/up/
filename=$(date +%Y-%m%d-%H%M%S).png
flameshot gui -s -r |
curl -T- $url$filename?pw=$password |
tail -n 1 |
xsel -ib

View file

@ -0,0 +1,24 @@
# this config is essentially two separate examples;
#
# foo1 connects to copyparty using tcp, and
# foo2 uses unix-sockets for 27% higher performance
#
# to use foo2 you must run copyparty with one of the following:
#
# -i unix:777:/dev/shm/party.sock
# -i unix:777:/dev/shm/party.sock,127.0.0.1
defaults
mode http
option forwardfor
timeout connect 1s
timeout client 610s
timeout server 610s
listen foo1
bind *:8081
server srv1 127.0.0.1:3923 maxconn 512
listen foo2
bind *:8082
server srv1 /dev/shm/party.sock maxconn 512

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>🎉 redirect</title>
<title>💾🎉 redirect</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style>
@ -26,8 +26,8 @@ a {
<script>
var a = document.getElementById('redir'),
proto = window.location.protocol.indexOf('https') === 0 ? 'https' : 'http',
loc = window.location.hostname || '127.0.0.1',
proto = location.protocol.indexOf('https') === 0 ? 'https' : 'http',
loc = location.hostname || '127.0.0.1',
port = a.getAttribute('href').split(':').pop().split('/')[0],
url = proto + '://' + loc + ':' + port + '/';
@ -35,7 +35,7 @@ a.setAttribute('href', url);
document.getElementById('desc').innerHTML = 'redirecting to';
setTimeout(function() {
window.location.href = url;
location.href = url;
}, 500);
</script>

Binary file not shown.

10
contrib/ishare.iscu Normal file
View file

@ -0,0 +1,10 @@
{
"Name": "copyparty",
"RequestURL": "http://127.0.0.1:3923/screenshots/",
"Headers": {
"pw": "PUT_YOUR_PASSWORD_HERE_MY_DUDE",
"accept": "json"
},
"FileFormName": "f",
"ResponseURL": "{{fileurl}}"
}

View file

@ -0,0 +1,24 @@
# example usage for benchmarking:
#
# taskset -c 1 lighttpd -Df ~/dev/copyparty/contrib/lighttpd/subdomain.conf
#
# lighttpd can connect to copyparty using either tcp (127.0.0.1)
# or a unix-socket, but unix-sockets are 37% faster because
# lighttpd doesn't reuse tcp connections, so we're doing unix-sockets
#
# this means we must run copyparty with one of the following:
#
# -i unix:777:/dev/shm/party.sock
# -i unix:777:/dev/shm/party.sock,127.0.0.1
#
# on fedora/rhel, remember to setsebool -P httpd_can_network_connect 1
server.port = 80
server.document-root = "/var/empty"
server.upload-dirs = ( "/dev/shm", "/tmp" )
server.modules = ( "mod_proxy" )
proxy.forwarded = ( "for" => 1, "proto" => 1 )
proxy.server = ( "" => ( ( "host" => "/dev/shm/party.sock" ) ) )
# if you really need to use tcp instead of unix-sockets, do this instead:
#proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => "3923" ) ) )

View file

@ -0,0 +1,31 @@
# example usage for benchmarking:
#
# taskset -c 1 lighttpd -Df ~/dev/copyparty/contrib/lighttpd/subpath.conf
#
# lighttpd can connect to copyparty using either tcp (127.0.0.1)
# or a unix-socket, but unix-sockets are 37% faster because
# lighttpd doesn't reuse tcp connections, so we're doing unix-sockets
#
# this means we must run copyparty with one of the following:
#
# -i unix:777:/dev/shm/party.sock
# -i unix:777:/dev/shm/party.sock,127.0.0.1
#
# also since this example proxies a subpath instead of the
# recommended subdomain-proxying, we must also specify this:
#
# --rp-loc files
#
# on fedora/rhel, remember to setsebool -P httpd_can_network_connect 1
server.port = 80
server.document-root = "/var/empty"
server.upload-dirs = ( "/dev/shm", "/tmp" )
server.modules = ( "mod_proxy" )
$HTTP["url"] =~ "^/files" {
proxy.forwarded = ( "for" => 1, "proto" => 1 )
proxy.server = ( "" => ( ( "host" => "/dev/shm/party.sock" ) ) )
# if you really need to use tcp instead of unix-sockets, do this instead:
#proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => "3923" ) ) )
}

104
contrib/media-osd-bgone.ps1 Normal file
View file

@ -0,0 +1,104 @@
# media-osd-bgone.ps1: disable media-control OSD on win10do
# v1.1, 2021-06-25, ed <irc.rizon.net>, MIT-licensed
# https://github.com/9001/copyparty/blob/hovudstraum/contrib/media-osd-bgone.ps1
#
# locates the first window that looks like the media OSD and minimizes it;
# doing this once after each reboot should do the trick
# (adjust the width/height filter if it doesn't work)
#
# ---------------------------------------------------------------------
#
# tip: save the following as "media-osd-bgone.bat" next to this script:
# start cmd /c "powershell -command ""set-executionpolicy -scope process bypass; .\media-osd-bgone.ps1"" & ping -n 2 127.1 >nul"
#
# then create a shortcut to that bat-file and move the shortcut here:
# %appdata%\Microsoft\Windows\Start Menu\Programs\Startup
#
# and now this will autorun on bootup
Add-Type -TypeDefinition @"
using System;
using System.IO;
using System.Threading;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace A {
public class B : Control {
[DllImport("user32.dll")]
static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
[DllImport("user32.dll", SetLastError=true)]
static extern bool GetWindowRect(IntPtr hwnd, out RECT lpRect);
[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[StructLayout(LayoutKind.Sequential)]
public struct RECT {
public int x;
public int y;
public int x2;
public int y2;
}
bool fa() {
RECT r;
IntPtr it = IntPtr.Zero;
while ((it = FindWindowEx(IntPtr.Zero, it, "NativeHWNDHost", "")) != IntPtr.Zero) {
if (FindWindowEx(it, IntPtr.Zero, "DirectUIHWND", "") == IntPtr.Zero)
continue;
if (!GetWindowRect(it, out r))
continue;
int w = r.x2 - r.x + 1;
int h = r.y2 - r.y + 1;
Console.WriteLine("[*] hwnd {0:x} @ {1}x{2} sz {3}x{4}", it, r.x, r.y, w, h);
if (h != 141)
continue;
ShowWindow(it, 6);
Console.WriteLine("[+] poof");
return true;
}
return false;
}
void fb() {
keybd_event((byte)Keys.VolumeMute, 0, 0, 0);
keybd_event((byte)Keys.VolumeMute, 0, 2, 0);
Thread.Sleep(500);
keybd_event((byte)Keys.VolumeMute, 0, 0, 0);
keybd_event((byte)Keys.VolumeMute, 0, 2, 0);
while (true) {
if (fa()) {
break;
}
Console.WriteLine("[!] not found");
Thread.Sleep(1000);
}
this.Invoke((MethodInvoker)delegate {
Application.Exit();
});
}
public void Run() {
Console.WriteLine("[+] hi");
new Thread(new ThreadStart(fb)).Start();
Application.Run();
Console.WriteLine("[+] bye");
}
}
}
"@ -ReferencedAssemblies System.Windows.Forms
(New-Object -TypeName A.B).Run()

View file

@ -1,26 +1,103 @@
upstream cpp {
server 127.0.0.1:3923;
keepalive 120;
# look for "max clients:" when starting copyparty, as nginx should
# not accept more consecutive clients than what copyparty is able to;
# nginx default is 512 (worker_processes 1, worker_connections 512)
#
# ======================================================================
#
# to reverse-proxy a specific path/subpath/location below a domain
# (rather than a complete subdomain), for example "/qw/er", you must
# run copyparty with --rp-loc /qw/as and also change the following:
# location / {
# proxy_pass http://cpp_tcp;
# to this:
# location /qw/er/ {
# proxy_pass http://cpp_tcp/qw/er/;
#
# ======================================================================
#
# rarely, in some extreme usecases, it can be good to add -j0
# (40'000 requests per second, or 20gbps upload/download in parallel)
# but this is usually counterproductive and slightly buggy
#
# ======================================================================
#
# on fedora/rhel, remember to setsebool -P httpd_can_network_connect 1
#
# ======================================================================
#
# if you are behind cloudflare (or another CDN/WAF/protection service),
# remember to reject all connections which are not coming from your
# protection service -- for cloudflare in particular, you can
# generate the list of permitted IP ranges like so:
# (curl -s https://www.cloudflare.com/ips-v{4,6} | sed 's/^/allow /; s/$/;/'; echo; echo "deny all;") > /etc/nginx/cloudflare-only.conf
#
# and then enable it below by uncomenting the cloudflare-only.conf line
#
# ======================================================================
upstream cpp_tcp {
# alternative 1: connect to copyparty using tcp;
# cpp_uds is slightly faster and more secure, but
# cpp_tcp is easier to setup and "just works"
# ...you should however restrict copyparty to only
# accept connections from nginx by adding these args:
# -i 127.0.0.1
server 127.0.0.1:3923 fail_timeout=1s;
keepalive 1;
}
upstream cpp_uds {
# alternative 2: unix-socket, aka. "unix domain socket";
# 5-10% faster, and better isolation from other software,
# but there must be at least one unix-group which both
# nginx and copyparty is a member of; if that group is
# "www" then run copyparty with the following args:
# -i unix:770:www:/dev/shm/party.sock
server unix:/dev/shm/party.sock fail_timeout=1s;
keepalive 1;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name fs.example.com;
# uncomment the following line to reject non-cloudflare connections, ensuring client IPs cannot be spoofed:
#include /etc/nginx/cloudflare-only.conf;
location / {
proxy_pass http://cpp;
# recommendation: replace cpp_tcp with cpp_uds below
proxy_pass http://cpp_tcp;
proxy_redirect off;
# disable buffering (next 4 lines)
proxy_http_version 1.1;
client_max_body_size 0;
proxy_buffering off;
proxy_request_buffering off;
# improve download speed from 600 to 1500 MiB/s
proxy_buffers 32 8k;
proxy_buffer_size 16k;
proxy_busy_buffers_size 24k;
proxy_set_header Connection "Keep-Alive";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "Keep-Alive";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# NOTE: with cloudflare you want this X-Forwarded-For instead:
#proxy_set_header X-Forwarded-For $http_cf_connecting_ip;
}
}
# default client_max_body_size (1M) blocks uploads larger than 256 MiB
client_max_body_size 1024M;
client_header_timeout 610m;
client_body_timeout 610m;
send_timeout 610m;

View file

@ -0,0 +1,375 @@
{
config,
pkgs,
lib,
...
}:
with lib;
let
mkKeyValue =
key: value:
if value == true then
# sets with a true boolean value are coerced to just the key name
key
else if value == false then
# or omitted completely when false
""
else
(generators.mkKeyValueDefault { inherit mkValueString; } ": " key value);
mkAttrsString = value: (generators.toKeyValue { inherit mkKeyValue; } value);
mkValueString =
value:
if isList value then
(concatStringsSep "," (map mkValueString value))
else if isAttrs value then
"\n" + (mkAttrsString value)
else
(generators.mkValueStringDefault { } value);
mkSectionName = value: "[" + (escape [ "[" "]" ] value) + "]";
mkSection = name: attrs: ''
${mkSectionName name}
${mkAttrsString attrs}
'';
mkVolume = name: attrs: ''
${mkSectionName name}
${attrs.path}
${mkAttrsString {
accs = attrs.access;
flags = attrs.flags;
}}
'';
passwordPlaceholder = name: "{{password-${name}}}";
accountsWithPlaceholders = mapAttrs (name: attrs: passwordPlaceholder name);
configStr = ''
${mkSection "global" cfg.settings}
${mkSection "accounts" (accountsWithPlaceholders cfg.accounts)}
${concatStringsSep "\n" (mapAttrsToList mkVolume cfg.volumes)}
'';
cfg = config.services.copyparty;
configFile = pkgs.writeText "copyparty.conf" configStr;
runtimeConfigPath = "/run/copyparty/copyparty.conf";
externalCacheDir = "/var/cache/copyparty";
externalStateDir = "/var/lib/copyparty";
defaultShareDir = "${externalStateDir}/data";
in
{
options.services.copyparty = {
enable = mkEnableOption "web-based file manager";
package = mkOption {
type = types.package;
default = pkgs.copyparty;
defaultText = "pkgs.copyparty";
description = ''
Package of the application to run, exposed for overriding purposes.
'';
};
mkHashWrapper = mkOption {
type = types.bool;
default = true;
description = ''
Make a shell script wrapper called 'copyparty-hash' with all options set here,
that launches the hashing cli.
'';
};
user = mkOption {
type = types.str;
default = "copyparty";
description = ''
The user that copyparty will run under.
If changed from default, you are responsible for making sure the user exists.
'';
};
group = mkOption {
type = types.str;
default = "copyparty";
description = ''
The group that copyparty will run under.
If changed from default, you are responsible for making sure the user exists.
'';
};
openFilesLimit = mkOption {
default = 4096;
type = types.either types.int types.str;
description = "Number of files to allow copyparty to open.";
};
settings = mkOption {
type = types.attrs;
description = ''
Global settings to apply.
Directly maps to values in the [global] section of the copyparty config.
Cannot set "c" or "hist", those are set by this module.
See `${getExe cfg.package} --help` for more details.
'';
default = {
i = "127.0.0.1";
no-reload = true;
hist = externalCacheDir;
};
example = literalExpression ''
{
i = "0.0.0.0";
no-reload = true;
hist = ${externalCacheDir};
}
'';
};
accounts = mkOption {
type = types.attrsOf (
types.submodule (
{ ... }:
{
options = {
passwordFile = mkOption {
type = types.str;
description = ''
Runtime file path to a file containing the user password.
Must be readable by the copyparty user.
'';
example = "/run/keys/copyparty/ed";
};
};
}
)
);
description = ''
A set of copyparty accounts to create.
'';
default = { };
example = literalExpression ''
{
ed.passwordFile = "/run/keys/copyparty/ed";
};
'';
};
volumes = mkOption {
type = types.attrsOf (
types.submodule (
{ ... }:
{
options = {
path = mkOption {
type = types.path;
description = ''
Path of a directory to share.
'';
};
access = mkOption {
type = types.attrs;
description = ''
Attribute list of permissions and the users to apply them to.
The key must be a string containing any combination of allowed permission:
"r" (read): list folder contents, download files
"w" (write): upload files; need "r" to see the uploads
"m" (move): move files and folders; need "w" at destination
"d" (delete): permanently delete files and folders
"g" (get): download files, but cannot see folder contents
"G" (upget): "get", but can see filekeys of their own uploads
"h" (html): "get", but folders return their index.html
"a" (admin): can see uploader IPs, config-reload
For example: "rwmd"
The value must be one of:
an account name, defined in `accounts`
a list of account names
"*", which means "any account"
'';
example = literalExpression ''
{
# wG = write-upget = see your own uploads only
wG = "*";
# read-write-modify-delete for users "ed" and "k"
rwmd = ["ed" "k"];
};
'';
};
flags = mkOption {
type = types.attrs;
description = ''
Attribute list of volume flags to apply.
See `${getExe cfg.package} --help-flags` for more details.
'';
example = literalExpression ''
{
# "fk" enables filekeys (necessary for upget permission) (4 chars long)
fk = 4;
# scan for new files every 60sec
scan = 60;
# volflag "e2d" enables the uploads database
e2d = true;
# "d2t" disables multimedia parsers (in case the uploads are malicious)
d2t = true;
# skips hashing file contents if path matches *.iso
nohash = "\.iso$";
};
'';
default = { };
};
};
}
)
);
description = "A set of copyparty volumes to create";
default = {
"/" = {
path = defaultShareDir;
access = {
r = "*";
};
};
};
example = literalExpression ''
{
"/" = {
path = ${defaultShareDir};
access = {
# wG = write-upget = see your own uploads only
wG = "*";
# read-write-modify-delete for users "ed" and "k"
rwmd = ["ed" "k"];
};
};
};
'';
};
};
config = mkIf cfg.enable (
let
command = "${getExe cfg.package} -c ${runtimeConfigPath}";
in
{
systemd.services.copyparty = {
description = "http file sharing hub";
wantedBy = [ "multi-user.target" ];
environment = {
PYTHONUNBUFFERED = "true";
XDG_CONFIG_HOME = externalStateDir;
};
preStart =
let
replaceSecretCommand =
name: attrs:
"${getExe pkgs.replace-secret} '${passwordPlaceholder name}' '${attrs.passwordFile}' ${runtimeConfigPath}";
in
''
set -euo pipefail
install -m 600 ${configFile} ${runtimeConfigPath}
${concatStringsSep "\n" (mapAttrsToList replaceSecretCommand cfg.accounts)}
'';
serviceConfig = {
Type = "simple";
ExecStart = command;
# Hardening options
User = cfg.user;
Group = cfg.group;
RuntimeDirectory = [ "copyparty" ];
RuntimeDirectoryMode = "0700";
StateDirectory = [ "copyparty" ];
StateDirectoryMode = "0700";
CacheDirectory = lib.mkIf (cfg.settings ? hist) [ "copyparty" ];
CacheDirectoryMode = lib.mkIf (cfg.settings ? hist) "0700";
WorkingDirectory = externalStateDir;
BindReadOnlyPaths = [
"/nix/store"
"-/etc/resolv.conf"
"-/etc/nsswitch.conf"
"-/etc/group"
"-/etc/hosts"
"-/etc/localtime"
] ++ (mapAttrsToList (k: v: "-${v.passwordFile}") cfg.accounts);
BindPaths =
(if cfg.settings ? hist then [ cfg.settings.hist ] else [ ])
++ [ externalStateDir ]
++ (mapAttrsToList (k: v: v.path) cfg.volumes);
# ProtectSystem = "strict";
# Note that unlike what 'ro' implies,
# this actually makes it impossible to read anything in the root FS,
# except for things explicitly mounted via `RuntimeDirectory`, `StateDirectory`, `CacheDirectory`, and `BindReadOnlyPaths`.
# This is because TemporaryFileSystem creates a *new* *empty* filesystem for the process, so only bindmounts are visible.
TemporaryFileSystem = "/:ro";
PrivateTmp = true;
PrivateDevices = true;
ProtectKernelTunables = true;
ProtectControlGroups = true;
RestrictSUIDSGID = true;
PrivateMounts = true;
ProtectKernelModules = true;
ProtectKernelLogs = true;
ProtectHostname = true;
ProtectClock = true;
ProtectProc = "invisible";
ProcSubset = "pid";
RestrictNamespaces = true;
RemoveIPC = true;
UMask = "0077";
LimitNOFILE = cfg.openFilesLimit;
NoNewPrivileges = true;
LockPersonality = true;
RestrictRealtime = true;
MemoryDenyWriteExecute = true;
};
};
# ensure volumes exist:
systemd.tmpfiles.settings."copyparty" = (
lib.attrsets.mapAttrs' (
name: value:
lib.attrsets.nameValuePair (value.path) {
d = {
#: in front of things means it wont change it if the directory already exists.
group = ":${cfg.group}";
user = ":${cfg.user}";
mode = ":755";
};
}
) cfg.volumes
);
users.groups.copyparty = lib.mkIf (cfg.user == "copyparty" && cfg.group == "copyparty") { };
users.users.copyparty = lib.mkIf (cfg.user == "copyparty" && cfg.group == "copyparty") {
description = "Service user for copyparty";
group = "copyparty";
home = externalStateDir;
isSystemUser = true;
};
environment.systemPackages = lib.mkIf cfg.mkHashWrapper [
(pkgs.writeShellScriptBin "copyparty-hash" ''
set -a # automatically export variables
# set same environment variables as the systemd service
${lib.pipe config.systemd.services.copyparty.environment [
(lib.filterAttrs (n: v: v != null && n != "PATH"))
(lib.mapAttrs (_: v: "${v}"))
(lib.toShellVars)
]}
PATH=${config.systemd.services.copyparty.environment.PATH}:$PATH
exec ${command} --ah-cli
'')
];
}
);
}

View file

@ -8,11 +8,11 @@
#
# you may want to:
# change '/usr/bin/python' to another interpreter
# change '/mnt::a' to another location or permission-set
# change '/mnt::rw' to another location or permission-set
name="$SVCNAME"
command_background=true
pidfile="/var/run/$SVCNAME.pid"
command="/usr/bin/python /usr/local/bin/copyparty-sfx.py"
command_args="-q -v /mnt::a"
command="/usr/bin/python3 /usr/local/bin/copyparty-sfx.py"
command_args="-q -v /mnt::rw"

View file

@ -0,0 +1,48 @@
# Maintainer: icxes <dev.null@need.moe>
# Contributor: Morgan Adamiec <morganamilo@archlinux.org>
# NOTE: You generally shouldn't use this PKGBUILD on Arch, as it is mainly for testing purposes. Install copyparty using pacman instead.
pkgname=copyparty
pkgver="1.19.2"
pkgrel=1
pkgdesc="File server with accelerated resumable uploads, dedup, WebDAV, FTP, TFTP, zeroconf, media indexer, thumbnails++"
arch=("any")
url="https://github.com/9001/${pkgname}"
license=('MIT')
depends=("bash" "python" "lsof" "python-jinja")
makedepends=("python-wheel" "python-setuptools" "python-build" "python-installer" "make" "pigz")
optdepends=("ffmpeg: thumbnails for videos, images (slower) and audio, music tags"
"cfssl: generate TLS certificates on startup"
"python-mutagen: music tags (alternative)"
"python-pillow: thumbnails for images"
"python-pyvips: thumbnails for images (higher quality, faster, uses more ram)"
"libkeyfinder: detection of musical keys"
"python-pyopenssl: ftps functionality"
"python-pyzmq: send zeromq messages from event-hooks"
"python-argon2-cffi: hashed passwords in config"
)
source=("https://github.com/9001/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
backup=("etc/${pkgname}/copyparty.conf" )
sha256sums=("9f0dcd8124f260a0c72676b70d84c82388cfe5b47e7d0556f5190c88208580a2")
build() {
cd "${srcdir}/${pkgname}-${pkgver}/copyparty/web"
make
cd "${srcdir}/${pkgname}-${pkgver}"
python -m build --wheel --no-isolation
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
python -m installer --destdir="$pkgdir" dist/*.whl
install -dm755 "${pkgdir}/etc/${pkgname}"
install -Dm755 "bin/prisonparty.sh" "${pkgdir}/usr/bin/prisonparty"
install -Dm644 "contrib/systemd/${pkgname}.conf" "${pkgdir}/etc/${pkgname}/copyparty.conf"
install -Dm644 "contrib/systemd/${pkgname}@.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}@.service"
install -Dm644 "contrib/systemd/${pkgname}-user.service" "${pkgdir}/usr/lib/systemd/user/${pkgname}.service"
install -Dm644 "contrib/systemd/prisonparty@.service" "${pkgdir}/usr/lib/systemd/system/prisonparty@.service"
install -Dm644 "contrib/systemd/index.md" "${pkgdir}/var/lib/${pkgname}-jail/README.md"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View file

@ -0,0 +1,44 @@
# Contributor: Beethoven <beethovenisadog@protonmail.com>
pkgname=copyparty
pkgver=1.19.2
pkgrel=1
pkgdesc="File server with accelerated resumable uploads, dedup, WebDAV, FTP, TFTP, zeroconf, media indexer, thumbnails++"
arch=("any")
url="https://github.com/9001/${pkgname}"
license=('MIT')
depends=("bash" "python3" "lsof" "python3-jinja2")
makedepends=("python3-wheel" "python3-setuptools" "python3-build" "python3-installer" "make" "pigz")
optdepends=("ffmpeg: thumbnails for videos, images (slower) and audio, music tags"
"golang-cfssl: generate TLS certificates on startup"
"python3-mutagen: music tags (alternative)"
"python3-pil: thumbnails for images"
"python3-openssl: ftps functionality"
"python3-zmq: send zeromq messages from event-hooks"
"python3-argon2: hashed passwords in config"
)
source=("https://github.com/9001/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
backup=("/etc/${pkgname}.d/init" )
sha256sums=("9f0dcd8124f260a0c72676b70d84c82388cfe5b47e7d0556f5190c88208580a2")
build() {
cd "${srcdir}/${pkgname}-${pkgver}/copyparty/web"
make
cd "${srcdir}/${pkgname}-${pkgver}"
python -m build --wheel --no-isolation
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
python -m installer --destdir="$pkgdir" dist/*.whl
install -dm755 "${pkgdir}/etc/${pkgname}.d"
install -Dm755 "bin/prisonparty.sh" "${pkgdir}/usr/bin/prisonparty"
install -Dm644 "contrib/package/makedeb-mpr/${pkgname}.conf" "${pkgdir}/etc/${pkgname}.d/init"
install -Dm644 "contrib/package/makedeb-mpr/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
install -Dm644 "contrib/package/makedeb-mpr/prisonparty.service" "${pkgdir}/usr/lib/systemd/system/prisonparty.service"
install -Dm644 "contrib/package/makedeb-mpr/index.md" "${pkgdir}/var/lib/${pkgname}-jail/README.md"
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View file

@ -0,0 +1,7 @@
## import all *.conf files from the current folder (/etc/copyparty.d)
% ./
# add additional .conf files to this folder;
# see example config files for reference:
# https://github.com/9001/copyparty/blob/hovudstraum/docs/example.conf
# https://github.com/9001/copyparty/tree/hovudstraum/docs/copyparty.d

View file

@ -0,0 +1,32 @@
# this will start `/usr/bin/copyparty-sfx.py`
# and read config from `/etc/copyparty.d/*.conf`
#
# you probably want to:
# change "User=cpp" and "/home/cpp/" to another user
#
# unless you add -q to disable logging, you may want to remove the
# following line to allow buffering (slightly better performance):
# Environment=PYTHONUNBUFFERED=x
[Unit]
Description=copyparty file server
[Service]
Type=notify
SyslogIdentifier=copyparty
Environment=PYTHONUNBUFFERED=x
WorkingDirectory=/var/lib/copyparty-jail
ExecReload=/bin/kill -s USR1 $MAINPID
# user to run as + where the TLS certificate is (if any)
User=cpp
Environment=XDG_CONFIG_HOME=/home/cpp/.config
# stop systemd-tmpfiles-clean.timer from deleting copyparty while it's running
ExecStartPre=+/bin/bash -c 'mkdir -p /run/tmpfiles.d/ && echo "x /tmp/pe-copyparty*" > /run/tmpfiles.d/copyparty.conf'
# run copyparty
ExecStart=/usr/bin/python3 /usr/bin/copyparty -c /etc/copyparty.d/init
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,3 @@
this is `/var/lib/copyparty-jail`, the fallback webroot when copyparty has not yet been configured
please add some `*.conf` files to `/etc/copyparty.d/`

View file

@ -0,0 +1,33 @@
# this will start `/usr/bin/copyparty-sfx.py`
# in a chroot, preventing accidental access elsewhere,
# and read copyparty config from `/etc/copyparty.d/*.conf`
#
# expose additional filesystem locations to copyparty
# by listing them between the last `cpp` and `--`
#
# `cpp cpp` = user/group to run copyparty as; can be IDs (1000 1000)
#
# unless you add -q to disable logging, you may want to remove the
# following line to allow buffering (slightly better performance):
# Environment=PYTHONUNBUFFERED=x
[Unit]
Description=copyparty file server
[Service]
SyslogIdentifier=prisonparty
Environment=PYTHONUNBUFFERED=x
WorkingDirectory=/var/lib/copyparty-jail
ExecReload=/bin/kill -s USR1 $MAINPID
# stop systemd-tmpfiles-clean.timer from deleting copyparty while it's running
ExecStartPre=+/bin/bash -c 'mkdir -p /run/tmpfiles.d/ && echo "x /tmp/pe-copyparty*" > /run/tmpfiles.d/copyparty.conf'
# run copyparty
ExecStart=/bin/bash /usr/bin/prisonparty /var/lib/copyparty-jail cpp cpp \
/etc/copyparty.d \
-- \
/usr/bin/python3 /usr/bin/copyparty -c /etc/copyparty.d/init
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,118 @@
{
lib,
buildPythonApplication,
fetchurl,
util-linux,
python,
setuptools,
jinja2,
impacket,
pyopenssl,
cfssl,
argon2-cffi,
pillow,
pyvips,
pyzmq,
ffmpeg,
mutagen,
pyftpdlib,
magic,
partftpy,
fusepy, # for partyfuse
# use argon2id-hashed passwords in config files (sha2 is always available)
withHashedPasswords ? true,
# generate TLS certificates on startup (pointless when reverse-proxied)
withCertgen ? false,
# create thumbnails with Pillow; faster than FFmpeg / MediaProcessing
withThumbnails ? true,
# create thumbnails with PyVIPS; even faster, uses more memory
# -- can be combined with Pillow to support more filetypes
withFastThumbnails ? false,
# enable FFmpeg; thumbnails for most filetypes (also video and audio), extract audio metadata, transcode audio to opus
# -- possibly dangerous if you allow anonymous uploads, since FFmpeg has a huge attack surface
# -- can be combined with Thumbnails and/or FastThumbnails, since FFmpeg is slower than both
withMediaProcessing ? true,
# if MediaProcessing is not enabled, you probably want this instead (less accurate, but much safer and faster)
withBasicAudioMetadata ? false,
# send ZeroMQ messages from event-hooks
withZeroMQ ? true,
# enable FTP server
withFTP ? true,
# enable FTPS support in the FTP server
withFTPS ? false,
# enable TFTP server
withTFTP ? false,
# samba/cifs server; dangerous and buggy, enable if you really need it
withSMB ? false,
# enables filetype detection for nameless uploads
withMagic ? false,
# extra packages to add to the PATH
extraPackages ? [ ],
# function that accepts a python packageset and returns a list of packages to
# be added to the python venv. useful for scripts and such that require
# additional dependencies
extraPythonPackages ? (_p: [ ]),
}:
let
pinData = lib.importJSON ./pin.json;
runtimeDeps = ([ util-linux ] ++ extraPackages ++ lib.optional withMediaProcessing ffmpeg);
in
buildPythonApplication {
pname = "copyparty";
inherit (pinData) version;
src = fetchurl {
inherit (pinData) url hash;
};
dependencies =
[
jinja2
fusepy
]
++ lib.optional withSMB impacket
++ lib.optional withFTP pyftpdlib
++ lib.optional withFTPS pyopenssl
++ lib.optional withTFTP partftpy
++ lib.optional withCertgen cfssl
++ lib.optional withThumbnails pillow
++ lib.optional withFastThumbnails pyvips
++ lib.optional withMediaProcessing ffmpeg
++ lib.optional withBasicAudioMetadata mutagen
++ lib.optional withHashedPasswords argon2-cffi
++ lib.optional withZeroMQ pyzmq
++ lib.optional withMagic magic
++ (extraPythonPackages python.pkgs);
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath runtimeDeps}" ];
pyproject = true;
build-system = [
setuptools
];
meta = {
description = "Turn almost any device into a file server";
longDescription = ''
Portable file server with accelerated resumable uploads, dedup, WebDAV,
FTP, TFTP, zeroconf, media indexer, thumbnails++ all in one file, no deps
'';
homepage = "https://github.com/9001/copyparty";
changelog = "https://github.com/9001/copyparty/releases/tag/v${pinData.version}";
license = lib.licenses.mit;
mainProgram = "copyparty";
sourceProvenance = [ lib.sourceTypes.fromSource ];
};
}

View file

@ -0,0 +1,5 @@
{
"url": "https://github.com/9001/copyparty/releases/download/v1.19.2/copyparty-1.19.2.tar.gz",
"version": "1.19.2",
"hash": "sha256-nw3NgSTyYKDHJna3DYTII4jP5bR+fQVW9RkMiCCFgKI="
}

View file

@ -0,0 +1,78 @@
#!/usr/bin/env python3
# Update the Nix package pin
#
# Usage: ./update.sh [PATH]
# When the [PATH] is not set, it will fetch the latest release from the repo.
# With [PATH] set, it will hash the given file and generate the URL,
# base on the version contained within the file
import base64
import json
import hashlib
import sys
import tarfile
from pathlib import Path
OUTPUT_FILE = Path("pin.json")
TARGET_ASSET = lambda version: f"copyparty-{version}.tar.gz"
HASH_TYPE = "sha256"
LATEST_RELEASE_URL = "https://api.github.com/repos/9001/copyparty/releases/latest"
DOWNLOAD_URL = lambda version: f"https://github.com/9001/copyparty/releases/download/v{version}/{TARGET_ASSET(version)}"
def get_formatted_hash(binary):
hasher = hashlib.new("sha256")
hasher.update(binary)
asset_hash = hasher.digest()
encoded_hash = base64.b64encode(asset_hash).decode("ascii")
return f"{HASH_TYPE}-{encoded_hash}"
def version_from_tar_gz(path):
with tarfile.open(path) as tarball:
release_name = tarball.getmembers()[0].name
prefix = "copyparty-"
if release_name.startswith(prefix):
return release_name.replace(prefix, "")
raise ValueError("version not found in provided file")
def remote_release_pin():
import requests
response = requests.get(LATEST_RELEASE_URL).json()
version = response["tag_name"].lstrip("v")
asset_info = [a for a in response["assets"] if a["name"] == TARGET_ASSET(version)][0]
download_url = asset_info["browser_download_url"]
asset = requests.get(download_url)
formatted_hash = get_formatted_hash(asset.content)
result = {"url": download_url, "version": version, "hash": formatted_hash}
return result
def local_release_pin(path):
version = version_from_tar_gz(path)
download_url = DOWNLOAD_URL(version)
formatted_hash = get_formatted_hash(path.read_bytes())
result = {"url": download_url, "version": version, "hash": formatted_hash}
return result
def main():
if len(sys.argv) > 1:
asset_path = Path(sys.argv[1])
result = local_release_pin(asset_path)
else:
result = remote_release_pin()
print(result)
json_result = json.dumps(result, indent=4)
OUTPUT_FILE.write_text(json_result)
if __name__ == "__main__":
main()

Some files were not shown because too many files have changed in this diff Show more