copyparty 1.16.10__tar.gz → 1.16.12__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 (126) hide show
  1. {copyparty-1.16.10 → copyparty-1.16.12}/PKG-INFO +223 -6
  2. {copyparty-1.16.10 → copyparty-1.16.12}/README.md +222 -5
  3. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/__main__.py +2 -1
  4. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/__version__.py +2 -2
  5. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/authsrv.py +9 -1
  6. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/cfg.py +3 -0
  7. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/httpcli.py +27 -7
  8. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/metrics.py +1 -1
  9. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/multicast.py +1 -0
  10. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/a/u2c.py +50 -3
  11. copyparty-1.16.12/copyparty/web/baguettebox.js.gz +0 -0
  12. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/browser.css.gz +0 -0
  13. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/browser.html +0 -2
  14. copyparty-1.16.12/copyparty/web/browser.js.gz +0 -0
  15. copyparty-1.16.12/copyparty/web/deps/marked.js.gz +0 -0
  16. copyparty-1.16.12/copyparty/web/util.js.gz +0 -0
  17. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty.egg-info/PKG-INFO +223 -6
  18. copyparty-1.16.10/copyparty/web/baguettebox.js.gz +0 -0
  19. copyparty-1.16.10/copyparty/web/browser.js.gz +0 -0
  20. copyparty-1.16.10/copyparty/web/deps/marked.js.gz +0 -0
  21. copyparty-1.16.10/copyparty/web/util.js.gz +0 -0
  22. {copyparty-1.16.10 → copyparty-1.16.12}/LICENSE +0 -0
  23. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/__init__.py +0 -0
  24. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/bos/__init__.py +0 -0
  25. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/bos/bos.py +0 -0
  26. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/bos/path.py +0 -0
  27. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/broker_mp.py +0 -0
  28. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/broker_mpw.py +0 -0
  29. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/broker_thr.py +0 -0
  30. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/broker_util.py +0 -0
  31. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/cert.py +0 -0
  32. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/dxml.py +0 -0
  33. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/fsutil.py +0 -0
  34. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/ftpd.py +0 -0
  35. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/httpconn.py +0 -0
  36. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/httpsrv.py +0 -0
  37. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/ico.py +0 -0
  38. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/mdns.py +0 -0
  39. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/mtag.py +0 -0
  40. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/pwhash.py +0 -0
  41. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/res/COPYING.txt +0 -0
  42. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/res/__init__.py +0 -0
  43. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/res/insecure.pem +0 -0
  44. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/smbd.py +0 -0
  45. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/ssdp.py +0 -0
  46. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/star.py +0 -0
  47. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/__init__.py +0 -0
  48. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/dnslib/__init__.py +0 -0
  49. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/dnslib/bimap.py +0 -0
  50. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/dnslib/bit.py +0 -0
  51. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/dnslib/buffer.py +0 -0
  52. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/dnslib/dns.py +0 -0
  53. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/dnslib/label.py +0 -0
  54. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/dnslib/lex.py +0 -0
  55. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/dnslib/ranges.py +0 -0
  56. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/ifaddr/__init__.py +0 -0
  57. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/ifaddr/_posix.py +0 -0
  58. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/ifaddr/_shared.py +0 -0
  59. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/ifaddr/_win32.py +0 -0
  60. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/qrcodegen.py +0 -0
  61. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/stolen/surrogateescape.py +0 -0
  62. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/sutil.py +0 -0
  63. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/svchub.py +0 -0
  64. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/szip.py +0 -0
  65. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/tcpsrv.py +0 -0
  66. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/tftpd.py +0 -0
  67. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/th_cli.py +0 -0
  68. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/th_srv.py +0 -0
  69. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/u2idx.py +0 -0
  70. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/up2k.py +0 -0
  71. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/util.py +0 -0
  72. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/a/__init__.py +0 -0
  73. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/a/partyfuse.py +0 -0
  74. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/a/webdav-cfg.bat +0 -0
  75. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/browser2.html +0 -0
  76. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/cf.html +0 -0
  77. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/dbg-audio.js.gz +0 -0
  78. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/dd/2.png +0 -0
  79. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/dd/3.png +0 -0
  80. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/dd/4.png +0 -0
  81. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/dd/5.png +0 -0
  82. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/dd/__init__.py +0 -0
  83. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/__init__.py +0 -0
  84. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/busy.mp3.gz +0 -0
  85. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/easymde.css.gz +0 -0
  86. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/easymde.js.gz +0 -0
  87. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/fuse.py +0 -0
  88. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/mini-fa.css.gz +0 -0
  89. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/mini-fa.woff +0 -0
  90. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/prism.css.gz +0 -0
  91. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/prism.js.gz +0 -0
  92. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/prismd.css.gz +0 -0
  93. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/scp.woff2 +0 -0
  94. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/sha512.ac.js.gz +0 -0
  95. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/deps/sha512.hw.js.gz +0 -0
  96. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/md.css.gz +0 -0
  97. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/md.html +0 -0
  98. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/md.js.gz +0 -0
  99. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/md2.css.gz +0 -0
  100. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/md2.js.gz +0 -0
  101. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/mde.css.gz +0 -0
  102. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/mde.html +0 -0
  103. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/mde.js.gz +0 -0
  104. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/msg.css.gz +0 -0
  105. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/msg.html +0 -0
  106. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/rups.css.gz +0 -0
  107. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/rups.html +0 -0
  108. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/rups.js.gz +0 -0
  109. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/shares.css.gz +0 -0
  110. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/shares.html +0 -0
  111. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/shares.js.gz +0 -0
  112. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/splash.css.gz +0 -0
  113. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/splash.html +0 -0
  114. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/splash.js.gz +0 -0
  115. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/svcs.html +0 -0
  116. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/svcs.js.gz +0 -0
  117. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/ui.css.gz +0 -0
  118. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/up2k.js.gz +0 -0
  119. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty/web/w.hash.js.gz +0 -0
  120. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty.egg-info/SOURCES.txt +0 -0
  121. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty.egg-info/dependency_links.txt +0 -0
  122. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty.egg-info/entry_points.txt +0 -0
  123. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty.egg-info/requires.txt +0 -0
  124. {copyparty-1.16.10 → copyparty-1.16.12}/copyparty.egg-info/top_level.txt +0 -0
  125. {copyparty-1.16.10 → copyparty-1.16.12}/pyproject.toml +0 -0
  126. {copyparty-1.16.10 → copyparty-1.16.12}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: copyparty
3
- Version: 1.16.10
3
+ Version: 1.16.12
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,23 @@ 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
+ config file example:
725
+
726
+ ```yaml
727
+ [global]
728
+ no-thumb # disable ALL thumbnails and audio transcoding
729
+ no-vthumb # only disable video thumbnails
730
+
731
+ [/music]
732
+ /mnt/nas/music
733
+ accs:
734
+ r: * # everyone can read
735
+ flags:
736
+ dthumb # disable ALL thumbnails and audio transcoding
737
+ dvthumb # only disable video thumbnails
738
+ th-covers: folder.png,folder.jpg,cover.png,cover.jpg # the default
739
+ ```
740
+
672
741
 
673
742
  ## zip downloads
674
743
 
@@ -793,6 +862,14 @@ undo/delete accidental uploads using the `[🧯]` tab in the UI
793
862
 
794
863
  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
864
 
865
+ config file example:
866
+
867
+ ```yaml
868
+ [global]
869
+ e2d # enable up2k database (remember uploads)
870
+ unpost: 43200 # 12 hours (default)
871
+ ```
872
+
796
873
 
797
874
  ### self-destruct
798
875
 
@@ -958,6 +1035,15 @@ will show uploader IP and upload-time if the visitor has the admin permission
958
1035
 
959
1036
  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
1037
 
1038
+ config file example:
1039
+
1040
+ ```yaml
1041
+ [global]
1042
+ ups-when # everyone can see upload times
1043
+ ups-who: 1 # but only admins can see the list,
1044
+ # so ups-when doesn't take effect
1045
+ ```
1046
+
961
1047
 
962
1048
  ## media player
963
1049
 
@@ -1102,7 +1188,16 @@ using arguments or config files, or a mix of both:
1102
1188
 
1103
1189
  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
1190
 
1105
- * `--z-on` / `--z-off`' limits the feature to certain networks
1191
+ * `--z-on` / `--z-off` limits the feature to certain networks
1192
+
1193
+ config file example:
1194
+
1195
+ ```yaml
1196
+ [global]
1197
+ z # enable all zeroconf features (mdns, ssdp)
1198
+ zm # only enables mdns (does nothing since we already have z)
1199
+ z-on: 192.168.0.0/16, 10.1.2.0/24 # restrict to certain subnets
1200
+ ```
1106
1201
 
1107
1202
 
1108
1203
  ### mdns
@@ -1243,7 +1338,7 @@ dependencies: `python3 -m pip install --user -U impacket==0.11.0`
1243
1338
 
1244
1339
  some **BIG WARNINGS** specific to SMB/CIFS, in decreasing importance:
1245
1340
  * 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)
1341
+ * 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
1342
  * 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
1343
  * [shadowing](#shadowing) probably works as expected but no guarantees
1249
1344
 
@@ -1329,6 +1424,18 @@ advantages of using symlinks (default):
1329
1424
 
1330
1425
  global-option `--xlink` / volflag `xlink` additionally enables deduplication across volumes, but this is probably buggy and not recommended
1331
1426
 
1427
+ config file example:
1428
+
1429
+ ```yaml
1430
+ [global]
1431
+ e2dsa # scan and index filesystem on startup
1432
+ dedup # symlink-based deduplication for all volumes
1433
+
1434
+ [/media]
1435
+ /mnt/nas/media
1436
+ flags:
1437
+ hardlinkonly # this vol does hardlinks instead of symlinks
1438
+ ```
1332
1439
 
1333
1440
 
1334
1441
  ## file indexing
@@ -1360,6 +1467,14 @@ note:
1360
1467
  * `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
1468
  * the rescan button in the admin panel has no effect unless the volume has `-e2ds` or higher
1362
1469
 
1470
+ config file example (these options are recommended btw):
1471
+
1472
+ ```yaml
1473
+ [global]
1474
+ e2dsa # scan and index all files in all volumes on startup
1475
+ e2ts # check newly-discovered or uploaded files for media tags
1476
+ ```
1477
+
1363
1478
  ### exclude-patterns
1364
1479
 
1365
1480
  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 +1484,24 @@ to save some time, you can provide a regex pattern for filepaths to only index
1369
1484
 
1370
1485
  similarly, you can fully ignore files/folders using `--no-idx [...]` and `:c,noidx=\.iso$`
1371
1486
 
1487
+ NOTE: `no-idx` and/or `no-hash` prevents deduplication of those files
1488
+
1372
1489
  * when running on macos, all the usual apple metadata files are excluded by default
1373
1490
 
1374
1491
  if you set `--no-hash [...]` globally, you can enable hashing for specific volumes using flag `:c,nohash=`
1375
1492
 
1376
1493
  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
1494
 
1495
+ config file example:
1496
+
1497
+ ```yaml
1498
+ [/games]
1499
+ /mnt/nas/games
1500
+ flags:
1501
+ noidx: \.iso$ # skip indexing iso-files
1502
+ srch_excl: password|logs/[0-9] # filter search results
1503
+ ```
1504
+
1378
1505
  ### filesystem guards
1379
1506
 
1380
1507
  avoid traversing into other filesystems using `--xdev` / volflag `:c,xdev`, skipping any symlinks or bind-mounts to another HDD for example
@@ -1395,6 +1522,20 @@ argument `--re-maxage 60` will rescan all volumes every 60 sec, same as volflag
1395
1522
 
1396
1523
  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
1524
 
1525
+ 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)
1526
+
1527
+ config file example:
1528
+
1529
+ ```yaml
1530
+ [global]
1531
+ re-maxage: 3600
1532
+
1533
+ [/pics]
1534
+ /mnt/nas/pics
1535
+ flags:
1536
+ scan: 900
1537
+ ```
1538
+
1398
1539
 
1399
1540
  ## upload rules
1400
1541
 
@@ -1420,6 +1561,26 @@ you can also set transaction limits which apply per-IP and per-volume, but these
1420
1561
  notes:
1421
1562
  * `vmaxb` and `vmaxn` requires either the `e2ds` volflag or `-e2dsa` global-option
1422
1563
 
1564
+ config file example:
1565
+
1566
+ ```yaml
1567
+ [/inc]
1568
+ /mnt/nas/uploads
1569
+ accs:
1570
+ w: * # anyone can upload here
1571
+ rw: ed # only user "ed" can read-write
1572
+ flags:
1573
+ e2ds: # filesystem indexing is required for many of these:
1574
+ sz: 1k-3m # accept upload only if filesize in this range
1575
+ df: 4g # free disk space cannot go lower than this
1576
+ vmaxb: 1g # volume can never exceed 1 GiB
1577
+ vmaxn: 4k # ...or 4000 files, whichever comes first
1578
+ nosub # must upload to toplevel folder
1579
+ lifetime: 300 # uploads are deleted after 5min
1580
+ maxn: 250,3600 # each IP can upload 250 files in 1 hour
1581
+ maxb: 1g,300 # each IP can upload 1 GiB over 5 minutes
1582
+ ```
1583
+
1423
1584
 
1424
1585
  ## compress uploads
1425
1586
 
@@ -1465,10 +1626,24 @@ this can instead be kept in a single place using the `--hist` argument, or the `
1465
1626
  * `--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
1627
 
1467
1628
  note:
1629
+ * putting the hist-folders on an SSD is strongly recommended for performance
1468
1630
  * markdown edits are always stored in a local `.hist` subdirectory
1469
1631
  * on windows the volflag path is cyglike, so `/c/temp` means `C:\temp` but use regular paths for `--hist`
1470
1632
  * you can use cygpaths for volumes too, `-v C:\Users::r` and `-v /c/users::r` both work
1471
1633
 
1634
+ config file example:
1635
+
1636
+ ```yaml
1637
+ [global]
1638
+ hist: ~/.cache/copyparty # put db/thumbs/etc. here by default
1639
+
1640
+ [/pics]
1641
+ /mnt/nas/pics
1642
+ flags:
1643
+ hist: - # restore the default (/mnt/nas/pics/.hist/)
1644
+ hist: /mnt/nas/cache/pics/ # can be absolute path
1645
+ ```
1646
+
1472
1647
 
1473
1648
  ## metadata from audio files
1474
1649
 
@@ -1520,6 +1695,18 @@ copyparty can invoke external programs to collect additional metadata for files
1520
1695
 
1521
1696
  if something doesn't work, try `--mtag-v` for verbose error messages
1522
1697
 
1698
+ config file example; note that `mtp` is an additive option so all of the mtp options will take effect:
1699
+
1700
+ ```yaml
1701
+ [/music]
1702
+ /mnt/nas/music
1703
+ flags:
1704
+ mtp: .bpm=~/bin/audio-bpm.py # assign ".bpm" (numeric) with script
1705
+ mtp: key=f,t5,~/bin/audio-key.py # force/overwrite, 5sec timeout
1706
+ mtp: ext=an,~/bin/file-ext.py # will only run on non-audio files
1707
+ mtp: arch,built,ver,orig=an,eexe,edll,~/bin/exe.py # only exe/dll
1708
+ ```
1709
+
1523
1710
 
1524
1711
  ## event hooks
1525
1712
 
@@ -1548,13 +1735,35 @@ the PUSH and REQ examples have `t3` (timeout after 3 seconds) because they block
1548
1735
 
1549
1736
  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
1737
 
1738
+ config file example; note that the hooks are additive options, so all of the xau options will take effect:
1739
+
1740
+ ```yaml
1741
+ [global]
1742
+ xau: zmq:pub:tcp://*:5556` # send a PUB to any/all connected SUB clients
1743
+ xau: t3,zmq:push:tcp://*:5557` # send PUSH to exactly one connected PULL cli
1744
+ xau: t3,j,zmq:req:tcp://localhost:5555` # send REQ to the connected REP cli
1745
+ ```
1746
+
1551
1747
 
1552
1748
  ### upload events
1553
1749
 
1554
1750
  the older, more powerful approach ([examples](./bin/mtag/)):
1555
1751
 
1556
1752
  ```
1557
- -v /mnt/inc:inc:w:c,mte=+x1:c,mtp=x1=ad,kn,/usr/bin/notify-send
1753
+ -v /mnt/inc:inc:w:c,e2d,e2t,mte=+x1:c,mtp=x1=ad,kn,/usr/bin/notify-send
1754
+ ```
1755
+
1756
+ that was the commandline example; here's the config file example:
1757
+
1758
+ ```yaml
1759
+ [/inc]
1760
+ /mnt/inc
1761
+ accs:
1762
+ w: *
1763
+ flags:
1764
+ e2d, e2t # enable indexing of uploaded files and their tags
1765
+ mte: +x1
1766
+ mtp: x1=ad,kn,/usr/bin/notify-send
1558
1767
  ```
1559
1768
 
1560
1769
  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 +1777,8 @@ note that this is way more complicated than the new [event hooks](#event-hooks)
1568
1777
 
1569
1778
  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
1779
 
1780
+ for reference, if you were to do this using event hooks instead, it would be like this: `-e2d --xau notify-send,hello,--`
1781
+
1571
1782
 
1572
1783
  ## handlers
1573
1784
 
@@ -1575,6 +1786,8 @@ redefine behavior with plugins ([examples](./bin/handlers/))
1575
1786
 
1576
1787
  replace 404 and 403 errors with something completely different (that's it for now)
1577
1788
 
1789
+ as for client-side stuff, there is [plugins for modifying UI/UX](./contrib/plugins/)
1790
+
1578
1791
 
1579
1792
  ## ip auth
1580
1793
 
@@ -1636,6 +1849,8 @@ connecting to an aws s3 bucket and similar
1636
1849
 
1637
1850
  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
1851
 
1852
+ 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`
1853
+
1639
1854
  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
1855
 
1641
1856
  > 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 +2111,7 @@ change the association of a file extension
1896
2111
 
1897
2112
  using commandline args, you can do something like `--mime gif=image/jif` and `--mime ts=text/x.typescript` (can be specified multiple times)
1898
2113
 
1899
- in a config-file, this is the same as:
2114
+ in a config file, this is the same as:
1900
2115
 
1901
2116
  ```yaml
1902
2117
  [global]
@@ -2156,6 +2371,8 @@ NOTE: curl will not send the original filename if you use `-T` combined with url
2156
2371
 
2157
2372
  sync folders to/from copyparty
2158
2373
 
2374
+ 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
2375
+
2159
2376
  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
2377
 
2161
2378
  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