copyparty 1.16.12__tar.gz → 1.16.14__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.
- {copyparty-1.16.12 → copyparty-1.16.14}/PKG-INFO +60 -4
- {copyparty-1.16.12 → copyparty-1.16.14}/README.md +59 -3
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/__main__.py +7 -2
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/__version__.py +2 -2
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/authsrv.py +63 -11
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/cfg.py +45 -2
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/httpcli.py +67 -19
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/svchub.py +1 -1
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/up2k.py +53 -5
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/a/u2c.py +6 -3
- copyparty-1.16.14/copyparty/web/browser.css.gz +0 -0
- copyparty-1.16.14/copyparty/web/browser.js.gz +0 -0
- copyparty-1.16.14/copyparty/web/up2k.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty.egg-info/PKG-INFO +60 -4
- copyparty-1.16.12/copyparty/web/browser.css.gz +0 -0
- copyparty-1.16.12/copyparty/web/browser.js.gz +0 -0
- copyparty-1.16.12/copyparty/web/up2k.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/LICENSE +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/__init__.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/bos/__init__.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/bos/bos.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/bos/path.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/broker_mp.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/broker_mpw.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/broker_thr.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/broker_util.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/cert.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/dxml.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/fsutil.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/ftpd.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/httpconn.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/httpsrv.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/ico.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/mdns.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/metrics.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/mtag.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/multicast.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/pwhash.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/res/COPYING.txt +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/res/__init__.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/res/insecure.pem +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/smbd.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/ssdp.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/star.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/__init__.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/dnslib/__init__.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/dnslib/bimap.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/dnslib/bit.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/dnslib/buffer.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/dnslib/dns.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/dnslib/label.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/dnslib/lex.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/dnslib/ranges.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/ifaddr/__init__.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/ifaddr/_posix.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/ifaddr/_shared.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/ifaddr/_win32.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/qrcodegen.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/stolen/surrogateescape.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/sutil.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/szip.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/tcpsrv.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/tftpd.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/th_cli.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/th_srv.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/u2idx.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/util.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/a/__init__.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/a/partyfuse.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/a/webdav-cfg.bat +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/baguettebox.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/browser.html +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/browser2.html +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/cf.html +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/dbg-audio.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/dd/2.png +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/dd/3.png +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/dd/4.png +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/dd/5.png +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/dd/__init__.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/__init__.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/busy.mp3.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/easymde.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/easymde.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/fuse.py +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/marked.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/mini-fa.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/mini-fa.woff +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/prism.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/prism.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/prismd.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/scp.woff2 +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/sha512.ac.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/deps/sha512.hw.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/md.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/md.html +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/md.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/md2.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/md2.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/mde.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/mde.html +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/mde.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/msg.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/msg.html +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/rups.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/rups.html +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/rups.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/shares.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/shares.html +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/shares.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/splash.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/splash.html +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/splash.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/svcs.html +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/svcs.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/ui.css.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/util.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty/web/w.hash.js.gz +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty.egg-info/SOURCES.txt +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty.egg-info/dependency_links.txt +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty.egg-info/entry_points.txt +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty.egg-info/requires.txt +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/copyparty.egg-info/top_level.txt +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/pyproject.toml +0 -0
- {copyparty-1.16.12 → copyparty-1.16.14}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: copyparty
|
3
|
-
Version: 1.16.
|
3
|
+
Version: 1.16.14
|
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
|
@@ -151,9 +151,11 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
151
151
|
* [reverse-proxy](#reverse-proxy) - running copyparty next to other websites
|
152
152
|
* [real-ip](#real-ip) - teaching copyparty how to see client IPs
|
153
153
|
* [reverse-proxy performance](#reverse-proxy-performance)
|
154
|
+
* [permanent cloudflare tunnel](#permanent-cloudflare-tunnel) - if you have a domain and want to get your copyparty online real quick
|
154
155
|
* [prometheus](#prometheus) - metrics/stats can be enabled
|
155
156
|
* [other extremely specific features](#other-extremely-specific-features) - you'll never find a use for these
|
156
157
|
* [custom mimetypes](#custom-mimetypes) - change the association of a file extension
|
158
|
+
* [GDPR compliance](#GDPR-compliance) - imagine using copyparty professionally...
|
157
159
|
* [feature chickenbits](#feature-chickenbits) - buggy feature? rip it out
|
158
160
|
* [packages](#packages) - the party might be closer than you think
|
159
161
|
* [arch package](#arch-package) - now [available on aur](https://aur.archlinux.org/packages/copyparty) maintained by [@icxes](https://github.com/icxes)
|
@@ -216,8 +218,8 @@ enable thumbnails (images/audio/video), media indexing, and audio transcoding by
|
|
216
218
|
* **MacOS:** `port install py-Pillow ffmpeg`
|
217
219
|
* **MacOS** (alternative): `brew install pillow ffmpeg`
|
218
220
|
* **Windows:** `python -m pip install --user -U Pillow`
|
219
|
-
* install python and ffmpeg manually; do not use `winget` or `Microsoft Store` (it breaks $PATH)
|
220
|
-
* copyparty.exe comes with `Pillow` and only needs
|
221
|
+
* install [python](https://www.python.org/downloads/windows/) and [ffmpeg](#optional-dependencies) manually; do not use `winget` or `Microsoft Store` (it breaks $PATH)
|
222
|
+
* copyparty.exe comes with `Pillow` and only needs [ffmpeg](#optional-dependencies) for mediatags/videothumbs
|
221
223
|
* see [optional dependencies](#optional-dependencies) to enable even more features
|
222
224
|
|
223
225
|
running copyparty without arguments (for example doubleclicking it on Windows) will give everyone read/write access to the current folder; you may want [accounts and volumes](#accounts-and-volumes)
|
@@ -240,6 +242,8 @@ first download [cloudflared](https://developers.cloudflare.com/cloudflare-one/co
|
|
240
242
|
|
241
243
|
as the tunnel starts, it will show a URL which you can share to let anyone browse your stash or upload files to you
|
242
244
|
|
245
|
+
but if you have a domain, then you probably want to skip the random autogenerated URL and instead make a [permanent cloudflare tunnel](#permanent-cloudflare-tunnel)
|
246
|
+
|
243
247
|
since people will be connecting through cloudflare, run copyparty with `--xff-hdr cf-connecting-ip` to detect client IPs correctly
|
244
248
|
|
245
249
|
|
@@ -458,6 +462,9 @@ upgrade notes
|
|
458
462
|
|
459
463
|
"frequently" asked questions
|
460
464
|
|
465
|
+
* can I change the 🌲 spinning pine-tree loading animation?
|
466
|
+
* [yeah...](https://github.com/9001/copyparty/tree/hovudstraum/docs/rice#boring-loader-spinner) :-(
|
467
|
+
|
461
468
|
* is it possible to block read-access to folders unless you know the exact URL for a particular file inside?
|
462
469
|
* yes, using the [`g` permission](#accounts-and-volumes), see the examples there
|
463
470
|
* you can also do this with linux filesystem permissions; `chmod 111 music` will make it possible to access files and folders inside the `music` folder but not list the immediate contents -- also works with other software, not just copyparty
|
@@ -480,6 +487,14 @@ upgrade notes
|
|
480
487
|
* copyparty seems to think I am using http, even though the URL is https
|
481
488
|
* your reverse-proxy is not sending the `X-Forwarded-Proto: https` header; this could be because your reverse-proxy itself is confused. Ensure that none of the intermediates (such as cloudflare) are terminating https before the traffic hits your entrypoint
|
482
489
|
|
490
|
+
* thumbnails are broken (you get a colorful square which says the filetype instead)
|
491
|
+
* you need to install `FFmpeg` or `Pillow`; see [thumbnails](#thumbnails)
|
492
|
+
|
493
|
+
* thumbnails are broken (some images appear, but other files just get a blank box, and/or the broken-image placeholder)
|
494
|
+
* probably due to a reverse-proxy messing with the request URLs and stripping the query parameters (`?th=w`), so check your URL rewrite rules
|
495
|
+
* could also be due to incorrect caching settings in reverse-proxies and/or CDNs, so make sure that nothing is set to ignore the query string
|
496
|
+
* could also be due to misbehaving privacy-related browser extensions, so try to disable those
|
497
|
+
|
483
498
|
* i want to learn python and/or programming and am considering looking at the copyparty source code in that occasion
|
484
499
|
* ```bash
|
485
500
|
_| _ __ _ _|_
|
@@ -710,6 +725,7 @@ press `g` or `田` to toggle grid-view instead of the file listing and `t` togg
|
|
710
725
|
it does static images with Pillow / pyvips / FFmpeg, and uses FFmpeg for video files, so you may want to `--no-thumb` or maybe just `--no-vthumb` depending on how dangerous your users are
|
711
726
|
* pyvips is 3x faster than Pillow, Pillow is 3x faster than FFmpeg
|
712
727
|
* disable thumbnails for specific volumes with volflag `dthumb` for all, or `dvthumb` / `dathumb` / `dithumb` for video/audio/images only
|
728
|
+
* for installing FFmpeg on windows, see [optional dependencies](#optional-dependencies)
|
713
729
|
|
714
730
|
audio files are converted into spectrograms using FFmpeg unless you `--no-athumb` (and some FFmpeg builds may need `--th-ff-swr`)
|
715
731
|
|
@@ -721,6 +737,8 @@ enabling `multiselect` lets you click files to select them, and then shift-click
|
|
721
737
|
* `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
|
722
738
|
* the `sel` option can be made default globally with `--gsel` or per-volume with volflag `gsel`
|
723
739
|
|
740
|
+
to show `/icons/exe.png` as the thumbnail for all .exe files, `--ext-th=exe=/icons/exe.png` (optionally as a volflag)
|
741
|
+
|
724
742
|
config file example:
|
725
743
|
|
726
744
|
```yaml
|
@@ -735,6 +753,7 @@ config file example:
|
|
735
753
|
flags:
|
736
754
|
dthumb # disable ALL thumbnails and audio transcoding
|
737
755
|
dvthumb # only disable video thumbnails
|
756
|
+
ext-th: exe=/ico/exe.png # /ico/exe.png is the thumbnail of *.exe
|
738
757
|
th-covers: folder.png,folder.jpg,cover.png,cover.jpg # the default
|
739
758
|
```
|
740
759
|
|
@@ -818,8 +837,11 @@ the up2k UI is the epitome of polished intuitive experiences:
|
|
818
837
|
* "parallel uploads" specifies how many chunks to upload at the same time
|
819
838
|
* `[🏃]` analysis of other files should continue while one is uploading
|
820
839
|
* `[🥔]` shows a simpler UI for faster uploads from slow devices
|
840
|
+
* `[🛡️]` decides when to overwrite existing files on the server
|
841
|
+
* `🛡️` = never (generate a new filename instead)
|
842
|
+
* `🕒` = overwrite if the server-file is older
|
843
|
+
* `♻️` = always overwrite if the files are different
|
821
844
|
* `[🎲]` generate random filenames during upload
|
822
|
-
* `[📅]` preserve last-modified timestamps; server times will match yours
|
823
845
|
* `[🔎]` switch between upload and [file-search](#file-search) mode
|
824
846
|
* ignore `[🔎]` if you add files by dragging them into the browser
|
825
847
|
|
@@ -2036,6 +2058,26 @@ in summary, `haproxy > caddy > traefik > nginx > apache > lighttpd`, and use uds
|
|
2036
2058
|
* if these results are bullshit because my config exampels are bad, please submit corrections!
|
2037
2059
|
|
2038
2060
|
|
2061
|
+
## permanent cloudflare tunnel
|
2062
|
+
|
2063
|
+
if you have a domain and want to get your copyparty online real quick, either from your home-PC behind a CGNAT or from a server without an existing [reverse-proxy](#reverse-proxy) setup, one approach is to create a [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/) (formerly "Argo Tunnel")
|
2064
|
+
|
2065
|
+
I'd recommend making a `Locally-managed tunnel` for more control, but if you prefer to make a `Remotely-managed tunnel` then this is currently how:
|
2066
|
+
|
2067
|
+
* `cloudflare dashboard` » `zero trust` » `networks` » `tunnels` » `create a tunnel` » `cloudflared` » choose a cool `subdomain` and leave the `path` blank, and use `service type` = `http` and `URL` = `127.0.0.1:3923`
|
2068
|
+
|
2069
|
+
* and if you want to just run the tunnel without installing it, skip the `cloudflared service install BASE64` step and instead do `cloudflared --no-autoupdate tunnel run --token BASE64`
|
2070
|
+
|
2071
|
+
NOTE: since people will be connecting through cloudflare, as mentioned in [real-ip](#real-ip) you should run copyparty with `--xff-hdr cf-connecting-ip` to detect client IPs correctly
|
2072
|
+
|
2073
|
+
config file example:
|
2074
|
+
|
2075
|
+
```yaml
|
2076
|
+
[global]
|
2077
|
+
xff-hdr: cf-connecting-ip
|
2078
|
+
```
|
2079
|
+
|
2080
|
+
|
2039
2081
|
## prometheus
|
2040
2082
|
|
2041
2083
|
metrics/stats can be enabled at URL `/.cpr/metrics` for grafana / prometheus / etc (openmetrics 1.0.0)
|
@@ -2122,6 +2164,18 @@ in a config file, this is the same as:
|
|
2122
2164
|
run copyparty with `--mimes` to list all the default mappings
|
2123
2165
|
|
2124
2166
|
|
2167
|
+
### GDPR compliance
|
2168
|
+
|
2169
|
+
imagine using copyparty professionally... **TINLA/IANAL; EU laws are hella confusing**
|
2170
|
+
|
2171
|
+
* remember to disable logging, or configure logrotation to an acceptable timeframe with `-lo cpp-%Y-%m%d.txt.xz` or similar
|
2172
|
+
|
2173
|
+
* if running with the database enabled (recommended), then have it forget uploader-IPs after some time using `--forget-ip 43200`
|
2174
|
+
* don't set it too low; [unposting](#unpost) a file is no longer possible after this takes effect
|
2175
|
+
|
2176
|
+
* if you actually *are* a lawyer then I'm open for feedback, would be fun
|
2177
|
+
|
2178
|
+
|
2125
2179
|
### feature chickenbits
|
2126
2180
|
|
2127
2181
|
buggy feature? rip it out by setting any of the following environment variables to disable its associated bell or whistle,
|
@@ -2639,6 +2693,8 @@ enable [smb](#smb-server) support (**not** recommended): `impacket==0.12.0`
|
|
2639
2693
|
|
2640
2694
|
`pyvips` gives higher quality thumbnails than `Pillow` and is 320% faster, using 270% more ram: `sudo apt install libvips42 && python3 -m pip install --user -U pyvips`
|
2641
2695
|
|
2696
|
+
to install FFmpeg on Windows, grab [a recent build](https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z) -- you need `ffmpeg.exe` and `ffprobe.exe` from inside the `bin` folder; copy them into `C:\Windows\System32` or any other folder that's in your `%PATH%`
|
2697
|
+
|
2642
2698
|
|
2643
2699
|
### dependency chickenbits
|
2644
2700
|
|
@@ -94,9 +94,11 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
94
94
|
* [reverse-proxy](#reverse-proxy) - running copyparty next to other websites
|
95
95
|
* [real-ip](#real-ip) - teaching copyparty how to see client IPs
|
96
96
|
* [reverse-proxy performance](#reverse-proxy-performance)
|
97
|
+
* [permanent cloudflare tunnel](#permanent-cloudflare-tunnel) - if you have a domain and want to get your copyparty online real quick
|
97
98
|
* [prometheus](#prometheus) - metrics/stats can be enabled
|
98
99
|
* [other extremely specific features](#other-extremely-specific-features) - you'll never find a use for these
|
99
100
|
* [custom mimetypes](#custom-mimetypes) - change the association of a file extension
|
101
|
+
* [GDPR compliance](#GDPR-compliance) - imagine using copyparty professionally...
|
100
102
|
* [feature chickenbits](#feature-chickenbits) - buggy feature? rip it out
|
101
103
|
* [packages](#packages) - the party might be closer than you think
|
102
104
|
* [arch package](#arch-package) - now [available on aur](https://aur.archlinux.org/packages/copyparty) maintained by [@icxes](https://github.com/icxes)
|
@@ -159,8 +161,8 @@ enable thumbnails (images/audio/video), media indexing, and audio transcoding by
|
|
159
161
|
* **MacOS:** `port install py-Pillow ffmpeg`
|
160
162
|
* **MacOS** (alternative): `brew install pillow ffmpeg`
|
161
163
|
* **Windows:** `python -m pip install --user -U Pillow`
|
162
|
-
* install python and ffmpeg manually; do not use `winget` or `Microsoft Store` (it breaks $PATH)
|
163
|
-
* copyparty.exe comes with `Pillow` and only needs
|
164
|
+
* install [python](https://www.python.org/downloads/windows/) and [ffmpeg](#optional-dependencies) manually; do not use `winget` or `Microsoft Store` (it breaks $PATH)
|
165
|
+
* copyparty.exe comes with `Pillow` and only needs [ffmpeg](#optional-dependencies) for mediatags/videothumbs
|
164
166
|
* see [optional dependencies](#optional-dependencies) to enable even more features
|
165
167
|
|
166
168
|
running copyparty without arguments (for example doubleclicking it on Windows) will give everyone read/write access to the current folder; you may want [accounts and volumes](#accounts-and-volumes)
|
@@ -183,6 +185,8 @@ first download [cloudflared](https://developers.cloudflare.com/cloudflare-one/co
|
|
183
185
|
|
184
186
|
as the tunnel starts, it will show a URL which you can share to let anyone browse your stash or upload files to you
|
185
187
|
|
188
|
+
but if you have a domain, then you probably want to skip the random autogenerated URL and instead make a [permanent cloudflare tunnel](#permanent-cloudflare-tunnel)
|
189
|
+
|
186
190
|
since people will be connecting through cloudflare, run copyparty with `--xff-hdr cf-connecting-ip` to detect client IPs correctly
|
187
191
|
|
188
192
|
|
@@ -401,6 +405,9 @@ upgrade notes
|
|
401
405
|
|
402
406
|
"frequently" asked questions
|
403
407
|
|
408
|
+
* can I change the 🌲 spinning pine-tree loading animation?
|
409
|
+
* [yeah...](https://github.com/9001/copyparty/tree/hovudstraum/docs/rice#boring-loader-spinner) :-(
|
410
|
+
|
404
411
|
* is it possible to block read-access to folders unless you know the exact URL for a particular file inside?
|
405
412
|
* yes, using the [`g` permission](#accounts-and-volumes), see the examples there
|
406
413
|
* you can also do this with linux filesystem permissions; `chmod 111 music` will make it possible to access files and folders inside the `music` folder but not list the immediate contents -- also works with other software, not just copyparty
|
@@ -423,6 +430,14 @@ upgrade notes
|
|
423
430
|
* copyparty seems to think I am using http, even though the URL is https
|
424
431
|
* your reverse-proxy is not sending the `X-Forwarded-Proto: https` header; this could be because your reverse-proxy itself is confused. Ensure that none of the intermediates (such as cloudflare) are terminating https before the traffic hits your entrypoint
|
425
432
|
|
433
|
+
* thumbnails are broken (you get a colorful square which says the filetype instead)
|
434
|
+
* you need to install `FFmpeg` or `Pillow`; see [thumbnails](#thumbnails)
|
435
|
+
|
436
|
+
* thumbnails are broken (some images appear, but other files just get a blank box, and/or the broken-image placeholder)
|
437
|
+
* probably due to a reverse-proxy messing with the request URLs and stripping the query parameters (`?th=w`), so check your URL rewrite rules
|
438
|
+
* could also be due to incorrect caching settings in reverse-proxies and/or CDNs, so make sure that nothing is set to ignore the query string
|
439
|
+
* could also be due to misbehaving privacy-related browser extensions, so try to disable those
|
440
|
+
|
426
441
|
* i want to learn python and/or programming and am considering looking at the copyparty source code in that occasion
|
427
442
|
* ```bash
|
428
443
|
_| _ __ _ _|_
|
@@ -653,6 +668,7 @@ press `g` or `田` to toggle grid-view instead of the file listing and `t` togg
|
|
653
668
|
it does static images with Pillow / pyvips / FFmpeg, and uses FFmpeg for video files, so you may want to `--no-thumb` or maybe just `--no-vthumb` depending on how dangerous your users are
|
654
669
|
* pyvips is 3x faster than Pillow, Pillow is 3x faster than FFmpeg
|
655
670
|
* disable thumbnails for specific volumes with volflag `dthumb` for all, or `dvthumb` / `dathumb` / `dithumb` for video/audio/images only
|
671
|
+
* for installing FFmpeg on windows, see [optional dependencies](#optional-dependencies)
|
656
672
|
|
657
673
|
audio files are converted into spectrograms using FFmpeg unless you `--no-athumb` (and some FFmpeg builds may need `--th-ff-swr`)
|
658
674
|
|
@@ -664,6 +680,8 @@ enabling `multiselect` lets you click files to select them, and then shift-click
|
|
664
680
|
* `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
|
665
681
|
* the `sel` option can be made default globally with `--gsel` or per-volume with volflag `gsel`
|
666
682
|
|
683
|
+
to show `/icons/exe.png` as the thumbnail for all .exe files, `--ext-th=exe=/icons/exe.png` (optionally as a volflag)
|
684
|
+
|
667
685
|
config file example:
|
668
686
|
|
669
687
|
```yaml
|
@@ -678,6 +696,7 @@ config file example:
|
|
678
696
|
flags:
|
679
697
|
dthumb # disable ALL thumbnails and audio transcoding
|
680
698
|
dvthumb # only disable video thumbnails
|
699
|
+
ext-th: exe=/ico/exe.png # /ico/exe.png is the thumbnail of *.exe
|
681
700
|
th-covers: folder.png,folder.jpg,cover.png,cover.jpg # the default
|
682
701
|
```
|
683
702
|
|
@@ -761,8 +780,11 @@ the up2k UI is the epitome of polished intuitive experiences:
|
|
761
780
|
* "parallel uploads" specifies how many chunks to upload at the same time
|
762
781
|
* `[🏃]` analysis of other files should continue while one is uploading
|
763
782
|
* `[🥔]` shows a simpler UI for faster uploads from slow devices
|
783
|
+
* `[🛡️]` decides when to overwrite existing files on the server
|
784
|
+
* `🛡️` = never (generate a new filename instead)
|
785
|
+
* `🕒` = overwrite if the server-file is older
|
786
|
+
* `♻️` = always overwrite if the files are different
|
764
787
|
* `[🎲]` generate random filenames during upload
|
765
|
-
* `[📅]` preserve last-modified timestamps; server times will match yours
|
766
788
|
* `[🔎]` switch between upload and [file-search](#file-search) mode
|
767
789
|
* ignore `[🔎]` if you add files by dragging them into the browser
|
768
790
|
|
@@ -1979,6 +2001,26 @@ in summary, `haproxy > caddy > traefik > nginx > apache > lighttpd`, and use uds
|
|
1979
2001
|
* if these results are bullshit because my config exampels are bad, please submit corrections!
|
1980
2002
|
|
1981
2003
|
|
2004
|
+
## permanent cloudflare tunnel
|
2005
|
+
|
2006
|
+
if you have a domain and want to get your copyparty online real quick, either from your home-PC behind a CGNAT or from a server without an existing [reverse-proxy](#reverse-proxy) setup, one approach is to create a [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/) (formerly "Argo Tunnel")
|
2007
|
+
|
2008
|
+
I'd recommend making a `Locally-managed tunnel` for more control, but if you prefer to make a `Remotely-managed tunnel` then this is currently how:
|
2009
|
+
|
2010
|
+
* `cloudflare dashboard` » `zero trust` » `networks` » `tunnels` » `create a tunnel` » `cloudflared` » choose a cool `subdomain` and leave the `path` blank, and use `service type` = `http` and `URL` = `127.0.0.1:3923`
|
2011
|
+
|
2012
|
+
* and if you want to just run the tunnel without installing it, skip the `cloudflared service install BASE64` step and instead do `cloudflared --no-autoupdate tunnel run --token BASE64`
|
2013
|
+
|
2014
|
+
NOTE: since people will be connecting through cloudflare, as mentioned in [real-ip](#real-ip) you should run copyparty with `--xff-hdr cf-connecting-ip` to detect client IPs correctly
|
2015
|
+
|
2016
|
+
config file example:
|
2017
|
+
|
2018
|
+
```yaml
|
2019
|
+
[global]
|
2020
|
+
xff-hdr: cf-connecting-ip
|
2021
|
+
```
|
2022
|
+
|
2023
|
+
|
1982
2024
|
## prometheus
|
1983
2025
|
|
1984
2026
|
metrics/stats can be enabled at URL `/.cpr/metrics` for grafana / prometheus / etc (openmetrics 1.0.0)
|
@@ -2065,6 +2107,18 @@ in a config file, this is the same as:
|
|
2065
2107
|
run copyparty with `--mimes` to list all the default mappings
|
2066
2108
|
|
2067
2109
|
|
2110
|
+
### GDPR compliance
|
2111
|
+
|
2112
|
+
imagine using copyparty professionally... **TINLA/IANAL; EU laws are hella confusing**
|
2113
|
+
|
2114
|
+
* remember to disable logging, or configure logrotation to an acceptable timeframe with `-lo cpp-%Y-%m%d.txt.xz` or similar
|
2115
|
+
|
2116
|
+
* if running with the database enabled (recommended), then have it forget uploader-IPs after some time using `--forget-ip 43200`
|
2117
|
+
* don't set it too low; [unposting](#unpost) a file is no longer possible after this takes effect
|
2118
|
+
|
2119
|
+
* if you actually *are* a lawyer then I'm open for feedback, would be fun
|
2120
|
+
|
2121
|
+
|
2068
2122
|
### feature chickenbits
|
2069
2123
|
|
2070
2124
|
buggy feature? rip it out by setting any of the following environment variables to disable its associated bell or whistle,
|
@@ -2582,6 +2636,8 @@ enable [smb](#smb-server) support (**not** recommended): `impacket==0.12.0`
|
|
2582
2636
|
|
2583
2637
|
`pyvips` gives higher quality thumbnails than `Pillow` and is 320% faster, using 270% more ram: `sudo apt install libvips42 && python3 -m pip install --user -U pyvips`
|
2584
2638
|
|
2639
|
+
to install FFmpeg on Windows, grab [a recent build](https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z) -- you need `ffmpeg.exe` and `ffprobe.exe` from inside the `bin` folder; copy them into `C:\Windows\System32` or any other folder that's in your `%PATH%`
|
2640
|
+
|
2585
2641
|
|
2586
2642
|
### dependency chickenbits
|
2587
2643
|
|
@@ -1031,6 +1031,7 @@ def add_upload(ap):
|
|
1031
1031
|
ap2.add_argument("--turbo", metavar="LVL", type=int, default=0, help="configure turbo-mode in up2k client; [\033[32m-1\033[0m] = forbidden/always-off, [\033[32m0\033[0m] = default-off and warn if enabled, [\033[32m1\033[0m] = default-off, [\033[32m2\033[0m] = on, [\033[32m3\033[0m] = on and disable datecheck")
|
1032
1032
|
ap2.add_argument("--u2j", metavar="JOBS", type=int, default=2, help="web-client: number of file chunks to upload in parallel; 1 or 2 is good for low-latency (same-country) connections, 4-8 for android clients, 16 for cross-atlantic (max=64)")
|
1033
1033
|
ap2.add_argument("--u2sz", metavar="N,N,N", type=u, default="1,64,96", help="web-client: default upload chunksize (MiB); sets \033[33mmin,default,max\033[0m in the settings gui. Each HTTP POST will aim for \033[33mdefault\033[0m, and never exceed \033[33mmax\033[0m. Cloudflare max is 96. Big values are good for cross-atlantic but may increase HDD fragmentation on some FS. Disable this optimization with [\033[32m1,1,1\033[0m]")
|
1034
|
+
ap2.add_argument("--u2ow", metavar="NUM", type=int, default=0, help="web-client: default setting for when to overwrite existing files; [\033[32m0\033[0m]=never, [\033[32m1\033[0m]=if-client-newer, [\033[32m2\033[0m]=always (volflag=u2ow)")
|
1034
1035
|
ap2.add_argument("--u2sort", metavar="TXT", type=u, default="s", help="upload order; [\033[32ms\033[0m]=smallest-first, [\033[32mn\033[0m]=alphabetical, [\033[32mfs\033[0m]=force-s, [\033[32mfn\033[0m]=force-n -- alphabetical is a bit slower on fiber/LAN but makes it easier to eyeball if everything went fine")
|
1035
1036
|
ap2.add_argument("--write-uplog", action="store_true", help="write POST reports to textfiles in working-directory")
|
1036
1037
|
|
@@ -1175,6 +1176,7 @@ def add_webdav(ap):
|
|
1175
1176
|
ap2.add_argument("--dav-mac", action="store_true", help="disable apple-garbage filter -- allow macos to create junk files (._* and .DS_Store, .Spotlight-*, .fseventsd, .Trashes, .AppleDouble, __MACOS)")
|
1176
1177
|
ap2.add_argument("--dav-rt", action="store_true", help="show symlink-destination's lastmodified instead of the link itself; always enabled for recursive listings (volflag=davrt)")
|
1177
1178
|
ap2.add_argument("--dav-auth", action="store_true", help="force auth for all folders (required by davfs2 when only some folders are world-readable) (volflag=davauth)")
|
1179
|
+
ap2.add_argument("--dav-ua1", metavar="PTN", type=u, default=r" kioworker/", help="regex of tricky user-agents which expect 401 from GET requests; disable with [\033[32mno\033[0m] or blank")
|
1178
1180
|
|
1179
1181
|
|
1180
1182
|
def add_tftp(ap):
|
@@ -1260,7 +1262,7 @@ def add_optouts(ap):
|
|
1260
1262
|
ap2.add_argument("--no-tarcmp", action="store_true", help="disable download as compressed tar (?tar=gz, ?tar=bz2, ?tar=xz, ?tar=gz:9, ...)")
|
1261
1263
|
ap2.add_argument("--no-lifetime", action="store_true", help="do not allow clients (or server config) to schedule an upload to be deleted after a given time")
|
1262
1264
|
ap2.add_argument("--no-pipe", action="store_true", help="disable race-the-beam (lockstep download of files which are currently being uploaded) (volflag=nopipe)")
|
1263
|
-
ap2.add_argument("--no-db-ip", action="store_true", help="do not write uploader
|
1265
|
+
ap2.add_argument("--no-db-ip", action="store_true", help="do not write uploader-IP into the database; will also disable unpost, you may want \033[32m--forget-ip\033[0m instead (volflag=no_db_ip)")
|
1264
1266
|
|
1265
1267
|
|
1266
1268
|
def add_safety(ap):
|
@@ -1387,7 +1389,7 @@ def add_transcoding(ap):
|
|
1387
1389
|
|
1388
1390
|
def add_rss(ap):
|
1389
1391
|
ap2 = ap.add_argument_group('RSS options')
|
1390
|
-
ap2.add_argument("--rss", action="store_true", help="enable RSS output (experimental)")
|
1392
|
+
ap2.add_argument("--rss", action="store_true", help="enable RSS output (experimental) (volflag=rss)")
|
1391
1393
|
ap2.add_argument("--rss-nf", metavar="HITS", type=int, default=250, help="default number of files to return (url-param 'nf')")
|
1392
1394
|
ap2.add_argument("--rss-fext", metavar="E,E", type=u, default="", help="default list of file extensions to include (url-param 'fext'); blank=all")
|
1393
1395
|
ap2.add_argument("--rss-sort", metavar="ORD", type=u, default="m", help="default sort order (url-param 'sort'); [\033[32mm\033[0m]=last-modified [\033[32mu\033[0m]=upload-time [\033[32mn\033[0m]=filename [\033[32ms\033[0m]=filesize; Uppercase=oldest-first. Note that upload-time is 0 for non-uploaded files")
|
@@ -1410,6 +1412,7 @@ def add_db_general(ap, hcores):
|
|
1410
1412
|
ap2.add_argument("--no-dhash", action="store_true", help="disable rescan acceleration; do full database integrity check -- makes the db ~5%% smaller and bootup/rescans 3~10x slower")
|
1411
1413
|
ap2.add_argument("--re-dhash", action="store_true", help="force a cache rebuild on startup; enable this once if it gets out of sync (should never be necessary)")
|
1412
1414
|
ap2.add_argument("--no-forget", action="store_true", help="never forget indexed files, even when deleted from disk -- makes it impossible to ever upload the same file twice -- only useful for offloading uploads to a cloud service or something (volflag=noforget)")
|
1415
|
+
ap2.add_argument("--forget-ip", metavar="MIN", type=int, default=0, help="remove uploader-IP from database (and make unpost impossible) \033[33mMIN\033[0m minutes after upload, for GDPR reasons. Default [\033[32m0\033[0m] is never-forget. [\033[32m1440\033[0m]=day, [\033[32m10080\033[0m]=week, [\033[32m43200\033[0m]=month. (volflag=forget_ip)")
|
1413
1416
|
ap2.add_argument("--dbd", metavar="PROFILE", default="wal", help="database durability profile; sets the tradeoff between robustness and speed, see \033[33m--help-dbd\033[0m (volflag=dbd)")
|
1414
1417
|
ap2.add_argument("--xlink", action="store_true", help="on upload: check all volumes for dupes, not just the target volume (probably buggy, not recommended) (volflag=xlink)")
|
1415
1418
|
ap2.add_argument("--hash-mt", metavar="CORES", type=int, default=hcores, help="num cpu cores to use for file hashing; set 0 or 1 for single-core hashing")
|
@@ -1478,7 +1481,9 @@ def add_ui(ap, retry):
|
|
1478
1481
|
ap2.add_argument("--hsortn", metavar="N", type=int, default=2, help="number of sorting rules to include in media URLs by default (volflag=hsortn)")
|
1479
1482
|
ap2.add_argument("--unlist", metavar="REGEX", type=u, default="", help="don't show files matching \033[33mREGEX\033[0m in file list. Purely cosmetic! Does not affect API calls, just the browser. Example: [\033[32m\\.(js|css)$\033[0m] (volflag=unlist)")
|
1480
1483
|
ap2.add_argument("--favico", metavar="TXT", type=u, default="c 000 none" if retry else "🎉 000 none", help="\033[33mfavicon-text\033[0m [ \033[33mforeground\033[0m [ \033[33mbackground\033[0m ] ], set blank to disable")
|
1484
|
+
ap2.add_argument("--ext-th", metavar="E=VP", type=u, action="append", help="use thumbnail-image \033[33mVP\033[0m for file-extension \033[33mE\033[0m, example: [\033[32mexe=/.res/exe.png\033[0m] (volflag=ext_th)")
|
1481
1485
|
ap2.add_argument("--mpmc", metavar="URL", type=u, default="", help="change the mediaplayer-toggle mouse cursor; URL to a folder with {2..5}.png inside (or disable with [\033[32m.\033[0m])")
|
1486
|
+
ap2.add_argument("--spinner", metavar="TXT", type=u, default="🌲", help="\033[33memoji\033[0m or \033[33memoji,css\033[0m Example: [\033[32m🥖,padding:0\033[0m]")
|
1482
1487
|
ap2.add_argument("--css-browser", metavar="L", type=u, default="", help="URL to additional CSS to include in the filebrowser html")
|
1483
1488
|
ap2.add_argument("--js-browser", metavar="L", type=u, default="", help="URL to additional JS to include in the filebrowser html")
|
1484
1489
|
ap2.add_argument("--js-other", metavar="L", type=u, default="", help="URL to additional JS to include in all other pages")
|
@@ -1282,10 +1282,10 @@ class AuthSrv(object):
|
|
1282
1282
|
# one or more bools before the final flag; eat them
|
1283
1283
|
n1, uname = uname.split(",", 1)
|
1284
1284
|
for _, vp, _, _ in vols:
|
1285
|
-
self._read_volflag(flags[vp], n1, True, False)
|
1285
|
+
self._read_volflag(vp, flags[vp], n1, True, False)
|
1286
1286
|
|
1287
1287
|
for _, vp, _, _ in vols:
|
1288
|
-
self._read_volflag(flags[vp], uname, cval, False)
|
1288
|
+
self._read_volflag(vp, flags[vp], uname, cval, False)
|
1289
1289
|
|
1290
1290
|
return
|
1291
1291
|
|
@@ -1372,20 +1372,42 @@ class AuthSrv(object):
|
|
1372
1372
|
|
1373
1373
|
def _read_volflag(
|
1374
1374
|
self,
|
1375
|
+
vpath ,
|
1375
1376
|
flags ,
|
1376
1377
|
name ,
|
1377
1378
|
value ,
|
1378
1379
|
is_list ,
|
1379
1380
|
) :
|
1381
|
+
if name not in flagdescs:
|
1382
|
+
name = name.lower()
|
1383
|
+
|
1384
|
+
# volflags are snake_case, but a leading dash is the removal operator
|
1385
|
+
stripped = name.lstrip("-")
|
1386
|
+
zi = len(name) - len(stripped)
|
1387
|
+
if zi > 1:
|
1388
|
+
t = "WARNING: the config for volume [/%s] specified a volflag with multiple leading hyphens (%s); use one hyphen to remove, or zero hyphens to add a flag. Will now enable flag [%s]"
|
1389
|
+
self.log(t % (vpath, name, stripped), 3)
|
1390
|
+
name = stripped
|
1391
|
+
zi = 0
|
1392
|
+
|
1393
|
+
if stripped not in flagdescs and "-" in stripped:
|
1394
|
+
name = ("-" * zi) + stripped.replace("-", "_")
|
1395
|
+
|
1380
1396
|
desc = flagdescs.get(name.lstrip("-"), "?").replace("\n", " ")
|
1381
1397
|
|
1398
|
+
if not name:
|
1399
|
+
self._e("└─unreadable-line")
|
1400
|
+
t = "WARNING: the config for volume [/%s] indicated that a volflag was to be defined, but the volflag name was blank"
|
1401
|
+
self.log(t % (vpath,), 3)
|
1402
|
+
return
|
1403
|
+
|
1382
1404
|
if re.match("^-[^-]+$", name):
|
1383
1405
|
t = "└─unset volflag [{}] ({})"
|
1384
1406
|
self._e(t.format(name[1:], desc))
|
1385
1407
|
flags[name] = True
|
1386
1408
|
return
|
1387
1409
|
|
1388
|
-
zs = "mtp on403 on404 xbu xau xiu xbc xac xbr xar xbd xad xm xban"
|
1410
|
+
zs = "ext_th mtp on403 on404 xbu xau xiu xbc xac xbr xar xbd xad xm xban"
|
1389
1411
|
if name not in zs.split():
|
1390
1412
|
if value is True:
|
1391
1413
|
t = "└─add volflag [{}] = {} ({})"
|
@@ -1550,6 +1572,22 @@ class AuthSrv(object):
|
|
1550
1572
|
vol.all_vps.sort(key=lambda x: len(x[0]), reverse=True)
|
1551
1573
|
vol.root = vfs
|
1552
1574
|
|
1575
|
+
zs = "neversymlink"
|
1576
|
+
k_ign = set(zs.split())
|
1577
|
+
for vol in vfs.all_vols.values():
|
1578
|
+
unknown_flags = set()
|
1579
|
+
for k, v in vol.flags.items():
|
1580
|
+
stripped = k.lstrip("-")
|
1581
|
+
if k != stripped and stripped not in vol.flags:
|
1582
|
+
t = "WARNING: the config for volume [/%s] tried to remove volflag [%s] by specifying [%s] but that volflag was not already set"
|
1583
|
+
self.log(t % (vol.vpath, stripped, k), 3)
|
1584
|
+
k = stripped
|
1585
|
+
if k not in flagdescs and k not in k_ign:
|
1586
|
+
unknown_flags.add(k)
|
1587
|
+
if unknown_flags:
|
1588
|
+
t = "WARNING: the config for volume [/%s] has unrecognized volflags; will ignore: '%s'"
|
1589
|
+
self.log(t % (vol.vpath, "', '".join(unknown_flags)), 3)
|
1590
|
+
|
1553
1591
|
enshare = self.args.shr
|
1554
1592
|
shr = enshare[1:-1]
|
1555
1593
|
shrs = enshare[1:]
|
@@ -1911,11 +1949,8 @@ class AuthSrv(object):
|
|
1911
1949
|
if vf not in vol.flags:
|
1912
1950
|
vol.flags[vf] = getattr(self.args, ga)
|
1913
1951
|
|
1914
|
-
|
1915
|
-
|
1916
|
-
vol.flags[k] = getattr(self.args, k)
|
1917
|
-
|
1918
|
-
for k in ("nrand", "u2abort", "ups_who", "zip_who"):
|
1952
|
+
zs = "forget_ip nrand u2abort u2ow ups_who zip_who"
|
1953
|
+
for k in zs.split():
|
1919
1954
|
if k in vol.flags:
|
1920
1955
|
vol.flags[k] = int(vol.flags[k])
|
1921
1956
|
|
@@ -1967,8 +2002,10 @@ class AuthSrv(object):
|
|
1967
2002
|
|
1968
2003
|
# append additive args from argv to volflags
|
1969
2004
|
hooks = "xbu xau xiu xbc xac xbr xar xbd xad xm xban".split()
|
1970
|
-
for name in "mtp on404 on403".split() + hooks:
|
1971
|
-
self._read_volflag(
|
2005
|
+
for name in "ext_th mtp on404 on403".split() + hooks:
|
2006
|
+
self._read_volflag(
|
2007
|
+
vol.vpath, vol.flags, name, getattr(self.args, name), True
|
2008
|
+
)
|
1972
2009
|
|
1973
2010
|
for hn in hooks:
|
1974
2011
|
cmds = vol.flags.get(hn)
|
@@ -1996,6 +2033,16 @@ class AuthSrv(object):
|
|
1996
2033
|
ncmds.append(ocmd)
|
1997
2034
|
vol.flags[hn] = ncmds
|
1998
2035
|
|
2036
|
+
ext_th = vol.flags["ext_th_d"] = {}
|
2037
|
+
etv = "(?)"
|
2038
|
+
try:
|
2039
|
+
for etv in vol.flags.get("ext_th") or []:
|
2040
|
+
k, v = etv.split("=")
|
2041
|
+
ext_th[k] = v
|
2042
|
+
except:
|
2043
|
+
t = "WARNING: volume [/%s]: invalid value specified for ext-th: %s"
|
2044
|
+
self.log(t % (vol.vpath, etv), 3)
|
2045
|
+
|
1999
2046
|
# d2d drops all database features for a volume
|
2000
2047
|
for grp, rm in [["d2d", "e2d"], ["d2t", "e2t"], ["d2d", "e2v"]]:
|
2001
2048
|
if not vol.flags.get(grp, False):
|
@@ -2347,6 +2394,7 @@ class AuthSrv(object):
|
|
2347
2394
|
"sb_lg": "" if "no_sb_lg" in vf else (vf.get("lg_sbf") or "y"),
|
2348
2395
|
}
|
2349
2396
|
js_htm = {
|
2397
|
+
"SPINNER": self.args.spinner,
|
2350
2398
|
"s_name": self.args.bname,
|
2351
2399
|
"have_up2k_idx": "e2d" in vf,
|
2352
2400
|
"have_acode": not self.args.no_acode,
|
@@ -2356,6 +2404,7 @@ class AuthSrv(object):
|
|
2356
2404
|
"have_del": not self.args.no_del,
|
2357
2405
|
"have_unpost": int(self.args.unpost),
|
2358
2406
|
"have_emp": self.args.emp,
|
2407
|
+
"ext_th": vf.get("ext_th_d") or {},
|
2359
2408
|
"sb_md": "" if "no_sb_md" in vf else (vf.get("md_sbf") or "y"),
|
2360
2409
|
"sba_md": vf.get("md_sba") or "",
|
2361
2410
|
"sba_lg": vf.get("lg_sba") or "",
|
@@ -2376,6 +2425,7 @@ class AuthSrv(object):
|
|
2376
2425
|
"u2j": self.args.u2j,
|
2377
2426
|
"u2sz": self.args.u2sz,
|
2378
2427
|
"u2ts": vf["u2ts"],
|
2428
|
+
"u2ow": vf["u2ow"],
|
2379
2429
|
"frand": bool(vf.get("rand")),
|
2380
2430
|
"lifetime": vn.js_ls["lifetime"],
|
2381
2431
|
"u2sort": self.args.u2sort,
|
@@ -2759,7 +2809,9 @@ class AuthSrv(object):
|
|
2759
2809
|
zs = "c ihead ohead mtm mtp on403 on404 xac xad xar xau xiu xban xbc xbd xbr xbu xm"
|
2760
2810
|
lst = set(zs.split())
|
2761
2811
|
askip = set("a v c vc cgen exp_lg exp_md theme".split())
|
2762
|
-
|
2812
|
+
|
2813
|
+
t = "exp_lg exp_md ext_th_d mv_re_r mv_re_t rm_re_r rm_re_t srch_re_dots srch_re_nodot"
|
2814
|
+
fskip = set(t.split())
|
2763
2815
|
|
2764
2816
|
# keymap from argv to vflag
|
2765
2817
|
amap = vf_bmap()
|