copyparty 1.16.7__tar.gz → 1.16.9__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.7/copyparty.egg-info → copyparty-1.16.9}/PKG-INFO +84 -16
- copyparty-1.16.7/PKG-INFO → copyparty-1.16.9/README.md +80 -69
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/__main__.py +15 -8
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/__version__.py +2 -2
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/authsrv.py +8 -1
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/cfg.py +5 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/dxml.py +48 -3
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/httpcli.py +62 -30
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/svchub.py +13 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/up2k.py +32 -12
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/util.py +154 -8
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/a/u2c.py +3 -3
- copyparty-1.16.9/copyparty/web/browser.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/splash.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/svcs.html +64 -3
- copyparty-1.16.9/copyparty/web/svcs.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/ui.css.gz +0 -0
- copyparty-1.16.9/copyparty/web/up2k.js.gz +0 -0
- copyparty-1.16.9/copyparty/web/util.js.gz +0 -0
- copyparty-1.16.7/README.md → copyparty-1.16.9/copyparty.egg-info/PKG-INFO +137 -14
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty.egg-info/requires.txt +3 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/pyproject.toml +1 -0
- copyparty-1.16.7/copyparty/web/browser.js.gz +0 -0
- copyparty-1.16.7/copyparty/web/svcs.js.gz +0 -0
- copyparty-1.16.7/copyparty/web/up2k.js.gz +0 -0
- copyparty-1.16.7/copyparty/web/util.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/LICENSE +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/__init__.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/bos/__init__.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/bos/bos.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/bos/path.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/broker_mp.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/broker_mpw.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/broker_thr.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/broker_util.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/cert.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/fsutil.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/ftpd.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/httpconn.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/httpsrv.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/ico.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/mdns.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/metrics.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/mtag.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/multicast.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/pwhash.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/res/COPYING.txt +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/res/__init__.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/res/insecure.pem +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/smbd.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/ssdp.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/star.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/__init__.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/dnslib/__init__.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/dnslib/bimap.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/dnslib/bit.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/dnslib/buffer.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/dnslib/dns.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/dnslib/label.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/dnslib/lex.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/dnslib/ranges.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/ifaddr/__init__.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/ifaddr/_posix.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/ifaddr/_shared.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/ifaddr/_win32.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/qrcodegen.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/stolen/surrogateescape.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/sutil.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/szip.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/tcpsrv.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/tftpd.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/th_cli.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/th_srv.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/u2idx.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/a/__init__.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/a/partyfuse.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/a/webdav-cfg.bat +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/baguettebox.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/browser.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/browser.html +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/browser2.html +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/cf.html +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/dbg-audio.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/dd/2.png +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/dd/3.png +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/dd/4.png +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/dd/5.png +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/dd/__init__.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/__init__.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/busy.mp3.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/easymde.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/easymde.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/fuse.py +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/marked.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/mini-fa.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/mini-fa.woff +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/prism.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/prism.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/prismd.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/scp.woff2 +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/sha512.ac.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/deps/sha512.hw.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/md.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/md.html +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/md.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/md2.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/md2.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/mde.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/mde.html +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/mde.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/msg.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/msg.html +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/rups.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/rups.html +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/rups.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/shares.css.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/shares.html +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/shares.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/splash.html +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/splash.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty/web/w.hash.js.gz +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty.egg-info/SOURCES.txt +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty.egg-info/dependency_links.txt +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty.egg-info/entry_points.txt +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/copyparty.egg-info/top_level.txt +0 -0
- {copyparty-1.16.7 → copyparty-1.16.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: copyparty
|
3
|
-
Version: 1.16.
|
3
|
+
Version: 1.16.9
|
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
|
@@ -52,6 +52,8 @@ Provides-Extra: tftpd
|
|
52
52
|
Requires-Dist: partftpy>=0.4.0; extra == "tftpd"
|
53
53
|
Provides-Extra: pwhash
|
54
54
|
Requires-Dist: argon2-cffi; extra == "pwhash"
|
55
|
+
Provides-Extra: zeromq
|
56
|
+
Requires-Dist: pyzmq; extra == "zeromq"
|
55
57
|
|
56
58
|
<img src="https://github.com/9001/copyparty/raw/hovudstraum/docs/logo.svg" width="250" align="right"/>
|
57
59
|
|
@@ -135,6 +137,7 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
135
137
|
* [metadata from audio files](#metadata-from-audio-files) - set `-e2t` to index tags on upload
|
136
138
|
* [file parser plugins](#file-parser-plugins) - provide custom parsers to index additional tags
|
137
139
|
* [event hooks](#event-hooks) - trigger a program on uploads, renames etc ([examples](./bin/hooks/))
|
140
|
+
* [zeromq](#zeromq) - event-hooks can send zeromq messages
|
138
141
|
* [upload events](#upload-events) - the older, more powerful approach ([examples](./bin/mtag/))
|
139
142
|
* [handlers](#handlers) - redefine behavior with plugins ([examples](./bin/handlers/))
|
140
143
|
* [ip auth](#ip-auth) - autologin based on IP range (CIDR)
|
@@ -147,6 +150,7 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
147
150
|
* [listen on port 80 and 443](#listen-on-port-80-and-443) - become a *real* webserver
|
148
151
|
* [reverse-proxy](#reverse-proxy) - running copyparty next to other websites
|
149
152
|
* [real-ip](#real-ip) - teaching copyparty how to see client IPs
|
153
|
+
* [reverse-proxy performance](#reverse-proxy-performance)
|
150
154
|
* [prometheus](#prometheus) - metrics/stats can be enabled
|
151
155
|
* [other extremely specific features](#other-extremely-specific-features) - you'll never find a use for these
|
152
156
|
* [custom mimetypes](#custom-mimetypes) - change the association of a file extension
|
@@ -195,6 +199,7 @@ just run **[copyparty-sfx.py](https://github.com/9001/copyparty/releases/latest/
|
|
195
199
|
* or if you cannot install python, you can use [copyparty.exe](#copypartyexe) instead
|
196
200
|
* or install [on arch](#arch-package) ╱ [on NixOS](#nixos-module) ╱ [through nix](#nix-package)
|
197
201
|
* or if you are on android, [install copyparty in termux](#install-on-android)
|
202
|
+
* or maybe you have a [synology nas / dsm](./docs/synology-dsm.md)
|
198
203
|
* or if your computer is messed up and nothing else works, [try the pyz](#zipapp)
|
199
204
|
* or if you prefer to [use docker](./scripts/docker/) 🐋 you can do that too
|
200
205
|
* docker has all deps built-in, so skip this step:
|
@@ -668,8 +673,8 @@ select which type of archive you want in the `[⚙️] config` tab:
|
|
668
673
|
| `pax` | `?tar=pax` | pax-format tar, futureproof, not as fast |
|
669
674
|
| `tgz` | `?tar=gz` | gzip compressed gnu-tar (slow), for `curl \| tar -xvz` |
|
670
675
|
| `txz` | `?tar=xz` | gnu-tar with xz / lzma compression (v.slow) |
|
671
|
-
| `zip` | `?zip
|
672
|
-
| `zip_dos` | `?zip` | traditional cp437 (no unicode) to fix glitchy filenames |
|
676
|
+
| `zip` | `?zip` | works everywhere, glitchy filenames on win7 and older |
|
677
|
+
| `zip_dos` | `?zip=dos` | traditional cp437 (no unicode) to fix glitchy filenames |
|
673
678
|
| `zip_crc` | `?zip=crc` | cp437 with crc32 computed early for truly ancient software |
|
674
679
|
|
675
680
|
* gzip default level is `3` (0=fast, 9=best), change with `?tar=gz:9`
|
@@ -677,7 +682,7 @@ select which type of archive you want in the `[⚙️] config` tab:
|
|
677
682
|
* bz2 default level is `2` (1=fast, 9=best), change with `?tar=bz2:9`
|
678
683
|
* hidden files ([dotfiles](#dotfiles)) are excluded unless account is allowed to list them
|
679
684
|
* `up2k.db` and `dir.txt` is always excluded
|
680
|
-
* bsdtar supports streaming unzipping: `curl foo?zip
|
685
|
+
* bsdtar supports streaming unzipping: `curl foo?zip | bsdtar -xv`
|
681
686
|
* good, because copyparty's zip is faster than tar on small files
|
682
687
|
* `zip_crc` will take longer to download since the server has to read each file twice
|
683
688
|
* this is only to support MS-DOS PKZIP v2.04g (october 1993) and older
|
@@ -701,7 +706,7 @@ dragdrop is the recommended way, but you may also:
|
|
701
706
|
|
702
707
|
* select some files (not folders) in your file explorer and press CTRL-V inside the browser window
|
703
708
|
* use the [command-line uploader](https://github.com/9001/copyparty/tree/hovudstraum/bin#u2cpy)
|
704
|
-
* upload using [curl
|
709
|
+
* upload using [curl, sharex, ishare, ...](#client-examples)
|
705
710
|
|
706
711
|
when uploading files through dragdrop or CTRL-V, this initiates an upload using `up2k`; there are two browser-based uploaders available:
|
707
712
|
* `[🎈] bup`, the basic uploader, supports almost every browser since netscape 4.0
|
@@ -1159,6 +1164,8 @@ on macos, connect from finder:
|
|
1159
1164
|
|
1160
1165
|
in order to grant full write-access to webdav clients, the volflag `daw` must be set and the account must also have delete-access (otherwise the client won't be allowed to replace the contents of existing files, which is how webdav works)
|
1161
1166
|
|
1167
|
+
> note: if you have enabled [IdP authentication](#identity-providers) then that may cause issues for some/most webdav clients; see [the webdav section in the IdP docs](https://github.com/9001/copyparty/blob/hovudstraum/docs/idp.md#connecting-webdav-clients)
|
1168
|
+
|
1162
1169
|
|
1163
1170
|
### connecting to webdav from windows
|
1164
1171
|
|
@@ -1509,6 +1516,23 @@ there's a bunch of flags and stuff, see `--help-hooks`
|
|
1509
1516
|
if you want to write your own hooks, see [devnotes](./docs/devnotes.md#event-hooks)
|
1510
1517
|
|
1511
1518
|
|
1519
|
+
### zeromq
|
1520
|
+
|
1521
|
+
event-hooks can send zeromq messages instead of running programs
|
1522
|
+
|
1523
|
+
to send a 0mq message every time a file is uploaded,
|
1524
|
+
|
1525
|
+
* `--xau zmq:pub:tcp://*:5556` sends a PUB to any/all connected SUB clients
|
1526
|
+
* `--xau t3,zmq:push:tcp://*:5557` sends a PUSH to exactly one connected PULL client
|
1527
|
+
* `--xau t3,j,zmq:req:tcp://localhost:5555` sends a REQ to the connected REP client
|
1528
|
+
|
1529
|
+
the PUSH and REQ examples have `t3` (timeout after 3 seconds) because they block if there's no clients to talk to
|
1530
|
+
|
1531
|
+
* the REQ example does `t3,j` to send extended upload-info as json instead of just the filesystem-path
|
1532
|
+
|
1533
|
+
see [zmq-recv.py](https://github.com/9001/copyparty/blob/hovudstraum/bin/zmq-recv.py) if you need something to receive the messages with
|
1534
|
+
|
1535
|
+
|
1512
1536
|
### upload events
|
1513
1537
|
|
1514
1538
|
the older, more powerful approach ([examples](./bin/mtag/)):
|
@@ -1596,12 +1620,16 @@ connecting to an aws s3 bucket and similar
|
|
1596
1620
|
|
1597
1621
|
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
|
1598
1622
|
|
1599
|
-
you
|
1623
|
+
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
|
1624
|
+
|
1625
|
+
> 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)
|
1600
1626
|
|
1601
1627
|
someone has also tested geesefs in combination with [gocryptfs](https://nuetzlich.net/gocryptfs/) with surprisingly good results, getting 60 MiB/s upload speeds on a gbit line, but JuiceFS won with 80 MiB/s using its built-in encryption
|
1602
1628
|
|
1603
1629
|
you may improve performance by specifying larger values for `--iobuf` / `--s-rd-sz` / `--s-wr-sz`
|
1604
1630
|
|
1631
|
+
> if you've experimented with this and made interesting observations, please share your findings so we can add a section with specific recommendations :-)
|
1632
|
+
|
1605
1633
|
|
1606
1634
|
## hiding from google
|
1607
1635
|
|
@@ -1724,10 +1752,16 @@ some reverse proxies (such as [Caddy](https://caddyserver.com/)) can automatical
|
|
1724
1752
|
|
1725
1753
|
for improved security (and a 10% performance boost) consider listening on a unix-socket with `-i unix:770:www:/tmp/party.sock` (permission `770` means only members of group `www` can access it)
|
1726
1754
|
|
1727
|
-
example webserver configs:
|
1755
|
+
example webserver / reverse-proxy configs:
|
1728
1756
|
|
1729
|
-
* [
|
1730
|
-
*
|
1757
|
+
* [apache config](contrib/apache/copyparty.conf)
|
1758
|
+
* caddy uds: `caddy reverse-proxy --from :8080 --to unix///dev/shm/party.sock`
|
1759
|
+
* caddy tcp: `caddy reverse-proxy --from :8081 --to http://127.0.0.1:3923`
|
1760
|
+
* [haproxy config](contrib/haproxy/copyparty.conf)
|
1761
|
+
* [lighttpd subdomain](contrib/lighttpd/subdomain.conf) -- entire domain/subdomain
|
1762
|
+
* [lighttpd subpath](contrib/lighttpd/subpath.conf) -- location-based (not optimal, but in case you need it)
|
1763
|
+
* [nginx config](contrib/nginx/copyparty.conf) -- recommended
|
1764
|
+
* [traefik config](contrib/traefik/copyparty.yaml)
|
1731
1765
|
|
1732
1766
|
|
1733
1767
|
### real-ip
|
@@ -1739,6 +1773,38 @@ if you (and maybe everybody else) keep getting a message that says `thank you fo
|
|
1739
1773
|
for most common setups, there should be a helpful message in the server-log explaining what to do, but see [docs/xff.md](docs/xff.md) if you want to learn more, including a quick hack to **just make it work** (which is **not** recommended, but hey...)
|
1740
1774
|
|
1741
1775
|
|
1776
|
+
### reverse-proxy performance
|
1777
|
+
|
1778
|
+
most reverse-proxies support connecting to copyparty either using uds/unix-sockets (`/dev/shm/party.sock`, faster/recommended) or using tcp (`127.0.0.1`)
|
1779
|
+
|
1780
|
+
with copyparty listening on a uds / unix-socket / unix-domain-socket and the reverse-proxy connecting to that:
|
1781
|
+
|
1782
|
+
| index.html | upload | download | software |
|
1783
|
+
| ------------ | ----------- | ----------- | -------- |
|
1784
|
+
| 28'900 req/s | 6'900 MiB/s | 7'400 MiB/s | no-proxy |
|
1785
|
+
| 18'750 req/s | 3'500 MiB/s | 2'370 MiB/s | haproxy |
|
1786
|
+
| 9'900 req/s | 3'750 MiB/s | 2'200 MiB/s | caddy |
|
1787
|
+
| 18'700 req/s | 2'200 MiB/s | 1'570 MiB/s | nginx |
|
1788
|
+
| 9'700 req/s | 1'750 MiB/s | 1'830 MiB/s | apache |
|
1789
|
+
| 9'900 req/s | 1'300 MiB/s | 1'470 MiB/s | lighttpd |
|
1790
|
+
|
1791
|
+
when connecting the reverse-proxy to `127.0.0.1` instead (the basic and/or old-fasioned way), speeds are a bit worse:
|
1792
|
+
|
1793
|
+
| index.html | upload | download | software |
|
1794
|
+
| ------------ | ----------- | ----------- | -------- |
|
1795
|
+
| 21'200 req/s | 5'700 MiB/s | 6'700 MiB/s | no-proxy |
|
1796
|
+
| 14'500 req/s | 1'700 MiB/s | 2'170 MiB/s | haproxy |
|
1797
|
+
| 11'100 req/s | 2'750 MiB/s | 2'000 MiB/s | traefik |
|
1798
|
+
| 8'400 req/s | 2'300 MiB/s | 1'950 MiB/s | caddy |
|
1799
|
+
| 13'400 req/s | 1'100 MiB/s | 1'480 MiB/s | nginx |
|
1800
|
+
| 8'400 req/s | 1'000 MiB/s | 1'000 MiB/s | apache |
|
1801
|
+
| 6'500 req/s | 1'270 MiB/s | 1'500 MiB/s | lighttpd |
|
1802
|
+
|
1803
|
+
in summary, `haproxy > caddy > traefik > nginx > apache > lighttpd`, and use uds when possible (traefik does not support it yet)
|
1804
|
+
|
1805
|
+
* if these results are bullshit because my config exampels are bad, please submit corrections!
|
1806
|
+
|
1807
|
+
|
1742
1808
|
## prometheus
|
1743
1809
|
|
1744
1810
|
metrics/stats can be enabled at URL `/.cpr/metrics` for grafana / prometheus / etc (openmetrics 1.0.0)
|
@@ -2052,7 +2118,8 @@ interact with copyparty using non-browser clients
|
|
2052
2118
|
* can be downloaded from copyparty: controlpanel -> connect -> [partyfuse.py](http://127.0.0.1:3923/.cpr/a/partyfuse.py)
|
2053
2119
|
* [rclone](https://rclone.org/) as client can give ~5x performance, see [./docs/rclone.md](docs/rclone.md)
|
2054
2120
|
|
2055
|
-
* sharex (screenshot utility): see [./contrib/sharex.sxcu](contrib/#sharexsxcu)
|
2121
|
+
* sharex (screenshot utility): see [./contrib/sharex.sxcu](./contrib/#sharexsxcu)
|
2122
|
+
* and for screenshots on macos, see [./contrib/ishare.iscu](./contrib/#ishareiscu)
|
2056
2123
|
* and for screenshots on linux, see [./contrib/flameshot.sh](./contrib/flameshot.sh)
|
2057
2124
|
|
2058
2125
|
* contextlet (web browser integration); see [contrib contextlet](contrib/#send-to-cppcontextletjson)
|
@@ -2316,13 +2383,13 @@ mandatory deps:
|
|
2316
2383
|
|
2317
2384
|
install these to enable bonus features
|
2318
2385
|
|
2319
|
-
enable hashed passwords in config: `argon2-cffi`
|
2386
|
+
enable [hashed passwords](#password-hashing) in config: `argon2-cffi`
|
2320
2387
|
|
2321
|
-
enable ftp-server:
|
2388
|
+
enable [ftp-server](#ftp-server):
|
2322
2389
|
* for just plaintext FTP, `pyftpdlib` (is built into the SFX)
|
2323
2390
|
* with TLS encryption, `pyftpdlib pyopenssl`
|
2324
2391
|
|
2325
|
-
enable music tags:
|
2392
|
+
enable [music tags](#metadata-from-audio-files):
|
2326
2393
|
* either `mutagen` (fast, pure-python, skips a few tags, makes copyparty GPL? idk)
|
2327
2394
|
* or `ffprobe` (20x slower, more accurate, possibly dangerous depending on your distro and users)
|
2328
2395
|
|
@@ -2333,8 +2400,9 @@ enable [thumbnails](#thumbnails) of...
|
|
2333
2400
|
* **AVIF pictures:** `pyvips` or `ffmpeg` or `pillow-avif-plugin`
|
2334
2401
|
* **JPEG XL pictures:** `pyvips` or `ffmpeg`
|
2335
2402
|
|
2336
|
-
enable [
|
2337
|
-
|
2403
|
+
enable sending [zeromq messages](#zeromq) from event-hooks: `pyzmq`
|
2404
|
+
|
2405
|
+
enable [smb](#smb-server) support (**not** recommended): `impacket==0.12.0`
|
2338
2406
|
|
2339
2407
|
`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`
|
2340
2408
|
|
@@ -1,58 +1,3 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: copyparty
|
3
|
-
Version: 1.16.7
|
4
|
-
Summary: Portable file server with accelerated resumable uploads, deduplication, WebDAV, FTP, zeroconf, media indexer, video thumbnails, audio transcoding, and write-only folders
|
5
|
-
Author-email: ed <copyparty@ocv.me>
|
6
|
-
License: MIT
|
7
|
-
Project-URL: Source Code, https://github.com/9001/copyparty
|
8
|
-
Project-URL: Bug Tracker, https://github.com/9001/copyparty/issues
|
9
|
-
Project-URL: Demo Server, https://a.ocv.me/pub/demo/
|
10
|
-
Classifier: Development Status :: 5 - Production/Stable
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
12
|
-
Classifier: Programming Language :: Python
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
14
|
-
Classifier: Programming Language :: Python :: 3.3
|
15
|
-
Classifier: Programming Language :: Python :: 3.4
|
16
|
-
Classifier: Programming Language :: Python :: 3.5
|
17
|
-
Classifier: Programming Language :: Python :: 3.6
|
18
|
-
Classifier: Programming Language :: Python :: 3.7
|
19
|
-
Classifier: Programming Language :: Python :: 3.8
|
20
|
-
Classifier: Programming Language :: Python :: 3.9
|
21
|
-
Classifier: Programming Language :: Python :: 3.10
|
22
|
-
Classifier: Programming Language :: Python :: 3.11
|
23
|
-
Classifier: Programming Language :: Python :: 3.12
|
24
|
-
Classifier: Programming Language :: Python :: 3.13
|
25
|
-
Classifier: Programming Language :: Python :: Implementation :: CPython
|
26
|
-
Classifier: Programming Language :: Python :: Implementation :: Jython
|
27
|
-
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
28
|
-
Classifier: Operating System :: OS Independent
|
29
|
-
Classifier: Environment :: Console
|
30
|
-
Classifier: Environment :: No Input/Output (Daemon)
|
31
|
-
Classifier: Intended Audience :: End Users/Desktop
|
32
|
-
Classifier: Intended Audience :: System Administrators
|
33
|
-
Classifier: Topic :: Communications :: File Sharing
|
34
|
-
Classifier: Topic :: Internet :: File Transfer Protocol (FTP)
|
35
|
-
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
36
|
-
Requires-Python: >=3.3
|
37
|
-
Description-Content-Type: text/markdown
|
38
|
-
License-File: LICENSE
|
39
|
-
Requires-Dist: Jinja2
|
40
|
-
Provides-Extra: thumbnails
|
41
|
-
Requires-Dist: Pillow; extra == "thumbnails"
|
42
|
-
Provides-Extra: thumbnails2
|
43
|
-
Requires-Dist: pyvips; extra == "thumbnails2"
|
44
|
-
Provides-Extra: audiotags
|
45
|
-
Requires-Dist: mutagen; extra == "audiotags"
|
46
|
-
Provides-Extra: ftpd
|
47
|
-
Requires-Dist: pyftpdlib; extra == "ftpd"
|
48
|
-
Provides-Extra: ftps
|
49
|
-
Requires-Dist: pyftpdlib; extra == "ftps"
|
50
|
-
Requires-Dist: pyopenssl; extra == "ftps"
|
51
|
-
Provides-Extra: tftpd
|
52
|
-
Requires-Dist: partftpy>=0.4.0; extra == "tftpd"
|
53
|
-
Provides-Extra: pwhash
|
54
|
-
Requires-Dist: argon2-cffi; extra == "pwhash"
|
55
|
-
|
56
1
|
<img src="https://github.com/9001/copyparty/raw/hovudstraum/docs/logo.svg" width="250" align="right"/>
|
57
2
|
|
58
3
|
### 💾🎉 copyparty
|
@@ -135,6 +80,7 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
135
80
|
* [metadata from audio files](#metadata-from-audio-files) - set `-e2t` to index tags on upload
|
136
81
|
* [file parser plugins](#file-parser-plugins) - provide custom parsers to index additional tags
|
137
82
|
* [event hooks](#event-hooks) - trigger a program on uploads, renames etc ([examples](./bin/hooks/))
|
83
|
+
* [zeromq](#zeromq) - event-hooks can send zeromq messages
|
138
84
|
* [upload events](#upload-events) - the older, more powerful approach ([examples](./bin/mtag/))
|
139
85
|
* [handlers](#handlers) - redefine behavior with plugins ([examples](./bin/handlers/))
|
140
86
|
* [ip auth](#ip-auth) - autologin based on IP range (CIDR)
|
@@ -147,6 +93,7 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
147
93
|
* [listen on port 80 and 443](#listen-on-port-80-and-443) - become a *real* webserver
|
148
94
|
* [reverse-proxy](#reverse-proxy) - running copyparty next to other websites
|
149
95
|
* [real-ip](#real-ip) - teaching copyparty how to see client IPs
|
96
|
+
* [reverse-proxy performance](#reverse-proxy-performance)
|
150
97
|
* [prometheus](#prometheus) - metrics/stats can be enabled
|
151
98
|
* [other extremely specific features](#other-extremely-specific-features) - you'll never find a use for these
|
152
99
|
* [custom mimetypes](#custom-mimetypes) - change the association of a file extension
|
@@ -195,6 +142,7 @@ just run **[copyparty-sfx.py](https://github.com/9001/copyparty/releases/latest/
|
|
195
142
|
* or if you cannot install python, you can use [copyparty.exe](#copypartyexe) instead
|
196
143
|
* or install [on arch](#arch-package) ╱ [on NixOS](#nixos-module) ╱ [through nix](#nix-package)
|
197
144
|
* or if you are on android, [install copyparty in termux](#install-on-android)
|
145
|
+
* or maybe you have a [synology nas / dsm](./docs/synology-dsm.md)
|
198
146
|
* or if your computer is messed up and nothing else works, [try the pyz](#zipapp)
|
199
147
|
* or if you prefer to [use docker](./scripts/docker/) 🐋 you can do that too
|
200
148
|
* docker has all deps built-in, so skip this step:
|
@@ -668,8 +616,8 @@ select which type of archive you want in the `[⚙️] config` tab:
|
|
668
616
|
| `pax` | `?tar=pax` | pax-format tar, futureproof, not as fast |
|
669
617
|
| `tgz` | `?tar=gz` | gzip compressed gnu-tar (slow), for `curl \| tar -xvz` |
|
670
618
|
| `txz` | `?tar=xz` | gnu-tar with xz / lzma compression (v.slow) |
|
671
|
-
| `zip` | `?zip
|
672
|
-
| `zip_dos` | `?zip` | traditional cp437 (no unicode) to fix glitchy filenames |
|
619
|
+
| `zip` | `?zip` | works everywhere, glitchy filenames on win7 and older |
|
620
|
+
| `zip_dos` | `?zip=dos` | traditional cp437 (no unicode) to fix glitchy filenames |
|
673
621
|
| `zip_crc` | `?zip=crc` | cp437 with crc32 computed early for truly ancient software |
|
674
622
|
|
675
623
|
* gzip default level is `3` (0=fast, 9=best), change with `?tar=gz:9`
|
@@ -677,7 +625,7 @@ select which type of archive you want in the `[⚙️] config` tab:
|
|
677
625
|
* bz2 default level is `2` (1=fast, 9=best), change with `?tar=bz2:9`
|
678
626
|
* hidden files ([dotfiles](#dotfiles)) are excluded unless account is allowed to list them
|
679
627
|
* `up2k.db` and `dir.txt` is always excluded
|
680
|
-
* bsdtar supports streaming unzipping: `curl foo?zip
|
628
|
+
* bsdtar supports streaming unzipping: `curl foo?zip | bsdtar -xv`
|
681
629
|
* good, because copyparty's zip is faster than tar on small files
|
682
630
|
* `zip_crc` will take longer to download since the server has to read each file twice
|
683
631
|
* this is only to support MS-DOS PKZIP v2.04g (october 1993) and older
|
@@ -701,7 +649,7 @@ dragdrop is the recommended way, but you may also:
|
|
701
649
|
|
702
650
|
* select some files (not folders) in your file explorer and press CTRL-V inside the browser window
|
703
651
|
* use the [command-line uploader](https://github.com/9001/copyparty/tree/hovudstraum/bin#u2cpy)
|
704
|
-
* upload using [curl
|
652
|
+
* upload using [curl, sharex, ishare, ...](#client-examples)
|
705
653
|
|
706
654
|
when uploading files through dragdrop or CTRL-V, this initiates an upload using `up2k`; there are two browser-based uploaders available:
|
707
655
|
* `[🎈] bup`, the basic uploader, supports almost every browser since netscape 4.0
|
@@ -1159,6 +1107,8 @@ on macos, connect from finder:
|
|
1159
1107
|
|
1160
1108
|
in order to grant full write-access to webdav clients, the volflag `daw` must be set and the account must also have delete-access (otherwise the client won't be allowed to replace the contents of existing files, which is how webdav works)
|
1161
1109
|
|
1110
|
+
> note: if you have enabled [IdP authentication](#identity-providers) then that may cause issues for some/most webdav clients; see [the webdav section in the IdP docs](https://github.com/9001/copyparty/blob/hovudstraum/docs/idp.md#connecting-webdav-clients)
|
1111
|
+
|
1162
1112
|
|
1163
1113
|
### connecting to webdav from windows
|
1164
1114
|
|
@@ -1509,6 +1459,23 @@ there's a bunch of flags and stuff, see `--help-hooks`
|
|
1509
1459
|
if you want to write your own hooks, see [devnotes](./docs/devnotes.md#event-hooks)
|
1510
1460
|
|
1511
1461
|
|
1462
|
+
### zeromq
|
1463
|
+
|
1464
|
+
event-hooks can send zeromq messages instead of running programs
|
1465
|
+
|
1466
|
+
to send a 0mq message every time a file is uploaded,
|
1467
|
+
|
1468
|
+
* `--xau zmq:pub:tcp://*:5556` sends a PUB to any/all connected SUB clients
|
1469
|
+
* `--xau t3,zmq:push:tcp://*:5557` sends a PUSH to exactly one connected PULL client
|
1470
|
+
* `--xau t3,j,zmq:req:tcp://localhost:5555` sends a REQ to the connected REP client
|
1471
|
+
|
1472
|
+
the PUSH and REQ examples have `t3` (timeout after 3 seconds) because they block if there's no clients to talk to
|
1473
|
+
|
1474
|
+
* the REQ example does `t3,j` to send extended upload-info as json instead of just the filesystem-path
|
1475
|
+
|
1476
|
+
see [zmq-recv.py](https://github.com/9001/copyparty/blob/hovudstraum/bin/zmq-recv.py) if you need something to receive the messages with
|
1477
|
+
|
1478
|
+
|
1512
1479
|
### upload events
|
1513
1480
|
|
1514
1481
|
the older, more powerful approach ([examples](./bin/mtag/)):
|
@@ -1596,12 +1563,16 @@ connecting to an aws s3 bucket and similar
|
|
1596
1563
|
|
1597
1564
|
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
|
1598
1565
|
|
1599
|
-
you
|
1566
|
+
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
|
1567
|
+
|
1568
|
+
> 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)
|
1600
1569
|
|
1601
1570
|
someone has also tested geesefs in combination with [gocryptfs](https://nuetzlich.net/gocryptfs/) with surprisingly good results, getting 60 MiB/s upload speeds on a gbit line, but JuiceFS won with 80 MiB/s using its built-in encryption
|
1602
1571
|
|
1603
1572
|
you may improve performance by specifying larger values for `--iobuf` / `--s-rd-sz` / `--s-wr-sz`
|
1604
1573
|
|
1574
|
+
> if you've experimented with this and made interesting observations, please share your findings so we can add a section with specific recommendations :-)
|
1575
|
+
|
1605
1576
|
|
1606
1577
|
## hiding from google
|
1607
1578
|
|
@@ -1724,10 +1695,16 @@ some reverse proxies (such as [Caddy](https://caddyserver.com/)) can automatical
|
|
1724
1695
|
|
1725
1696
|
for improved security (and a 10% performance boost) consider listening on a unix-socket with `-i unix:770:www:/tmp/party.sock` (permission `770` means only members of group `www` can access it)
|
1726
1697
|
|
1727
|
-
example webserver configs:
|
1698
|
+
example webserver / reverse-proxy configs:
|
1728
1699
|
|
1729
|
-
* [
|
1730
|
-
*
|
1700
|
+
* [apache config](contrib/apache/copyparty.conf)
|
1701
|
+
* caddy uds: `caddy reverse-proxy --from :8080 --to unix///dev/shm/party.sock`
|
1702
|
+
* caddy tcp: `caddy reverse-proxy --from :8081 --to http://127.0.0.1:3923`
|
1703
|
+
* [haproxy config](contrib/haproxy/copyparty.conf)
|
1704
|
+
* [lighttpd subdomain](contrib/lighttpd/subdomain.conf) -- entire domain/subdomain
|
1705
|
+
* [lighttpd subpath](contrib/lighttpd/subpath.conf) -- location-based (not optimal, but in case you need it)
|
1706
|
+
* [nginx config](contrib/nginx/copyparty.conf) -- recommended
|
1707
|
+
* [traefik config](contrib/traefik/copyparty.yaml)
|
1731
1708
|
|
1732
1709
|
|
1733
1710
|
### real-ip
|
@@ -1739,6 +1716,38 @@ if you (and maybe everybody else) keep getting a message that says `thank you fo
|
|
1739
1716
|
for most common setups, there should be a helpful message in the server-log explaining what to do, but see [docs/xff.md](docs/xff.md) if you want to learn more, including a quick hack to **just make it work** (which is **not** recommended, but hey...)
|
1740
1717
|
|
1741
1718
|
|
1719
|
+
### reverse-proxy performance
|
1720
|
+
|
1721
|
+
most reverse-proxies support connecting to copyparty either using uds/unix-sockets (`/dev/shm/party.sock`, faster/recommended) or using tcp (`127.0.0.1`)
|
1722
|
+
|
1723
|
+
with copyparty listening on a uds / unix-socket / unix-domain-socket and the reverse-proxy connecting to that:
|
1724
|
+
|
1725
|
+
| index.html | upload | download | software |
|
1726
|
+
| ------------ | ----------- | ----------- | -------- |
|
1727
|
+
| 28'900 req/s | 6'900 MiB/s | 7'400 MiB/s | no-proxy |
|
1728
|
+
| 18'750 req/s | 3'500 MiB/s | 2'370 MiB/s | haproxy |
|
1729
|
+
| 9'900 req/s | 3'750 MiB/s | 2'200 MiB/s | caddy |
|
1730
|
+
| 18'700 req/s | 2'200 MiB/s | 1'570 MiB/s | nginx |
|
1731
|
+
| 9'700 req/s | 1'750 MiB/s | 1'830 MiB/s | apache |
|
1732
|
+
| 9'900 req/s | 1'300 MiB/s | 1'470 MiB/s | lighttpd |
|
1733
|
+
|
1734
|
+
when connecting the reverse-proxy to `127.0.0.1` instead (the basic and/or old-fasioned way), speeds are a bit worse:
|
1735
|
+
|
1736
|
+
| index.html | upload | download | software |
|
1737
|
+
| ------------ | ----------- | ----------- | -------- |
|
1738
|
+
| 21'200 req/s | 5'700 MiB/s | 6'700 MiB/s | no-proxy |
|
1739
|
+
| 14'500 req/s | 1'700 MiB/s | 2'170 MiB/s | haproxy |
|
1740
|
+
| 11'100 req/s | 2'750 MiB/s | 2'000 MiB/s | traefik |
|
1741
|
+
| 8'400 req/s | 2'300 MiB/s | 1'950 MiB/s | caddy |
|
1742
|
+
| 13'400 req/s | 1'100 MiB/s | 1'480 MiB/s | nginx |
|
1743
|
+
| 8'400 req/s | 1'000 MiB/s | 1'000 MiB/s | apache |
|
1744
|
+
| 6'500 req/s | 1'270 MiB/s | 1'500 MiB/s | lighttpd |
|
1745
|
+
|
1746
|
+
in summary, `haproxy > caddy > traefik > nginx > apache > lighttpd`, and use uds when possible (traefik does not support it yet)
|
1747
|
+
|
1748
|
+
* if these results are bullshit because my config exampels are bad, please submit corrections!
|
1749
|
+
|
1750
|
+
|
1742
1751
|
## prometheus
|
1743
1752
|
|
1744
1753
|
metrics/stats can be enabled at URL `/.cpr/metrics` for grafana / prometheus / etc (openmetrics 1.0.0)
|
@@ -2052,7 +2061,8 @@ interact with copyparty using non-browser clients
|
|
2052
2061
|
* can be downloaded from copyparty: controlpanel -> connect -> [partyfuse.py](http://127.0.0.1:3923/.cpr/a/partyfuse.py)
|
2053
2062
|
* [rclone](https://rclone.org/) as client can give ~5x performance, see [./docs/rclone.md](docs/rclone.md)
|
2054
2063
|
|
2055
|
-
* sharex (screenshot utility): see [./contrib/sharex.sxcu](contrib/#sharexsxcu)
|
2064
|
+
* sharex (screenshot utility): see [./contrib/sharex.sxcu](./contrib/#sharexsxcu)
|
2065
|
+
* and for screenshots on macos, see [./contrib/ishare.iscu](./contrib/#ishareiscu)
|
2056
2066
|
* and for screenshots on linux, see [./contrib/flameshot.sh](./contrib/flameshot.sh)
|
2057
2067
|
|
2058
2068
|
* contextlet (web browser integration); see [contrib contextlet](contrib/#send-to-cppcontextletjson)
|
@@ -2316,13 +2326,13 @@ mandatory deps:
|
|
2316
2326
|
|
2317
2327
|
install these to enable bonus features
|
2318
2328
|
|
2319
|
-
enable hashed passwords in config: `argon2-cffi`
|
2329
|
+
enable [hashed passwords](#password-hashing) in config: `argon2-cffi`
|
2320
2330
|
|
2321
|
-
enable ftp-server:
|
2331
|
+
enable [ftp-server](#ftp-server):
|
2322
2332
|
* for just plaintext FTP, `pyftpdlib` (is built into the SFX)
|
2323
2333
|
* with TLS encryption, `pyftpdlib pyopenssl`
|
2324
2334
|
|
2325
|
-
enable music tags:
|
2335
|
+
enable [music tags](#metadata-from-audio-files):
|
2326
2336
|
* either `mutagen` (fast, pure-python, skips a few tags, makes copyparty GPL? idk)
|
2327
2337
|
* or `ffprobe` (20x slower, more accurate, possibly dangerous depending on your distro and users)
|
2328
2338
|
|
@@ -2333,8 +2343,9 @@ enable [thumbnails](#thumbnails) of...
|
|
2333
2343
|
* **AVIF pictures:** `pyvips` or `ffmpeg` or `pillow-avif-plugin`
|
2334
2344
|
* **JPEG XL pictures:** `pyvips` or `ffmpeg`
|
2335
2345
|
|
2336
|
-
enable [
|
2337
|
-
|
2346
|
+
enable sending [zeromq messages](#zeromq) from event-hooks: `pyzmq`
|
2347
|
+
|
2348
|
+
enable [smb](#smb-server) support (**not** recommended): `impacket==0.12.0`
|
2338
2349
|
|
2339
2350
|
`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`
|
2340
2351
|
|
@@ -54,6 +54,8 @@ from .util import (
|
|
54
54
|
RAM_TOTAL,
|
55
55
|
SQLITE_VER,
|
56
56
|
UNPLICATIONS,
|
57
|
+
URL_BUG,
|
58
|
+
URL_PRJ,
|
57
59
|
Daemon,
|
58
60
|
align_tab,
|
59
61
|
ansi_re,
|
@@ -326,17 +328,16 @@ def ensure_webdeps() :
|
|
326
328
|
if has_resource(E, "web/deps/mini-fa.woff"):
|
327
329
|
return
|
328
330
|
|
329
|
-
|
330
|
-
"""could not find webdeps;
|
331
|
+
t = """could not find webdeps;
|
331
332
|
if you are running the sfx, or exe, or pypi package, or docker image,
|
332
333
|
then this is a bug! Please let me know so I can fix it, thanks :-)
|
333
|
-
|
334
|
+
%s
|
334
335
|
|
335
336
|
however, if you are a dev, or running copyparty from source, and you want
|
336
337
|
full client functionality, you will need to build or obtain the webdeps:
|
337
|
-
|
338
|
+
%s/blob/hovudstraum/docs/devnotes.md#building
|
338
339
|
"""
|
339
|
-
)
|
340
|
+
warn(t % (URL_BUG, URL_PRJ))
|
340
341
|
|
341
342
|
|
342
343
|
def configure_ssl_ver(al ) :
|
@@ -731,6 +732,10 @@ def get_sects():
|
|
731
732
|
the \033[33m,,\033[35m stops copyparty from reading the rest as flags and
|
732
733
|
the \033[33m--\033[35m stops notify-send from reading the message as args
|
733
734
|
and the alert will be "hey" followed by the messagetext
|
735
|
+
|
736
|
+
\033[36m--xau zmq:pub:tcp://*:5556\033[35m announces uploads on zeromq;
|
737
|
+
\033[36m--xau t3,zmq:push:tcp://*:5557\033[35m also works, and you can
|
738
|
+
\033[36m--xau t3,j,zmq:req:tcp://localhost:5555\033[35m too for example
|
734
739
|
\033[0m
|
735
740
|
each hook is executed once for each event, except for \033[36mxiu\033[0m
|
736
741
|
which builds up a backlog of uploads, running the hook just once
|
@@ -1468,12 +1473,14 @@ def add_ui(ap, retry):
|
|
1468
1473
|
ap2.add_argument("--txt-max", metavar="KiB", type=int, default=64, help="max size of embedded textfiles on ?doc= (anything bigger will be lazy-loaded by JS)")
|
1469
1474
|
ap2.add_argument("--doctitle", metavar="TXT", type=u, default="copyparty @ --name", help="title / service-name to show in html documents")
|
1470
1475
|
ap2.add_argument("--bname", metavar="TXT", type=u, default="--name", help="server name (displayed in filebrowser document title)")
|
1471
|
-
ap2.add_argument("--pb-url", metavar="URL", type=u, default=
|
1476
|
+
ap2.add_argument("--pb-url", metavar="URL", type=u, default=URL_PRJ, help="powered-by link; disable with \033[33m-np\033[0m")
|
1472
1477
|
ap2.add_argument("--ver", action="store_true", help="show version on the control panel (incompatible with \033[33m-nb\033[0m)")
|
1473
1478
|
ap2.add_argument("--k304", metavar="NUM", type=int, default=0, help="configure the option to enable/disable k304 on the controlpanel (workaround for buggy reverse-proxies); [\033[32m0\033[0m] = hidden and default-off, [\033[32m1\033[0m] = visible and default-off, [\033[32m2\033[0m] = visible and default-on")
|
1474
1479
|
ap2.add_argument("--no304", metavar="NUM", type=int, default=0, help="configure the option to enable/disable no304 on the controlpanel (workaround for buggy caching in browsers); [\033[32m0\033[0m] = hidden and default-off, [\033[32m1\033[0m] = visible and default-off, [\033[32m2\033[0m] = visible and default-on")
|
1475
|
-
ap2.add_argument("--md-sbf", metavar="FLAGS", type=u, default="downloads forms popups scripts top-navigation-by-user-activation", help="list of capabilities to
|
1476
|
-
ap2.add_argument("--lg-sbf", metavar="FLAGS", type=u, default="downloads forms popups scripts top-navigation-by-user-activation", help="list of capabilities to
|
1480
|
+
ap2.add_argument("--md-sbf", metavar="FLAGS", type=u, default="downloads forms popups scripts top-navigation-by-user-activation", help="list of capabilities to allow in the iframe 'sandbox' attribute for README.md docs (volflag=md_sbf); see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#sandbox")
|
1481
|
+
ap2.add_argument("--lg-sbf", metavar="FLAGS", type=u, default="downloads forms popups scripts top-navigation-by-user-activation", help="list of capabilities to allow in the iframe 'sandbox' attribute for prologue/epilogue docs (volflag=lg_sbf)")
|
1482
|
+
ap2.add_argument("--md-sba", metavar="TXT", type=u, default="", help="the value of the iframe 'allow' attribute for README.md docs, for example [\033[32mfullscreen\033[0m] (volflag=md_sba)")
|
1483
|
+
ap2.add_argument("--lg-sba", metavar="TXT", type=u, default="", help="the value of the iframe 'allow' attribute for prologue/epilogue docs (volflag=lg_sba); see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy#iframes")
|
1477
1484
|
ap2.add_argument("--no-sb-md", action="store_true", help="don't sandbox README/PREADME.md documents (volflags: no_sb_md | sb_md)")
|
1478
1485
|
ap2.add_argument("--no-sb-lg", action="store_true", help="don't sandbox prologue/epilogue docs (volflags: no_sb_lg | sb_lg); enables non-js support")
|
1479
1486
|
|
@@ -1825,7 +1825,11 @@ class AuthSrv(object):
|
|
1825
1825
|
if fka and not fk:
|
1826
1826
|
fk = fka
|
1827
1827
|
if fk:
|
1828
|
-
|
1828
|
+
fk = 8 if fk is True else int(fk)
|
1829
|
+
if fk > 72:
|
1830
|
+
t = "max filekey-length is 72; volume /%s specified %d (anything higher than 16 is pointless btw)"
|
1831
|
+
raise Exception(t % (vol.vpath, fk))
|
1832
|
+
vol.flags["fk"] = fk
|
1829
1833
|
have_fk = True
|
1830
1834
|
|
1831
1835
|
dk = vol.flags.get("dk")
|
@@ -2332,6 +2336,7 @@ class AuthSrv(object):
|
|
2332
2336
|
"frand": bool(vf.get("rand")),
|
2333
2337
|
"lifetime": vf.get("lifetime") or 0,
|
2334
2338
|
"unlist": vf.get("unlist") or "",
|
2339
|
+
"sb_lg": "" if "no_sb_lg" in vf else (vf.get("lg_sbf") or "y"),
|
2335
2340
|
}
|
2336
2341
|
js_htm = {
|
2337
2342
|
"s_name": self.args.bname,
|
@@ -2344,6 +2349,8 @@ class AuthSrv(object):
|
|
2344
2349
|
"have_unpost": int(self.args.unpost),
|
2345
2350
|
"have_emp": self.args.emp,
|
2346
2351
|
"sb_md": "" if "no_sb_md" in vf else (vf.get("md_sbf") or "y"),
|
2352
|
+
"sba_md": vf.get("md_sba") or "",
|
2353
|
+
"sba_lg": vf.get("lg_sba") or "",
|
2347
2354
|
"txt_ext": self.args.textfiles.replace(",", " "),
|
2348
2355
|
"def_hcols": list(vf.get("mth") or []),
|
2349
2356
|
"unlist0": vf.get("unlist") or "",
|
@@ -74,6 +74,8 @@ def vf_vmap() :
|
|
74
74
|
"html_head",
|
75
75
|
"lg_sbf",
|
76
76
|
"md_sbf",
|
77
|
+
"lg_sba",
|
78
|
+
"md_sba",
|
77
79
|
"nrand",
|
78
80
|
"og_desc",
|
79
81
|
"og_site",
|
@@ -144,6 +146,7 @@ flagcats = {
|
|
144
146
|
"noclone": "take dupe data from clients, even if available on HDD",
|
145
147
|
"nodupe": "rejects existing files (instead of linking/cloning them)",
|
146
148
|
"sparse": "force use of sparse files, mainly for s3-backed storage",
|
149
|
+
"nosparse": "deny use of sparse files, mainly for slow storage",
|
147
150
|
"daw": "enable full WebDAV write support (dangerous);\nPUT-operations will now \033[1;31mOVERWRITE\033[0;35m existing files",
|
148
151
|
"nosub": "forces all uploads into the top folder of the vfs",
|
149
152
|
"magic": "enables filetype detection for nameless uploads",
|
@@ -240,6 +243,8 @@ flagcats = {
|
|
240
243
|
"sb_lg": "enable js sandbox for prologue/epilogue (default)",
|
241
244
|
"md_sbf": "list of markdown-sandbox safeguards to disable",
|
242
245
|
"lg_sbf": "list of *logue-sandbox safeguards to disable",
|
246
|
+
"md_sba": "value of iframe allow-prop for markdown-sandbox",
|
247
|
+
"lg_sba": "value of iframe allow-prop for *logue-sandbox",
|
243
248
|
"nohtml": "return html and markdown as text/html",
|
244
249
|
},
|
245
250
|
"others": {
|