copyparty 1.16.11__tar.gz → 1.16.13__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. {copyparty-1.16.11 → copyparty-1.16.13}/PKG-INFO +226 -6
  2. {copyparty-1.16.11 → copyparty-1.16.13}/README.md +225 -5
  3. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/__main__.py +6 -2
  4. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/__version__.py +2 -2
  5. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/authsrv.py +56 -7
  6. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/cfg.py +40 -1
  7. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/httpcli.py +93 -26
  8. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/metrics.py +1 -1
  9. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/multicast.py +1 -0
  10. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/svchub.py +1 -1
  11. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/up2k.py +2 -2
  12. copyparty-1.16.13/copyparty/web/baguettebox.js.gz +0 -0
  13. copyparty-1.16.13/copyparty/web/browser.css.gz +0 -0
  14. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/browser.html +0 -2
  15. copyparty-1.16.13/copyparty/web/browser.js.gz +0 -0
  16. copyparty-1.16.13/copyparty/web/deps/marked.js.gz +0 -0
  17. copyparty-1.16.13/copyparty/web/util.js.gz +0 -0
  18. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty.egg-info/PKG-INFO +226 -6
  19. copyparty-1.16.11/copyparty/web/baguettebox.js.gz +0 -0
  20. copyparty-1.16.11/copyparty/web/browser.css.gz +0 -0
  21. copyparty-1.16.11/copyparty/web/browser.js.gz +0 -0
  22. copyparty-1.16.11/copyparty/web/deps/marked.js.gz +0 -0
  23. copyparty-1.16.11/copyparty/web/util.js.gz +0 -0
  24. {copyparty-1.16.11 → copyparty-1.16.13}/LICENSE +0 -0
  25. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/__init__.py +0 -0
  26. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/bos/__init__.py +0 -0
  27. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/bos/bos.py +0 -0
  28. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/bos/path.py +0 -0
  29. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/broker_mp.py +0 -0
  30. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/broker_mpw.py +0 -0
  31. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/broker_thr.py +0 -0
  32. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/broker_util.py +0 -0
  33. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/cert.py +0 -0
  34. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/dxml.py +0 -0
  35. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/fsutil.py +0 -0
  36. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/ftpd.py +0 -0
  37. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/httpconn.py +0 -0
  38. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/httpsrv.py +0 -0
  39. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/ico.py +0 -0
  40. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/mdns.py +0 -0
  41. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/mtag.py +0 -0
  42. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/pwhash.py +0 -0
  43. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/res/COPYING.txt +0 -0
  44. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/res/__init__.py +0 -0
  45. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/res/insecure.pem +0 -0
  46. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/smbd.py +0 -0
  47. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/ssdp.py +0 -0
  48. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/star.py +0 -0
  49. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/__init__.py +0 -0
  50. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/dnslib/__init__.py +0 -0
  51. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/dnslib/bimap.py +0 -0
  52. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/dnslib/bit.py +0 -0
  53. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/dnslib/buffer.py +0 -0
  54. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/dnslib/dns.py +0 -0
  55. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/dnslib/label.py +0 -0
  56. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/dnslib/lex.py +0 -0
  57. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/dnslib/ranges.py +0 -0
  58. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/ifaddr/__init__.py +0 -0
  59. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/ifaddr/_posix.py +0 -0
  60. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/ifaddr/_shared.py +0 -0
  61. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/ifaddr/_win32.py +0 -0
  62. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/qrcodegen.py +0 -0
  63. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/stolen/surrogateescape.py +0 -0
  64. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/sutil.py +0 -0
  65. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/szip.py +0 -0
  66. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/tcpsrv.py +0 -0
  67. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/tftpd.py +0 -0
  68. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/th_cli.py +0 -0
  69. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/th_srv.py +0 -0
  70. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/u2idx.py +0 -0
  71. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/util.py +0 -0
  72. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/a/__init__.py +0 -0
  73. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/a/partyfuse.py +0 -0
  74. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/a/u2c.py +0 -0
  75. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/a/webdav-cfg.bat +0 -0
  76. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/browser2.html +0 -0
  77. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/cf.html +0 -0
  78. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/dbg-audio.js.gz +0 -0
  79. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/dd/2.png +0 -0
  80. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/dd/3.png +0 -0
  81. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/dd/4.png +0 -0
  82. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/dd/5.png +0 -0
  83. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/dd/__init__.py +0 -0
  84. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/__init__.py +0 -0
  85. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/busy.mp3.gz +0 -0
  86. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/easymde.css.gz +0 -0
  87. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/easymde.js.gz +0 -0
  88. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/fuse.py +0 -0
  89. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/mini-fa.css.gz +0 -0
  90. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/mini-fa.woff +0 -0
  91. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/prism.css.gz +0 -0
  92. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/prism.js.gz +0 -0
  93. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/prismd.css.gz +0 -0
  94. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/scp.woff2 +0 -0
  95. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/sha512.ac.js.gz +0 -0
  96. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/deps/sha512.hw.js.gz +0 -0
  97. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/md.css.gz +0 -0
  98. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/md.html +0 -0
  99. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/md.js.gz +0 -0
  100. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/md2.css.gz +0 -0
  101. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/md2.js.gz +0 -0
  102. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/mde.css.gz +0 -0
  103. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/mde.html +0 -0
  104. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/mde.js.gz +0 -0
  105. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/msg.css.gz +0 -0
  106. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/msg.html +0 -0
  107. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/rups.css.gz +0 -0
  108. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/rups.html +0 -0
  109. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/rups.js.gz +0 -0
  110. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/shares.css.gz +0 -0
  111. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/shares.html +0 -0
  112. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/shares.js.gz +0 -0
  113. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/splash.css.gz +0 -0
  114. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/splash.html +0 -0
  115. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/splash.js.gz +0 -0
  116. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/svcs.html +0 -0
  117. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/svcs.js.gz +0 -0
  118. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/ui.css.gz +0 -0
  119. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/up2k.js.gz +0 -0
  120. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty/web/w.hash.js.gz +0 -0
  121. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty.egg-info/SOURCES.txt +0 -0
  122. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty.egg-info/dependency_links.txt +0 -0
  123. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty.egg-info/entry_points.txt +0 -0
  124. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty.egg-info/requires.txt +0 -0
  125. {copyparty-1.16.11 → copyparty-1.16.13}/copyparty.egg-info/top_level.txt +0 -0
  126. {copyparty-1.16.11 → copyparty-1.16.13}/pyproject.toml +0 -0
  127. {copyparty-1.16.11 → copyparty-1.16.13}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: copyparty
3
- Version: 1.16.11
3
+ Version: 1.16.13
4
4
  Summary: Portable file server with accelerated resumable uploads, deduplication, WebDAV, FTP, zeroconf, media indexer, video thumbnails, audio transcoding, and write-only folders
5
5
  Author-email: ed <copyparty@ocv.me>
6
6
  License: MIT
@@ -201,6 +201,9 @@ just run **[copyparty-sfx.py](https://github.com/9001/copyparty/releases/latest/
201
201
  * or if you are on android, [install copyparty in termux](#install-on-android)
202
202
  * or maybe you have a [synology nas / dsm](./docs/synology-dsm.md)
203
203
  * or if your computer is messed up and nothing else works, [try the pyz](#zipapp)
204
+ * or if you don't trust copyparty yet and want to isolate it a little, then...
205
+ * ...maybe [prisonparty](./bin/prisonparty.sh) to create a tiny [chroot](https://wiki.archlinux.org/title/Chroot) (very portable),
206
+ * ...or [bubbleparty](./bin/bubbleparty.sh) to wrap it in [bubblewrap](https://github.com/containers/bubblewrap) (much better)
204
207
  * or if you prefer to [use docker](./scripts/docker/) 🐋 you can do that too
205
208
  * docker has all deps built-in, so skip this step:
206
209
 
@@ -312,7 +315,7 @@ also see [comparison to similar software](./docs/versus.md)
312
315
  * ☑ search by name/path/date/size
313
316
  * ☑ [search by ID3-tags etc.](#searching)
314
317
  * client support
315
- * ☑ [folder sync](#folder-sync)
318
+ * ☑ [folder sync](#folder-sync) (one-way only; full sync will never be supported)
316
319
  * ☑ [curl-friendly](https://user-images.githubusercontent.com/241032/215322619-ea5fd606-3654-40ad-94ee-2bc058647bb2.png)
317
320
  * ☑ [opengraph](#opengraph) (discord embeds)
318
321
  * markdown
@@ -529,6 +532,40 @@ examples:
529
532
 
530
533
  anyone trying to bruteforce a password gets banned according to `--ban-pw`; default is 24h ban for 9 failed attempts in 1 hour
531
534
 
535
+ and if you want to use config files instead of commandline args (good!) then here's the same examples as a configfile; save it as `foobar.conf` and use it like this: `python copyparty-sfx.py -c foobar.conf`
536
+
537
+ ```yaml
538
+ [accounts]
539
+ u1: p1 # create account "u1" with password "p1"
540
+ u2: p2 # (note that comments must have
541
+ u3: p3 # two spaces before the # sign)
542
+
543
+ [/] # this URL will be mapped to...
544
+ /srv # ...this folder on the server filesystem
545
+ accs:
546
+ r: * # read-only for everyone, no account necessary
547
+
548
+ [/music] # create another volume at this URL,
549
+ /mnt/music # which is mapped to this folder
550
+ accs:
551
+ r: u1, u2 # only these accounts can read,
552
+ rw: u3 # and only u3 can read-write
553
+
554
+ [/inc]
555
+ /mnt/incoming
556
+ accs:
557
+ w: u1 # u1 can upload but not see/download any files,
558
+ rm: u2 # u2 can browse + move files out of this volume
559
+
560
+ [/i]
561
+ /mnt/ss
562
+ accs:
563
+ rw: u1 # u1 can read-write,
564
+ g: * # everyone can access files if they know the URL
565
+ flags:
566
+ fk: 4 # each file URL will have a 4-character password
567
+ ```
568
+
532
569
 
533
570
  ## shadowing
534
571
 
@@ -536,6 +573,8 @@ hiding specific subfolders by mounting another volume on top of them
536
573
 
537
574
  for example `-v /mnt::r -v /var/empty:web/certs:r` mounts the server folder `/mnt` as the webroot, but another volume is mounted at `/web/certs` -- so visitors can only see the contents of `/mnt` and `/mnt/web` (at URLs `/` and `/web`), but not `/mnt/web/certs` because URL `/web/certs` is mapped to `/var/empty`
538
575
 
576
+ the example config file right above this section may explain this better; the first volume `/` is mapped to `/srv` which means http://127.0.0.1:3923/music would try to read `/srv/music` on the server filesystem, but since there's another volume at `/music` mapped to `/mnt/music` then it'll go to `/mnt/music` instead
577
+
539
578
 
540
579
  ## dotfiles
541
580
 
@@ -547,6 +586,19 @@ a client can request to see dotfiles in directory listings if global option `-ed
547
586
 
548
587
  dotfiles do not appear in search results unless one of the above is true, **and** the global option / volflag `dotsrch` is set
549
588
 
589
+ config file example, where the same permission to see dotfiles is given in two different ways just for reference:
590
+
591
+ ```yaml
592
+ [/foo]
593
+ /srv/foo
594
+ accs:
595
+ r.: ed # user "ed" has read-access + dot-access in this volume;
596
+ # dotfiles are visible in listings, but not in searches
597
+ flags:
598
+ dotsrch # dotfiles will now appear in search results too
599
+ dots # another way to let everyone see dotfiles in this vol
600
+ ```
601
+
550
602
 
551
603
  # the browser
552
604
 
@@ -669,6 +721,26 @@ enabling `multiselect` lets you click files to select them, and then shift-click
669
721
  * `multiselect` is mostly intended for phones/tablets, but the `sel` option in the `[⚙️] settings` tab is better suited for desktop use, allowing selection by CTRL-clicking and range-selection with SHIFT-click, all without affecting regular clicking
670
722
  * the `sel` option can be made default globally with `--gsel` or per-volume with volflag `gsel`
671
723
 
724
+ to show `/icons/exe.png` as the thumbnail for all .exe files, `--ext-th=exe=/icons/exe.png` (optionally as a volflag)
725
+
726
+ config file example:
727
+
728
+ ```yaml
729
+ [global]
730
+ no-thumb # disable ALL thumbnails and audio transcoding
731
+ no-vthumb # only disable video thumbnails
732
+
733
+ [/music]
734
+ /mnt/nas/music
735
+ accs:
736
+ r: * # everyone can read
737
+ flags:
738
+ dthumb # disable ALL thumbnails and audio transcoding
739
+ dvthumb # only disable video thumbnails
740
+ ext-th: exe=/ico/exe.png # /ico/exe.png is the thumbnail of *.exe
741
+ th-covers: folder.png,folder.jpg,cover.png,cover.jpg # the default
742
+ ```
743
+
672
744
 
673
745
  ## zip downloads
674
746
 
@@ -793,6 +865,14 @@ undo/delete accidental uploads using the `[🧯]` tab in the UI
793
865
 
794
866
  you can unpost even if you don't have regular move/delete access, however only for files uploaded within the past `--unpost` seconds (default 12 hours) and the server must be running with `-e2d`
795
867
 
868
+ config file example:
869
+
870
+ ```yaml
871
+ [global]
872
+ e2d # enable up2k database (remember uploads)
873
+ unpost: 43200 # 12 hours (default)
874
+ ```
875
+
796
876
 
797
877
  ### self-destruct
798
878
 
@@ -958,6 +1038,15 @@ will show uploader IP and upload-time if the visitor has the admin permission
958
1038
 
959
1039
  note that the [🧯 unpost](#unpost) feature is better suited for viewing *your own* recent uploads, as it includes the option to undo/delete them
960
1040
 
1041
+ config file example:
1042
+
1043
+ ```yaml
1044
+ [global]
1045
+ ups-when # everyone can see upload times
1046
+ ups-who: 1 # but only admins can see the list,
1047
+ # so ups-when doesn't take effect
1048
+ ```
1049
+
961
1050
 
962
1051
  ## media player
963
1052
 
@@ -1102,7 +1191,16 @@ using arguments or config files, or a mix of both:
1102
1191
 
1103
1192
  announce enabled services on the LAN ([pic](https://user-images.githubusercontent.com/241032/215344737-0eae8d98-9496-4256-9aa8-cd2f6971810d.png)) -- `-z` enables both [mdns](#mdns) and [ssdp](#ssdp)
1104
1193
 
1105
- * `--z-on` / `--z-off`' limits the feature to certain networks
1194
+ * `--z-on` / `--z-off` limits the feature to certain networks
1195
+
1196
+ config file example:
1197
+
1198
+ ```yaml
1199
+ [global]
1200
+ z # enable all zeroconf features (mdns, ssdp)
1201
+ zm # only enables mdns (does nothing since we already have z)
1202
+ z-on: 192.168.0.0/16, 10.1.2.0/24 # restrict to certain subnets
1203
+ ```
1106
1204
 
1107
1205
 
1108
1206
  ### mdns
@@ -1243,7 +1341,7 @@ dependencies: `python3 -m pip install --user -U impacket==0.11.0`
1243
1341
 
1244
1342
  some **BIG WARNINGS** specific to SMB/CIFS, in decreasing importance:
1245
1343
  * not entirely confident that read-only is read-only
1246
- * the smb backend is not fully integrated with vfs, meaning there could be security issues (path traversal). Please use `--smb-port` (see below) and [prisonparty](./bin/prisonparty.sh)
1344
+ * the smb backend is not fully integrated with vfs, meaning there could be security issues (path traversal). Please use `--smb-port` (see below) and [prisonparty](./bin/prisonparty.sh) or [bubbleparty](./bin/bubbleparty.sh)
1247
1345
  * account passwords work per-volume as expected, and so does account permissions (read/write/move/delete), but `--smbw` must be given to allow write-access from smb
1248
1346
  * [shadowing](#shadowing) probably works as expected but no guarantees
1249
1347
 
@@ -1329,6 +1427,18 @@ advantages of using symlinks (default):
1329
1427
 
1330
1428
  global-option `--xlink` / volflag `xlink` additionally enables deduplication across volumes, but this is probably buggy and not recommended
1331
1429
 
1430
+ config file example:
1431
+
1432
+ ```yaml
1433
+ [global]
1434
+ e2dsa # scan and index filesystem on startup
1435
+ dedup # symlink-based deduplication for all volumes
1436
+
1437
+ [/media]
1438
+ /mnt/nas/media
1439
+ flags:
1440
+ hardlinkonly # this vol does hardlinks instead of symlinks
1441
+ ```
1332
1442
 
1333
1443
 
1334
1444
  ## file indexing
@@ -1360,6 +1470,14 @@ note:
1360
1470
  * `e2tsr` is probably always overkill, since `e2ds`/`e2dsa` would pick up any file modifications and `e2ts` would then reindex those, unless there is a new copyparty version with new parsers and the release note says otherwise
1361
1471
  * the rescan button in the admin panel has no effect unless the volume has `-e2ds` or higher
1362
1472
 
1473
+ config file example (these options are recommended btw):
1474
+
1475
+ ```yaml
1476
+ [global]
1477
+ e2dsa # scan and index all files in all volumes on startup
1478
+ e2ts # check newly-discovered or uploaded files for media tags
1479
+ ```
1480
+
1363
1481
  ### exclude-patterns
1364
1482
 
1365
1483
  to save some time, you can provide a regex pattern for filepaths to only index by filename/path/size/last-modified (and not the hash of the file contents) by setting `--no-hash '\.iso$'` or the volflag `:c,nohash=\.iso$`, this has the following consequences:
@@ -1369,12 +1487,24 @@ to save some time, you can provide a regex pattern for filepaths to only index
1369
1487
 
1370
1488
  similarly, you can fully ignore files/folders using `--no-idx [...]` and `:c,noidx=\.iso$`
1371
1489
 
1490
+ NOTE: `no-idx` and/or `no-hash` prevents deduplication of those files
1491
+
1372
1492
  * when running on macos, all the usual apple metadata files are excluded by default
1373
1493
 
1374
1494
  if you set `--no-hash [...]` globally, you can enable hashing for specific volumes using flag `:c,nohash=`
1375
1495
 
1376
1496
  to exclude certain filepaths from search-results, use `--srch-excl` or volflag `srch_excl` instead of `--no-idx`, for example `--srch-excl 'password|logs/[0-9]'`
1377
1497
 
1498
+ config file example:
1499
+
1500
+ ```yaml
1501
+ [/games]
1502
+ /mnt/nas/games
1503
+ flags:
1504
+ noidx: \.iso$ # skip indexing iso-files
1505
+ srch_excl: password|logs/[0-9] # filter search results
1506
+ ```
1507
+
1378
1508
  ### filesystem guards
1379
1509
 
1380
1510
  avoid traversing into other filesystems using `--xdev` / volflag `:c,xdev`, skipping any symlinks or bind-mounts to another HDD for example
@@ -1395,6 +1525,20 @@ argument `--re-maxage 60` will rescan all volumes every 60 sec, same as volflag
1395
1525
 
1396
1526
  uploads are disabled while a rescan is happening, so rescans will be delayed by `--db-act` (default 10 sec) when there is write-activity going on (uploads, renames, ...)
1397
1527
 
1528
+ note: folder-thumbnails are selected during filesystem indexing, so periodic rescans can be used to keep them accurate as images are uploaded/deleted (or manually do a rescan with the `reload` button in the controlpanel)
1529
+
1530
+ config file example:
1531
+
1532
+ ```yaml
1533
+ [global]
1534
+ re-maxage: 3600
1535
+
1536
+ [/pics]
1537
+ /mnt/nas/pics
1538
+ flags:
1539
+ scan: 900
1540
+ ```
1541
+
1398
1542
 
1399
1543
  ## upload rules
1400
1544
 
@@ -1420,6 +1564,26 @@ you can also set transaction limits which apply per-IP and per-volume, but these
1420
1564
  notes:
1421
1565
  * `vmaxb` and `vmaxn` requires either the `e2ds` volflag or `-e2dsa` global-option
1422
1566
 
1567
+ config file example:
1568
+
1569
+ ```yaml
1570
+ [/inc]
1571
+ /mnt/nas/uploads
1572
+ accs:
1573
+ w: * # anyone can upload here
1574
+ rw: ed # only user "ed" can read-write
1575
+ flags:
1576
+ e2ds: # filesystem indexing is required for many of these:
1577
+ sz: 1k-3m # accept upload only if filesize in this range
1578
+ df: 4g # free disk space cannot go lower than this
1579
+ vmaxb: 1g # volume can never exceed 1 GiB
1580
+ vmaxn: 4k # ...or 4000 files, whichever comes first
1581
+ nosub # must upload to toplevel folder
1582
+ lifetime: 300 # uploads are deleted after 5min
1583
+ maxn: 250,3600 # each IP can upload 250 files in 1 hour
1584
+ maxb: 1g,300 # each IP can upload 1 GiB over 5 minutes
1585
+ ```
1586
+
1423
1587
 
1424
1588
  ## compress uploads
1425
1589
 
@@ -1465,10 +1629,24 @@ this can instead be kept in a single place using the `--hist` argument, or the `
1465
1629
  * `--hist ~/.cache/copyparty -v ~/music::r:c,hist=-` sets `~/.cache/copyparty` as the default place to put volume info, but `~/music` gets the regular `.hist` subfolder (`-` restores default behavior)
1466
1630
 
1467
1631
  note:
1632
+ * putting the hist-folders on an SSD is strongly recommended for performance
1468
1633
  * markdown edits are always stored in a local `.hist` subdirectory
1469
1634
  * on windows the volflag path is cyglike, so `/c/temp` means `C:\temp` but use regular paths for `--hist`
1470
1635
  * you can use cygpaths for volumes too, `-v C:\Users::r` and `-v /c/users::r` both work
1471
1636
 
1637
+ config file example:
1638
+
1639
+ ```yaml
1640
+ [global]
1641
+ hist: ~/.cache/copyparty # put db/thumbs/etc. here by default
1642
+
1643
+ [/pics]
1644
+ /mnt/nas/pics
1645
+ flags:
1646
+ hist: - # restore the default (/mnt/nas/pics/.hist/)
1647
+ hist: /mnt/nas/cache/pics/ # can be absolute path
1648
+ ```
1649
+
1472
1650
 
1473
1651
  ## metadata from audio files
1474
1652
 
@@ -1520,6 +1698,18 @@ copyparty can invoke external programs to collect additional metadata for files
1520
1698
 
1521
1699
  if something doesn't work, try `--mtag-v` for verbose error messages
1522
1700
 
1701
+ config file example; note that `mtp` is an additive option so all of the mtp options will take effect:
1702
+
1703
+ ```yaml
1704
+ [/music]
1705
+ /mnt/nas/music
1706
+ flags:
1707
+ mtp: .bpm=~/bin/audio-bpm.py # assign ".bpm" (numeric) with script
1708
+ mtp: key=f,t5,~/bin/audio-key.py # force/overwrite, 5sec timeout
1709
+ mtp: ext=an,~/bin/file-ext.py # will only run on non-audio files
1710
+ mtp: arch,built,ver,orig=an,eexe,edll,~/bin/exe.py # only exe/dll
1711
+ ```
1712
+
1523
1713
 
1524
1714
  ## event hooks
1525
1715
 
@@ -1548,13 +1738,35 @@ the PUSH and REQ examples have `t3` (timeout after 3 seconds) because they block
1548
1738
 
1549
1739
  see [zmq-recv.py](https://github.com/9001/copyparty/blob/hovudstraum/bin/zmq-recv.py) if you need something to receive the messages with
1550
1740
 
1741
+ config file example; note that the hooks are additive options, so all of the xau options will take effect:
1742
+
1743
+ ```yaml
1744
+ [global]
1745
+ xau: zmq:pub:tcp://*:5556` # send a PUB to any/all connected SUB clients
1746
+ xau: t3,zmq:push:tcp://*:5557` # send PUSH to exactly one connected PULL cli
1747
+ xau: t3,j,zmq:req:tcp://localhost:5555` # send REQ to the connected REP cli
1748
+ ```
1749
+
1551
1750
 
1552
1751
  ### upload events
1553
1752
 
1554
1753
  the older, more powerful approach ([examples](./bin/mtag/)):
1555
1754
 
1556
1755
  ```
1557
- -v /mnt/inc:inc:w:c,mte=+x1:c,mtp=x1=ad,kn,/usr/bin/notify-send
1756
+ -v /mnt/inc:inc:w:c,e2d,e2t,mte=+x1:c,mtp=x1=ad,kn,/usr/bin/notify-send
1757
+ ```
1758
+
1759
+ that was the commandline example; here's the config file example:
1760
+
1761
+ ```yaml
1762
+ [/inc]
1763
+ /mnt/inc
1764
+ accs:
1765
+ w: *
1766
+ flags:
1767
+ e2d, e2t # enable indexing of uploaded files and their tags
1768
+ mte: +x1
1769
+ mtp: x1=ad,kn,/usr/bin/notify-send
1558
1770
  ```
1559
1771
 
1560
1772
  so filesystem location `/mnt/inc` shared at `/inc`, write-only for everyone, appending `x1` to the list of tags to index (`mte`), and using `/usr/bin/notify-send` to "provide" tag `x1` for any filetype (`ad`) with kill-on-timeout disabled (`kn`)
@@ -1568,6 +1780,8 @@ note that this is way more complicated than the new [event hooks](#event-hooks)
1568
1780
 
1569
1781
  note that it will occupy the parsing threads, so fork anything expensive (or set `kn` to have copyparty fork it for you) -- otoh if you want to intentionally queue/singlethread you can combine it with `--mtag-mt 1`
1570
1782
 
1783
+ for reference, if you were to do this using event hooks instead, it would be like this: `-e2d --xau notify-send,hello,--`
1784
+
1571
1785
 
1572
1786
  ## handlers
1573
1787
 
@@ -1575,6 +1789,8 @@ redefine behavior with plugins ([examples](./bin/handlers/))
1575
1789
 
1576
1790
  replace 404 and 403 errors with something completely different (that's it for now)
1577
1791
 
1792
+ as for client-side stuff, there is [plugins for modifying UI/UX](./contrib/plugins/)
1793
+
1578
1794
 
1579
1795
  ## ip auth
1580
1796
 
@@ -1636,6 +1852,8 @@ connecting to an aws s3 bucket and similar
1636
1852
 
1637
1853
  there is no built-in support for this, but you can use FUSE-software such as [rclone](https://rclone.org/) / [geesefs](https://github.com/yandex-cloud/geesefs) / [JuiceFS](https://juicefs.com/en/) to first mount your cloud storage as a local disk, and then let copyparty use (a folder in) that disk as a volume
1638
1854
 
1855
+ if copyparty is unable to access the local folder that rclone/geesefs/JuiceFS provides (for example if it looks invisible) then you may need to run rclone with `--allow-other` and/or enable `user_allow_other` in `/etc/fuse.conf`
1856
+
1639
1857
  you will probably get decent speeds with the default config, however most likely restricted to using one TCP connection per file, so the upload-client won't be able to send multiple chunks in parallel
1640
1858
 
1641
1859
  > before [v1.13.5](https://github.com/9001/copyparty/releases/tag/v1.13.5) it was recommended to use the volflag `sparse` to force-allow multiple chunks in parallel; this would improve the upload-speed from `1.5 MiB/s` to over `80 MiB/s` at the risk of provoking latent bugs in S3 or JuiceFS. But v1.13.5 added chunk-stitching, so this is now probably much less important. On the contrary, `nosparse` *may* now increase performance in some cases. Please try all three options (default, `sparse`, `nosparse`) as the optimal choice depends on your network conditions and software stack (both the FUSE-driver and cloud-server)
@@ -1896,7 +2114,7 @@ change the association of a file extension
1896
2114
 
1897
2115
  using commandline args, you can do something like `--mime gif=image/jif` and `--mime ts=text/x.typescript` (can be specified multiple times)
1898
2116
 
1899
- in a config-file, this is the same as:
2117
+ in a config file, this is the same as:
1900
2118
 
1901
2119
  ```yaml
1902
2120
  [global]
@@ -2156,6 +2374,8 @@ NOTE: curl will not send the original filename if you use `-T` combined with url
2156
2374
 
2157
2375
  sync folders to/from copyparty
2158
2376
 
2377
+ NOTE: full bidirectional sync, like what [nextcloud](https://docs.nextcloud.com/server/latest/user_manual/sv/files/desktop_mobile_sync.html) and [syncthing](https://syncthing.net/) does, will never be supported! Only single-direction sync (server-to-client, or client-to-server) is possible with copyparty
2378
+
2159
2379
  the commandline uploader [u2c.py](https://github.com/9001/copyparty/tree/hovudstraum/bin#u2cpy) with `--dr` is the best way to sync a folder to copyparty; verifies checksums and does files in parallel, and deletes unexpected files on the server after upload has finished which makes file-renames really cheap (it'll rename serverside and skip uploading)
2160
2380
 
2161
2381
  alternatively there is [rclone](./docs/rclone.md) which allows for bidirectional sync and is *way* more flexible (stream files straight from sftp/s3/gcs to copyparty, ...), although there is no integrity check and it won't work with files over 100 MiB if copyparty is behind cloudflare