copyparty 1.15.5__tar.gz → 1.15.7__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.15.5 → copyparty-1.15.7}/PKG-INFO +78 -23
- {copyparty-1.15.5 → copyparty-1.15.7}/README.md +77 -22
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/__main__.py +7 -4
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/__version__.py +2 -2
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/authsrv.py +1 -1
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/cfg.py +3 -1
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/ftpd.py +4 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/httpcli.py +77 -26
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/httpconn.py +2 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/httpsrv.py +6 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/mtag.py +1 -1
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/ssdp.py +1 -1
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/svchub.py +6 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/tcpsrv.py +1 -1
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/up2k.py +76 -35
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/util.py +35 -4
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/a/u2c.py +30 -12
- copyparty-1.15.7/copyparty/web/browser.css.gz +0 -0
- copyparty-1.15.7/copyparty/web/browser.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty.egg-info/PKG-INFO +78 -23
- copyparty-1.15.5/copyparty/web/browser.css.gz +0 -0
- copyparty-1.15.5/copyparty/web/browser.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/LICENSE +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/__init__.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/bos/__init__.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/bos/bos.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/bos/path.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/broker_mp.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/broker_mpw.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/broker_thr.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/broker_util.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/cert.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/dxml.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/fsutil.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/ico.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/mdns.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/metrics.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/multicast.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/pwhash.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/res/COPYING.txt +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/res/__init__.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/res/insecure.pem +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/smbd.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/star.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/__init__.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/dnslib/__init__.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/dnslib/bimap.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/dnslib/bit.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/dnslib/buffer.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/dnslib/dns.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/dnslib/label.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/dnslib/lex.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/dnslib/ranges.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/ifaddr/__init__.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/ifaddr/_posix.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/ifaddr/_shared.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/ifaddr/_win32.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/qrcodegen.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/stolen/surrogateescape.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/sutil.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/szip.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/tftpd.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/th_cli.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/th_srv.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/u2idx.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/a/__init__.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/a/partyfuse.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/a/webdav-cfg.bat +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/baguettebox.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/browser.html +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/browser2.html +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/cf.html +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/dbg-audio.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/dd/2.png +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/dd/3.png +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/dd/4.png +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/dd/5.png +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/dd/__init__.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/__init__.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/busy.mp3.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/easymde.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/easymde.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/fuse.py +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/marked.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/mini-fa.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/mini-fa.woff +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/prism.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/prism.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/prismd.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/scp.woff2 +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/sha512.ac.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/deps/sha512.hw.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/md.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/md.html +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/md.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/md2.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/md2.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/mde.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/mde.html +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/mde.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/msg.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/msg.html +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/shares.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/shares.html +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/shares.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/splash.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/splash.html +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/splash.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/svcs.html +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/svcs.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/ui.css.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/up2k.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/util.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty/web/w.hash.js.gz +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty.egg-info/SOURCES.txt +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty.egg-info/dependency_links.txt +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty.egg-info/entry_points.txt +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty.egg-info/requires.txt +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/copyparty.egg-info/top_level.txt +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/pyproject.toml +0 -0
- {copyparty-1.15.5 → copyparty-1.15.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: copyparty
|
3
|
-
Version: 1.15.
|
3
|
+
Version: 1.15.7
|
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
|
@@ -134,12 +134,14 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
134
134
|
* [event hooks](#event-hooks) - trigger a program on uploads, renames etc ([examples](./bin/hooks/))
|
135
135
|
* [upload events](#upload-events) - the older, more powerful approach ([examples](./bin/mtag/))
|
136
136
|
* [handlers](#handlers) - redefine behavior with plugins ([examples](./bin/handlers/))
|
137
|
+
* [ip auth](#ip-auth) - autologin based on IP range (CIDR)
|
137
138
|
* [identity providers](#identity-providers) - replace copyparty passwords with oauth and such
|
138
139
|
* [user-changeable passwords](#user-changeable-passwords) - if permitted, users can change their own passwords
|
139
140
|
* [using the cloud as storage](#using-the-cloud-as-storage) - connecting to an aws s3 bucket and similar
|
140
|
-
* [hiding from google](#hiding-from-google) - tell search engines you
|
141
|
+
* [hiding from google](#hiding-from-google) - tell search engines you don't wanna be indexed
|
141
142
|
* [themes](#themes)
|
142
143
|
* [complete examples](#complete-examples)
|
144
|
+
* [listen on port 80 and 443](#listen-on-port-80-and-443) - become a *real* webserver
|
143
145
|
* [reverse-proxy](#reverse-proxy) - running copyparty next to other websites
|
144
146
|
* [real-ip](#real-ip) - teaching copyparty how to see client IPs
|
145
147
|
* [prometheus](#prometheus) - metrics/stats can be enabled
|
@@ -168,7 +170,7 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
168
170
|
* [https](#https) - both HTTP and HTTPS are accepted
|
169
171
|
* [recovering from crashes](#recovering-from-crashes)
|
170
172
|
* [client crashes](#client-crashes)
|
171
|
-
* [
|
173
|
+
* [firefox wsod](#firefox-wsod) - firefox 87 can crash during uploads
|
172
174
|
* [HTTP API](#HTTP-API) - see [devnotes](./docs/devnotes.md#http-api)
|
173
175
|
* [dependencies](#dependencies) - mandatory deps
|
174
176
|
* [optional dependencies](#optional-dependencies) - install these to enable bonus features
|
@@ -635,7 +637,7 @@ it does static images with Pillow / pyvips / FFmpeg, and uses FFmpeg for video f
|
|
635
637
|
* pyvips is 3x faster than Pillow, Pillow is 3x faster than FFmpeg
|
636
638
|
* disable thumbnails for specific volumes with volflag `dthumb` for all, or `dvthumb` / `dathumb` / `dithumb` for video/audio/images only
|
637
639
|
|
638
|
-
audio files are
|
640
|
+
audio files are converted into spectrograms using FFmpeg unless you `--no-athumb` (and some FFmpeg builds may need `--th-ff-swr`)
|
639
641
|
|
640
642
|
images with the following names (see `--th-covers`) become the thumbnail of the folder they're in: `folder.png`, `folder.jpg`, `cover.png`, `cover.jpg`
|
641
643
|
* the order is significant, so if both `cover.png` and `folder.jpg` exist in a folder, it will pick the first matching `--th-covers` entry (`folder.jpg`)
|
@@ -721,7 +723,7 @@ see [up2k](./docs/devnotes.md#up2k) for details on how it works, or watch a [dem
|
|
721
723
|
|
722
724
|
**protip:** if you enable `favicon` in the `[⚙️] settings` tab (by typing something into the textbox), the icon in the browser tab will indicate upload progress -- also, the `[🔔]` and/or `[🔊]` switches enable visible and/or audible notifications on upload completion
|
723
725
|
|
724
|
-
the up2k UI is the epitome of polished
|
726
|
+
the up2k UI is the epitome of polished intuitive experiences:
|
725
727
|
* "parallel uploads" specifies how many chunks to upload at the same time
|
726
728
|
* `[🏃]` analysis of other files should continue while one is uploading
|
727
729
|
* `[🥔]` shows a simpler UI for faster uploads from slow devices
|
@@ -770,7 +772,7 @@ you can unpost even if you don't have regular move/delete access, however only f
|
|
770
772
|
|
771
773
|
### self-destruct
|
772
774
|
|
773
|
-
uploads can be given a lifetime,
|
775
|
+
uploads can be given a lifetime, after which they expire / self-destruct
|
774
776
|
|
775
777
|
the feature must be enabled per-volume with the `lifetime` [upload rule](#upload-rules) which sets the upper limit for how long a file gets to stay on the server
|
776
778
|
|
@@ -797,7 +799,7 @@ the control-panel shows the ETA for all incoming files , but only for files bei
|
|
797
799
|
|
798
800
|
cut/paste, rename, and delete files/folders (if you have permission)
|
799
801
|
|
800
|
-
file selection: click somewhere on the line (not the link
|
802
|
+
file selection: click somewhere on the line (not the link itself), then:
|
801
803
|
* `space` to toggle
|
802
804
|
* `up/down` to move
|
803
805
|
* `shift-up/down` to move-and-select
|
@@ -991,6 +993,8 @@ see [./srv/expand/](./srv/expand/) for usage and examples
|
|
991
993
|
|
992
994
|
* files named `README.md` / `readme.md` will be rendered after directory listings unless `--no-readme` (but `.epilogue.html` takes precedence)
|
993
995
|
|
996
|
+
* and `PREADME.md` / `preadme.md` is shown above directory listings unless `--no-readme` or `.prologue.html`
|
997
|
+
|
994
998
|
* `README.md` and `*logue.html` can contain placeholder values which are replaced server-side before embedding into directory listings; see `--help-exp`
|
995
999
|
|
996
1000
|
|
@@ -1042,7 +1046,11 @@ uses [multicast dns](https://en.wikipedia.org/wiki/Multicast_DNS) to give copypa
|
|
1042
1046
|
|
1043
1047
|
all enabled services ([webdav](#webdav-server), [ftp](#ftp-server), [smb](#smb-server)) will appear in mDNS-aware file managers (KDE, gnome, macOS, ...)
|
1044
1048
|
|
1045
|
-
the domain will be
|
1049
|
+
the domain will be `partybox.local` if the machine's hostname is `partybox` unless `--name` specifies something else
|
1050
|
+
|
1051
|
+
and the web-UI will be available at http://partybox.local:3923/
|
1052
|
+
|
1053
|
+
* if you want to get rid of the `:3923` so you can use http://partybox.local/ instead then see [listen on port 80 and 443](#listen-on-port-80-and-443)
|
1046
1054
|
|
1047
1055
|
|
1048
1056
|
### ssdp
|
@@ -1068,7 +1076,7 @@ print a qr-code [(screenshot)](https://user-images.githubusercontent.com/241032/
|
|
1068
1076
|
* `--qrz 1` forces 1x zoom instead of autoscaling to fit the terminal size
|
1069
1077
|
* 1x may render incorrectly on some terminals/fonts, but 2x should always work
|
1070
1078
|
|
1071
|
-
it uses the server hostname if [mdns](#mdns) is
|
1079
|
+
it uses the server hostname if [mdns](#mdns) is enabled, otherwise it'll use your external ip (default route) unless `--qri` specifies a specific ip-prefix or domain
|
1072
1080
|
|
1073
1081
|
|
1074
1082
|
## ftp server
|
@@ -1093,7 +1101,7 @@ some recommended FTP / FTPS clients; `wark` = example password:
|
|
1093
1101
|
|
1094
1102
|
## webdav server
|
1095
1103
|
|
1096
|
-
with read-write support, supports winXP and later, macos, nautilus/gvfs ... a
|
1104
|
+
with read-write support, supports winXP and later, macos, nautilus/gvfs ... a great way to [access copyparty straight from the file explorer in your OS](#mount-as-drive)
|
1097
1105
|
|
1098
1106
|
click the [connect](http://127.0.0.1:3923/?hc) button in the control-panel to see connection instructions for windows, linux, macos
|
1099
1107
|
|
@@ -1197,8 +1205,8 @@ authenticate with one of the following:
|
|
1197
1205
|
tweaking the ui
|
1198
1206
|
|
1199
1207
|
* set default sort order globally with `--sort` or per-volume with the `sort` volflag; specify one or more comma-separated columns to sort by, and prefix the column name with `-` for reverse sort
|
1200
|
-
* the column names you can use are visible as tooltips when hovering over the column headers in the directory listing, for example `href ext sz ts tags/.up_at tags/
|
1201
|
-
* to sort in music order (album, track, artist, title) with filename as fallback, you could `--sort tags/
|
1208
|
+
* the column names you can use are visible as tooltips when hovering over the column headers in the directory listing, for example `href ext sz ts tags/.up_at tags/Circle tags/.tn tags/Artist tags/Title`
|
1209
|
+
* to sort in music order (album, track, artist, title) with filename as fallback, you could `--sort tags/Circle,tags/.tn,tags/Artist,tags/Title,href`
|
1202
1210
|
* to sort by upload date, first enable showing the upload date in the listing with `-e2d -mte +.up_at` and then `--sort tags/.up_at`
|
1203
1211
|
|
1204
1212
|
see [./docs/rice](./docs/rice) for more, including how to add stuff (css/`<meta>`/...) to the html `<head>` tag, or to add your own translation
|
@@ -1221,7 +1229,11 @@ if you want to entirely replace the copyparty response with your own jinja2 temp
|
|
1221
1229
|
|
1222
1230
|
enable symlink-based upload deduplication globally with `--dedup` or per-volume with volflag `dedup`
|
1223
1231
|
|
1224
|
-
when someone tries to upload a file that already exists on the server, the upload will be politely declined and
|
1232
|
+
by default, when someone tries to upload a file that already exists on the server, the upload will be politely declined, and the server will copy the existing file over to where the upload would have gone
|
1233
|
+
|
1234
|
+
if you enable deduplication with `--dedup` then it'll create a symlink instead of a full copy, thus reducing disk space usage
|
1235
|
+
|
1236
|
+
* on the contrary, if your server is hooked up to s3-glacier or similar storage where reading is expensive, and you cannot use `--safe-dedup=1` because you have other software tampering with your files, so you want to entirely disable detection of duplicate data instead, then you can specify `--no-clone` globally or `noclone` as a volflag
|
1225
1237
|
|
1226
1238
|
**warning:** when enabling dedup, you should also:
|
1227
1239
|
* enable indexing with `-e2dsa` or volflag `e2dsa` (see [file indexing](#file-indexing) section below); strongly recommended
|
@@ -1262,7 +1274,7 @@ through arguments:
|
|
1262
1274
|
* `-e2t` enables metadata indexing on upload
|
1263
1275
|
* `-e2ts` also scans for tags in all files that don't have tags yet
|
1264
1276
|
* `-e2tsr` also deletes all existing tags, doing a full reindex
|
1265
|
-
* `-e2v`
|
1277
|
+
* `-e2v` verifies file integrity at startup, comparing hashes from the db
|
1266
1278
|
* `-e2vu` patches the database with the new hashes from the filesystem
|
1267
1279
|
* `-e2vp` panics and kills copyparty instead
|
1268
1280
|
|
@@ -1475,11 +1487,27 @@ redefine behavior with plugins ([examples](./bin/handlers/))
|
|
1475
1487
|
replace 404 and 403 errors with something completely different (that's it for now)
|
1476
1488
|
|
1477
1489
|
|
1490
|
+
## ip auth
|
1491
|
+
|
1492
|
+
autologin based on IP range (CIDR) , using the global-option `--ipu`
|
1493
|
+
|
1494
|
+
for example, if everyone with an IP that starts with `192.168.123` should automatically log in as the user `spartacus`, then you can either specify `--ipu=192.168.123.0/24=spartacus` as a commandline option, or put this in a config file:
|
1495
|
+
|
1496
|
+
```yaml
|
1497
|
+
[global]
|
1498
|
+
ipu: 192.168.123.0/24=spartacus
|
1499
|
+
```
|
1500
|
+
|
1501
|
+
repeat the option to map additional subnets
|
1502
|
+
|
1503
|
+
**be careful with this one!** if you have a reverseproxy, then you definitely want to make sure you have [real-ip](#real-ip) configured correctly, and it's probably a good idea to nullmap the reverseproxy's IP just in case; so if your reverseproxy is sending requests from `172.24.27.9` then that would be `--ipu=172.24.27.9/32=`
|
1504
|
+
|
1505
|
+
|
1478
1506
|
## identity providers
|
1479
1507
|
|
1480
1508
|
replace copyparty passwords with oauth and such
|
1481
1509
|
|
1482
|
-
you can disable the built-in password-based login
|
1510
|
+
you can disable the built-in password-based login system, and instead replace it with a separate piece of software (an identity provider) which will then handle authenticating / authorizing of users; this makes it possible to login with passkeys / fido2 / webauthn / yubikey / ldap / active directory / oauth / many other single-sign-on contraptions
|
1483
1511
|
|
1484
1512
|
a popular choice is [Authelia](https://www.authelia.com/) (config-file based), another one is [authentik](https://goauthentik.io/) (GUI-based, more complex)
|
1485
1513
|
|
@@ -1506,7 +1534,7 @@ if permitted, users can change their own passwords in the control-panel
|
|
1506
1534
|
|
1507
1535
|
* if you run multiple copyparty instances with different users you *almost definitely* want to specify separate DBs for each instance
|
1508
1536
|
|
1509
|
-
* if [password hashing](#password-hashing) is
|
1537
|
+
* if [password hashing](#password-hashing) is enabled, the passwords in the db are also hashed
|
1510
1538
|
|
1511
1539
|
* ...which means that all user-defined passwords will be forgotten if you change password-hashing settings
|
1512
1540
|
|
@@ -1526,7 +1554,7 @@ you may improve performance by specifying larger values for `--iobuf` / `--s-rd-
|
|
1526
1554
|
|
1527
1555
|
## hiding from google
|
1528
1556
|
|
1529
|
-
tell search engines you
|
1557
|
+
tell search engines you don't wanna be indexed, either using the good old [robots.txt](https://www.robotstxt.org/robotstxt.html) or through copyparty settings:
|
1530
1558
|
|
1531
1559
|
* `--no-robots` adds HTTP (`X-Robots-Tag`) and HTML (`<meta>`) headers with `noindex, nofollow` globally
|
1532
1560
|
* volflag `[...]:c,norobots` does the same thing for that single volume
|
@@ -1601,6 +1629,33 @@ if you want to change the fonts, see [./docs/rice/](./docs/rice/)
|
|
1601
1629
|
`-lo log/cpp-%Y-%m%d-%H%M%S.txt.xz`
|
1602
1630
|
|
1603
1631
|
|
1632
|
+
## listen on port 80 and 443
|
1633
|
+
|
1634
|
+
become a *real* webserver which people can access by just going to your IP or domain without specifying a port
|
1635
|
+
|
1636
|
+
**if you're on windows,** then you just need to add the commandline argument `-p 80,443` and you're done! nice
|
1637
|
+
|
1638
|
+
**if you're on macos,** sorry, I don't know
|
1639
|
+
|
1640
|
+
**if you're on Linux,** you have the following 4 options:
|
1641
|
+
|
1642
|
+
* **option 1:** set up a [reverse-proxy](#reverse-proxy) -- this one makes a lot of sense if you're running on a proper headless server, because that way you get real HTTPS too
|
1643
|
+
|
1644
|
+
* **option 2:** NAT to port 3923 -- this is cumbersome since you'll need to do it every time you reboot, and the exact command may depend on your linux distribution:
|
1645
|
+
```bash
|
1646
|
+
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3923
|
1647
|
+
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 3923
|
1648
|
+
```
|
1649
|
+
|
1650
|
+
* **option 3:** disable the [security policy](https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html) which prevents the use of 80 and 443; this is *probably* fine:
|
1651
|
+
```
|
1652
|
+
setcap CAP_NET_BIND_SERVICE=+eip $(realpath $(which python))
|
1653
|
+
python copyparty-sfx.py -p 80,443
|
1654
|
+
```
|
1655
|
+
|
1656
|
+
* **option 4:** run copyparty as root (please don't)
|
1657
|
+
|
1658
|
+
|
1604
1659
|
## reverse-proxy
|
1605
1660
|
|
1606
1661
|
running copyparty next to other websites hosted on an existing webserver such as nginx, caddy, or apache
|
@@ -1949,7 +2004,7 @@ interact with copyparty using non-browser clients
|
|
1949
2004
|
|
1950
2005
|
* [igloo irc](https://iglooirc.com/): Method: `post` Host: `https://you.com/up/?want=url&pw=hunter2` Multipart: `yes` File parameter: `f`
|
1951
2006
|
|
1952
|
-
copyparty returns a truncated sha512sum of your PUT/POST as base64; you can generate the same checksum locally to verify
|
2007
|
+
copyparty returns a truncated sha512sum of your PUT/POST as base64; you can generate the same checksum locally to verify uploads:
|
1953
2008
|
|
1954
2009
|
b512(){ printf "$((sha512sum||shasum -a512)|sed -E 's/ .*//;s/(..)/\\x\1/g')"|base64|tr '+/' '-_'|head -c44;}
|
1955
2010
|
b512 <movie.mkv
|
@@ -2049,7 +2104,7 @@ when uploading files,
|
|
2049
2104
|
* up to 30% faster uploads if you hide the upload status list by switching away from the `[🚀]` up2k ui-tab (or closing it)
|
2050
2105
|
* optionally you can switch to the lightweight potato ui by clicking the `[🥔]`
|
2051
2106
|
* switching to another browser-tab also works, the favicon will update every 10 seconds in that case
|
2052
|
-
* unlikely to be a problem, but can happen when
|
2107
|
+
* unlikely to be a problem, but can happen when uploading many small files, or your internet is too fast, or PC too slow
|
2053
2108
|
|
2054
2109
|
|
2055
2110
|
# security
|
@@ -2097,7 +2152,7 @@ other misc notes:
|
|
2097
2152
|
|
2098
2153
|
behavior that might be unexpected
|
2099
2154
|
|
2100
|
-
* users without read-access to a folder can still see the `.prologue.html` / `.epilogue.html` / `README.md` contents, for the purpose of showing a description on how to use the uploader for example
|
2155
|
+
* users without read-access to a folder can still see the `.prologue.html` / `.epilogue.html` / `PREADME.md` / `README.md` contents, for the purpose of showing a description on how to use the uploader for example
|
2101
2156
|
* users can submit `<script>`s which autorun (in a sandbox) for other visitors in a few ways;
|
2102
2157
|
* uploading a `README.md` -- avoid with `--no-readme`
|
2103
2158
|
* renaming `some.html` to `.epilogue.html` -- avoid with either `--no-logues` or `--no-dot-ren`
|
@@ -2175,13 +2230,13 @@ if [cfssl](https://github.com/cloudflare/cfssl/releases/latest) is installed, co
|
|
2175
2230
|
|
2176
2231
|
## client crashes
|
2177
2232
|
|
2178
|
-
###
|
2233
|
+
### firefox wsod
|
2179
2234
|
|
2180
2235
|
firefox 87 can crash during uploads -- the entire browser goes, including all other browser tabs, everything turns white
|
2181
2236
|
|
2182
2237
|
however you can hit `F12` in the up2k tab and use the devtools to see how far you got in the uploads:
|
2183
2238
|
|
2184
|
-
* get a complete list of all uploads, organized by
|
2239
|
+
* get a complete list of all uploads, organized by status (ok / no-good / busy / queued):
|
2185
2240
|
`var tabs = { ok:[], ng:[], bz:[], q:[] }; for (var a of up2k.ui.tab) tabs[a.in].push(a); tabs`
|
2186
2241
|
|
2187
2242
|
* list of filenames which failed:
|
@@ -2298,7 +2353,7 @@ then again, if you are already into downloading shady binaries from the internet
|
|
2298
2353
|
|
2299
2354
|
## zipapp
|
2300
2355
|
|
2301
|
-
another emergency alternative, [copyparty.pyz](https://github.com/9001/copyparty/releases/latest/download/copyparty.pyz) has less features, is slow, requires python 3.7 or newer, worse compression, and more importantly is unable to benefit from more recent versions of jinja2 and such (which makes it less secure)... lots of drawbacks with this one really -- but it does not unpack any
|
2356
|
+
another emergency alternative, [copyparty.pyz](https://github.com/9001/copyparty/releases/latest/download/copyparty.pyz) has less features, is slow, requires python 3.7 or newer, worse compression, and more importantly is unable to benefit from more recent versions of jinja2 and such (which makes it less secure)... lots of drawbacks with this one really -- but it does not unpack any temporary files to disk, so it *may* just work if the regular sfx fails to start because the computer is messed up in certain funky ways, so it's worth a shot if all else fails
|
2302
2357
|
|
2303
2358
|
run it by doubleclicking it, or try typing `python copyparty.pyz` in your terminal/console/commandline/telex if that fails
|
2304
2359
|
|
@@ -80,12 +80,14 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
80
80
|
* [event hooks](#event-hooks) - trigger a program on uploads, renames etc ([examples](./bin/hooks/))
|
81
81
|
* [upload events](#upload-events) - the older, more powerful approach ([examples](./bin/mtag/))
|
82
82
|
* [handlers](#handlers) - redefine behavior with plugins ([examples](./bin/handlers/))
|
83
|
+
* [ip auth](#ip-auth) - autologin based on IP range (CIDR)
|
83
84
|
* [identity providers](#identity-providers) - replace copyparty passwords with oauth and such
|
84
85
|
* [user-changeable passwords](#user-changeable-passwords) - if permitted, users can change their own passwords
|
85
86
|
* [using the cloud as storage](#using-the-cloud-as-storage) - connecting to an aws s3 bucket and similar
|
86
|
-
* [hiding from google](#hiding-from-google) - tell search engines you
|
87
|
+
* [hiding from google](#hiding-from-google) - tell search engines you don't wanna be indexed
|
87
88
|
* [themes](#themes)
|
88
89
|
* [complete examples](#complete-examples)
|
90
|
+
* [listen on port 80 and 443](#listen-on-port-80-and-443) - become a *real* webserver
|
89
91
|
* [reverse-proxy](#reverse-proxy) - running copyparty next to other websites
|
90
92
|
* [real-ip](#real-ip) - teaching copyparty how to see client IPs
|
91
93
|
* [prometheus](#prometheus) - metrics/stats can be enabled
|
@@ -114,7 +116,7 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
114
116
|
* [https](#https) - both HTTP and HTTPS are accepted
|
115
117
|
* [recovering from crashes](#recovering-from-crashes)
|
116
118
|
* [client crashes](#client-crashes)
|
117
|
-
* [
|
119
|
+
* [firefox wsod](#firefox-wsod) - firefox 87 can crash during uploads
|
118
120
|
* [HTTP API](#HTTP-API) - see [devnotes](./docs/devnotes.md#http-api)
|
119
121
|
* [dependencies](#dependencies) - mandatory deps
|
120
122
|
* [optional dependencies](#optional-dependencies) - install these to enable bonus features
|
@@ -581,7 +583,7 @@ it does static images with Pillow / pyvips / FFmpeg, and uses FFmpeg for video f
|
|
581
583
|
* pyvips is 3x faster than Pillow, Pillow is 3x faster than FFmpeg
|
582
584
|
* disable thumbnails for specific volumes with volflag `dthumb` for all, or `dvthumb` / `dathumb` / `dithumb` for video/audio/images only
|
583
585
|
|
584
|
-
audio files are
|
586
|
+
audio files are converted into spectrograms using FFmpeg unless you `--no-athumb` (and some FFmpeg builds may need `--th-ff-swr`)
|
585
587
|
|
586
588
|
images with the following names (see `--th-covers`) become the thumbnail of the folder they're in: `folder.png`, `folder.jpg`, `cover.png`, `cover.jpg`
|
587
589
|
* the order is significant, so if both `cover.png` and `folder.jpg` exist in a folder, it will pick the first matching `--th-covers` entry (`folder.jpg`)
|
@@ -667,7 +669,7 @@ see [up2k](./docs/devnotes.md#up2k) for details on how it works, or watch a [dem
|
|
667
669
|
|
668
670
|
**protip:** if you enable `favicon` in the `[⚙️] settings` tab (by typing something into the textbox), the icon in the browser tab will indicate upload progress -- also, the `[🔔]` and/or `[🔊]` switches enable visible and/or audible notifications on upload completion
|
669
671
|
|
670
|
-
the up2k UI is the epitome of polished
|
672
|
+
the up2k UI is the epitome of polished intuitive experiences:
|
671
673
|
* "parallel uploads" specifies how many chunks to upload at the same time
|
672
674
|
* `[🏃]` analysis of other files should continue while one is uploading
|
673
675
|
* `[🥔]` shows a simpler UI for faster uploads from slow devices
|
@@ -716,7 +718,7 @@ you can unpost even if you don't have regular move/delete access, however only f
|
|
716
718
|
|
717
719
|
### self-destruct
|
718
720
|
|
719
|
-
uploads can be given a lifetime,
|
721
|
+
uploads can be given a lifetime, after which they expire / self-destruct
|
720
722
|
|
721
723
|
the feature must be enabled per-volume with the `lifetime` [upload rule](#upload-rules) which sets the upper limit for how long a file gets to stay on the server
|
722
724
|
|
@@ -743,7 +745,7 @@ the control-panel shows the ETA for all incoming files , but only for files bei
|
|
743
745
|
|
744
746
|
cut/paste, rename, and delete files/folders (if you have permission)
|
745
747
|
|
746
|
-
file selection: click somewhere on the line (not the link
|
748
|
+
file selection: click somewhere on the line (not the link itself), then:
|
747
749
|
* `space` to toggle
|
748
750
|
* `up/down` to move
|
749
751
|
* `shift-up/down` to move-and-select
|
@@ -937,6 +939,8 @@ see [./srv/expand/](./srv/expand/) for usage and examples
|
|
937
939
|
|
938
940
|
* files named `README.md` / `readme.md` will be rendered after directory listings unless `--no-readme` (but `.epilogue.html` takes precedence)
|
939
941
|
|
942
|
+
* and `PREADME.md` / `preadme.md` is shown above directory listings unless `--no-readme` or `.prologue.html`
|
943
|
+
|
940
944
|
* `README.md` and `*logue.html` can contain placeholder values which are replaced server-side before embedding into directory listings; see `--help-exp`
|
941
945
|
|
942
946
|
|
@@ -988,7 +992,11 @@ uses [multicast dns](https://en.wikipedia.org/wiki/Multicast_DNS) to give copypa
|
|
988
992
|
|
989
993
|
all enabled services ([webdav](#webdav-server), [ftp](#ftp-server), [smb](#smb-server)) will appear in mDNS-aware file managers (KDE, gnome, macOS, ...)
|
990
994
|
|
991
|
-
the domain will be
|
995
|
+
the domain will be `partybox.local` if the machine's hostname is `partybox` unless `--name` specifies something else
|
996
|
+
|
997
|
+
and the web-UI will be available at http://partybox.local:3923/
|
998
|
+
|
999
|
+
* if you want to get rid of the `:3923` so you can use http://partybox.local/ instead then see [listen on port 80 and 443](#listen-on-port-80-and-443)
|
992
1000
|
|
993
1001
|
|
994
1002
|
### ssdp
|
@@ -1014,7 +1022,7 @@ print a qr-code [(screenshot)](https://user-images.githubusercontent.com/241032/
|
|
1014
1022
|
* `--qrz 1` forces 1x zoom instead of autoscaling to fit the terminal size
|
1015
1023
|
* 1x may render incorrectly on some terminals/fonts, but 2x should always work
|
1016
1024
|
|
1017
|
-
it uses the server hostname if [mdns](#mdns) is
|
1025
|
+
it uses the server hostname if [mdns](#mdns) is enabled, otherwise it'll use your external ip (default route) unless `--qri` specifies a specific ip-prefix or domain
|
1018
1026
|
|
1019
1027
|
|
1020
1028
|
## ftp server
|
@@ -1039,7 +1047,7 @@ some recommended FTP / FTPS clients; `wark` = example password:
|
|
1039
1047
|
|
1040
1048
|
## webdav server
|
1041
1049
|
|
1042
|
-
with read-write support, supports winXP and later, macos, nautilus/gvfs ... a
|
1050
|
+
with read-write support, supports winXP and later, macos, nautilus/gvfs ... a great way to [access copyparty straight from the file explorer in your OS](#mount-as-drive)
|
1043
1051
|
|
1044
1052
|
click the [connect](http://127.0.0.1:3923/?hc) button in the control-panel to see connection instructions for windows, linux, macos
|
1045
1053
|
|
@@ -1143,8 +1151,8 @@ authenticate with one of the following:
|
|
1143
1151
|
tweaking the ui
|
1144
1152
|
|
1145
1153
|
* set default sort order globally with `--sort` or per-volume with the `sort` volflag; specify one or more comma-separated columns to sort by, and prefix the column name with `-` for reverse sort
|
1146
|
-
* the column names you can use are visible as tooltips when hovering over the column headers in the directory listing, for example `href ext sz ts tags/.up_at tags/
|
1147
|
-
* to sort in music order (album, track, artist, title) with filename as fallback, you could `--sort tags/
|
1154
|
+
* the column names you can use are visible as tooltips when hovering over the column headers in the directory listing, for example `href ext sz ts tags/.up_at tags/Circle tags/.tn tags/Artist tags/Title`
|
1155
|
+
* to sort in music order (album, track, artist, title) with filename as fallback, you could `--sort tags/Circle,tags/.tn,tags/Artist,tags/Title,href`
|
1148
1156
|
* to sort by upload date, first enable showing the upload date in the listing with `-e2d -mte +.up_at` and then `--sort tags/.up_at`
|
1149
1157
|
|
1150
1158
|
see [./docs/rice](./docs/rice) for more, including how to add stuff (css/`<meta>`/...) to the html `<head>` tag, or to add your own translation
|
@@ -1167,7 +1175,11 @@ if you want to entirely replace the copyparty response with your own jinja2 temp
|
|
1167
1175
|
|
1168
1176
|
enable symlink-based upload deduplication globally with `--dedup` or per-volume with volflag `dedup`
|
1169
1177
|
|
1170
|
-
when someone tries to upload a file that already exists on the server, the upload will be politely declined and
|
1178
|
+
by default, when someone tries to upload a file that already exists on the server, the upload will be politely declined, and the server will copy the existing file over to where the upload would have gone
|
1179
|
+
|
1180
|
+
if you enable deduplication with `--dedup` then it'll create a symlink instead of a full copy, thus reducing disk space usage
|
1181
|
+
|
1182
|
+
* on the contrary, if your server is hooked up to s3-glacier or similar storage where reading is expensive, and you cannot use `--safe-dedup=1` because you have other software tampering with your files, so you want to entirely disable detection of duplicate data instead, then you can specify `--no-clone` globally or `noclone` as a volflag
|
1171
1183
|
|
1172
1184
|
**warning:** when enabling dedup, you should also:
|
1173
1185
|
* enable indexing with `-e2dsa` or volflag `e2dsa` (see [file indexing](#file-indexing) section below); strongly recommended
|
@@ -1208,7 +1220,7 @@ through arguments:
|
|
1208
1220
|
* `-e2t` enables metadata indexing on upload
|
1209
1221
|
* `-e2ts` also scans for tags in all files that don't have tags yet
|
1210
1222
|
* `-e2tsr` also deletes all existing tags, doing a full reindex
|
1211
|
-
* `-e2v`
|
1223
|
+
* `-e2v` verifies file integrity at startup, comparing hashes from the db
|
1212
1224
|
* `-e2vu` patches the database with the new hashes from the filesystem
|
1213
1225
|
* `-e2vp` panics and kills copyparty instead
|
1214
1226
|
|
@@ -1421,11 +1433,27 @@ redefine behavior with plugins ([examples](./bin/handlers/))
|
|
1421
1433
|
replace 404 and 403 errors with something completely different (that's it for now)
|
1422
1434
|
|
1423
1435
|
|
1436
|
+
## ip auth
|
1437
|
+
|
1438
|
+
autologin based on IP range (CIDR) , using the global-option `--ipu`
|
1439
|
+
|
1440
|
+
for example, if everyone with an IP that starts with `192.168.123` should automatically log in as the user `spartacus`, then you can either specify `--ipu=192.168.123.0/24=spartacus` as a commandline option, or put this in a config file:
|
1441
|
+
|
1442
|
+
```yaml
|
1443
|
+
[global]
|
1444
|
+
ipu: 192.168.123.0/24=spartacus
|
1445
|
+
```
|
1446
|
+
|
1447
|
+
repeat the option to map additional subnets
|
1448
|
+
|
1449
|
+
**be careful with this one!** if you have a reverseproxy, then you definitely want to make sure you have [real-ip](#real-ip) configured correctly, and it's probably a good idea to nullmap the reverseproxy's IP just in case; so if your reverseproxy is sending requests from `172.24.27.9` then that would be `--ipu=172.24.27.9/32=`
|
1450
|
+
|
1451
|
+
|
1424
1452
|
## identity providers
|
1425
1453
|
|
1426
1454
|
replace copyparty passwords with oauth and such
|
1427
1455
|
|
1428
|
-
you can disable the built-in password-based login
|
1456
|
+
you can disable the built-in password-based login system, and instead replace it with a separate piece of software (an identity provider) which will then handle authenticating / authorizing of users; this makes it possible to login with passkeys / fido2 / webauthn / yubikey / ldap / active directory / oauth / many other single-sign-on contraptions
|
1429
1457
|
|
1430
1458
|
a popular choice is [Authelia](https://www.authelia.com/) (config-file based), another one is [authentik](https://goauthentik.io/) (GUI-based, more complex)
|
1431
1459
|
|
@@ -1452,7 +1480,7 @@ if permitted, users can change their own passwords in the control-panel
|
|
1452
1480
|
|
1453
1481
|
* if you run multiple copyparty instances with different users you *almost definitely* want to specify separate DBs for each instance
|
1454
1482
|
|
1455
|
-
* if [password hashing](#password-hashing) is
|
1483
|
+
* if [password hashing](#password-hashing) is enabled, the passwords in the db are also hashed
|
1456
1484
|
|
1457
1485
|
* ...which means that all user-defined passwords will be forgotten if you change password-hashing settings
|
1458
1486
|
|
@@ -1472,7 +1500,7 @@ you may improve performance by specifying larger values for `--iobuf` / `--s-rd-
|
|
1472
1500
|
|
1473
1501
|
## hiding from google
|
1474
1502
|
|
1475
|
-
tell search engines you
|
1503
|
+
tell search engines you don't wanna be indexed, either using the good old [robots.txt](https://www.robotstxt.org/robotstxt.html) or through copyparty settings:
|
1476
1504
|
|
1477
1505
|
* `--no-robots` adds HTTP (`X-Robots-Tag`) and HTML (`<meta>`) headers with `noindex, nofollow` globally
|
1478
1506
|
* volflag `[...]:c,norobots` does the same thing for that single volume
|
@@ -1547,6 +1575,33 @@ if you want to change the fonts, see [./docs/rice/](./docs/rice/)
|
|
1547
1575
|
`-lo log/cpp-%Y-%m%d-%H%M%S.txt.xz`
|
1548
1576
|
|
1549
1577
|
|
1578
|
+
## listen on port 80 and 443
|
1579
|
+
|
1580
|
+
become a *real* webserver which people can access by just going to your IP or domain without specifying a port
|
1581
|
+
|
1582
|
+
**if you're on windows,** then you just need to add the commandline argument `-p 80,443` and you're done! nice
|
1583
|
+
|
1584
|
+
**if you're on macos,** sorry, I don't know
|
1585
|
+
|
1586
|
+
**if you're on Linux,** you have the following 4 options:
|
1587
|
+
|
1588
|
+
* **option 1:** set up a [reverse-proxy](#reverse-proxy) -- this one makes a lot of sense if you're running on a proper headless server, because that way you get real HTTPS too
|
1589
|
+
|
1590
|
+
* **option 2:** NAT to port 3923 -- this is cumbersome since you'll need to do it every time you reboot, and the exact command may depend on your linux distribution:
|
1591
|
+
```bash
|
1592
|
+
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3923
|
1593
|
+
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 3923
|
1594
|
+
```
|
1595
|
+
|
1596
|
+
* **option 3:** disable the [security policy](https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html) which prevents the use of 80 and 443; this is *probably* fine:
|
1597
|
+
```
|
1598
|
+
setcap CAP_NET_BIND_SERVICE=+eip $(realpath $(which python))
|
1599
|
+
python copyparty-sfx.py -p 80,443
|
1600
|
+
```
|
1601
|
+
|
1602
|
+
* **option 4:** run copyparty as root (please don't)
|
1603
|
+
|
1604
|
+
|
1550
1605
|
## reverse-proxy
|
1551
1606
|
|
1552
1607
|
running copyparty next to other websites hosted on an existing webserver such as nginx, caddy, or apache
|
@@ -1895,7 +1950,7 @@ interact with copyparty using non-browser clients
|
|
1895
1950
|
|
1896
1951
|
* [igloo irc](https://iglooirc.com/): Method: `post` Host: `https://you.com/up/?want=url&pw=hunter2` Multipart: `yes` File parameter: `f`
|
1897
1952
|
|
1898
|
-
copyparty returns a truncated sha512sum of your PUT/POST as base64; you can generate the same checksum locally to verify
|
1953
|
+
copyparty returns a truncated sha512sum of your PUT/POST as base64; you can generate the same checksum locally to verify uploads:
|
1899
1954
|
|
1900
1955
|
b512(){ printf "$((sha512sum||shasum -a512)|sed -E 's/ .*//;s/(..)/\\x\1/g')"|base64|tr '+/' '-_'|head -c44;}
|
1901
1956
|
b512 <movie.mkv
|
@@ -1995,7 +2050,7 @@ when uploading files,
|
|
1995
2050
|
* up to 30% faster uploads if you hide the upload status list by switching away from the `[🚀]` up2k ui-tab (or closing it)
|
1996
2051
|
* optionally you can switch to the lightweight potato ui by clicking the `[🥔]`
|
1997
2052
|
* switching to another browser-tab also works, the favicon will update every 10 seconds in that case
|
1998
|
-
* unlikely to be a problem, but can happen when
|
2053
|
+
* unlikely to be a problem, but can happen when uploading many small files, or your internet is too fast, or PC too slow
|
1999
2054
|
|
2000
2055
|
|
2001
2056
|
# security
|
@@ -2043,7 +2098,7 @@ other misc notes:
|
|
2043
2098
|
|
2044
2099
|
behavior that might be unexpected
|
2045
2100
|
|
2046
|
-
* users without read-access to a folder can still see the `.prologue.html` / `.epilogue.html` / `README.md` contents, for the purpose of showing a description on how to use the uploader for example
|
2101
|
+
* users without read-access to a folder can still see the `.prologue.html` / `.epilogue.html` / `PREADME.md` / `README.md` contents, for the purpose of showing a description on how to use the uploader for example
|
2047
2102
|
* users can submit `<script>`s which autorun (in a sandbox) for other visitors in a few ways;
|
2048
2103
|
* uploading a `README.md` -- avoid with `--no-readme`
|
2049
2104
|
* renaming `some.html` to `.epilogue.html` -- avoid with either `--no-logues` or `--no-dot-ren`
|
@@ -2121,13 +2176,13 @@ if [cfssl](https://github.com/cloudflare/cfssl/releases/latest) is installed, co
|
|
2121
2176
|
|
2122
2177
|
## client crashes
|
2123
2178
|
|
2124
|
-
###
|
2179
|
+
### firefox wsod
|
2125
2180
|
|
2126
2181
|
firefox 87 can crash during uploads -- the entire browser goes, including all other browser tabs, everything turns white
|
2127
2182
|
|
2128
2183
|
however you can hit `F12` in the up2k tab and use the devtools to see how far you got in the uploads:
|
2129
2184
|
|
2130
|
-
* get a complete list of all uploads, organized by
|
2185
|
+
* get a complete list of all uploads, organized by status (ok / no-good / busy / queued):
|
2131
2186
|
`var tabs = { ok:[], ng:[], bz:[], q:[] }; for (var a of up2k.ui.tab) tabs[a.in].push(a); tabs`
|
2132
2187
|
|
2133
2188
|
* list of filenames which failed:
|
@@ -2244,7 +2299,7 @@ then again, if you are already into downloading shady binaries from the internet
|
|
2244
2299
|
|
2245
2300
|
## zipapp
|
2246
2301
|
|
2247
|
-
another emergency alternative, [copyparty.pyz](https://github.com/9001/copyparty/releases/latest/download/copyparty.pyz) has less features, is slow, requires python 3.7 or newer, worse compression, and more importantly is unable to benefit from more recent versions of jinja2 and such (which makes it less secure)... lots of drawbacks with this one really -- but it does not unpack any
|
2302
|
+
another emergency alternative, [copyparty.pyz](https://github.com/9001/copyparty/releases/latest/download/copyparty.pyz) has less features, is slow, requires python 3.7 or newer, worse compression, and more importantly is unable to benefit from more recent versions of jinja2 and such (which makes it less secure)... lots of drawbacks with this one really -- but it does not unpack any temporary files to disk, so it *may* just work if the regular sfx fails to start because the computer is messed up in certain funky ways, so it's worth a shot if all else fails
|
2248
2303
|
|
2249
2304
|
run it by doubleclicking it, or try typing `python copyparty.pyz` in your terminal/console/commandline/telex if that fails
|
2250
2305
|
|
@@ -772,7 +772,7 @@ def get_sects():
|
|
772
772
|
dedent(
|
773
773
|
"""
|
774
774
|
specify --exp or the "exp" volflag to enable placeholder expansions
|
775
|
-
in README.md / .prologue.html / .epilogue.html
|
775
|
+
in README.md / PREADME.md / .prologue.html / .epilogue.html
|
776
776
|
|
777
777
|
--exp-md (volflag exp_md) holds the list of placeholders which can be
|
778
778
|
expanded in READMEs, and --exp-lg (volflag exp_lg) likewise for logues;
|
@@ -888,7 +888,7 @@ def get_sects():
|
|
888
888
|
dedent(
|
889
889
|
"""
|
890
890
|
the mDNS protocol is multicast-based, which means there are thousands
|
891
|
-
of fun and
|
891
|
+
of fun and interesting ways for it to break unexpectedly
|
892
892
|
|
893
893
|
things to check if it does not work at all:
|
894
894
|
|
@@ -997,6 +997,7 @@ def add_upload(ap):
|
|
997
997
|
ap2.add_argument("--hardlink", action="store_true", help="enable hardlink-based dedup; will fallback on symlinks when that is impossible (across filesystems) (volflag=hardlink)")
|
998
998
|
ap2.add_argument("--hardlink-only", action="store_true", help="do not fallback to symlinks when a hardlink cannot be made (volflag=hardlinkonly)")
|
999
999
|
ap2.add_argument("--no-dupe", action="store_true", help="reject duplicate files during upload; only matches within the same volume (volflag=nodupe)")
|
1000
|
+
ap2.add_argument("--no-clone", action="store_true", help="do not use existing data on disk to satisfy dupe uploads; reduces server HDD reads in exchange for much more network load (volflag=noclone)")
|
1000
1001
|
ap2.add_argument("--no-snap", action="store_true", help="disable snapshots -- forget unfinished uploads on shutdown; don't create .hist/up2k.snap files -- abandoned/interrupted uploads must be cleaned up manually")
|
1001
1002
|
ap2.add_argument("--snap-wri", metavar="SEC", type=int, default=300, help="write upload state to ./hist/up2k.snap every \033[33mSEC\033[0m seconds; allows resuming incomplete uploads after a server crash")
|
1002
1003
|
ap2.add_argument("--snap-drop", metavar="MIN", type=float, default=1440.0, help="forget unfinished uploads after \033[33mMIN\033[0m minutes; impossible to resume them after that (360=6h, 1440=24h)")
|
@@ -1078,6 +1079,7 @@ def add_auth(ap):
|
|
1078
1079
|
ap2.add_argument("--ses-db", metavar="PATH", type=u, default=ses_db, help="where to store the sessions database (if you run multiple copyparty instances, make sure they use different DBs)")
|
1079
1080
|
ap2.add_argument("--ses-len", metavar="CHARS", type=int, default=20, help="session key length; default is 120 bits ((20//4)*4*6)")
|
1080
1081
|
ap2.add_argument("--no-ses", action="store_true", help="disable sessions; use plaintext passwords in cookies")
|
1082
|
+
ap2.add_argument("--ipu", metavar="CIDR=USR", type=u, action="append", help="users with IP matching \033[33mCIDR\033[0m are auto-authenticated as username \033[33mUSR\033[0m; example: [\033[32m172.16.24.0/24=dave]")
|
1081
1083
|
|
1082
1084
|
|
1083
1085
|
def add_chpw(ap):
|
@@ -1246,7 +1248,7 @@ def add_safety(ap):
|
|
1246
1248
|
ap2.add_argument("--no-dot-mv", action="store_true", help="disallow moving dotfiles; makes it impossible to move folders containing dotfiles")
|
1247
1249
|
ap2.add_argument("--no-dot-ren", action="store_true", help="disallow renaming dotfiles; makes it impossible to turn something into a dotfile")
|
1248
1250
|
ap2.add_argument("--no-logues", action="store_true", help="disable rendering .prologue/.epilogue.html into directory listings")
|
1249
|
-
ap2.add_argument("--no-readme", action="store_true", help="disable rendering readme.md into directory listings")
|
1251
|
+
ap2.add_argument("--no-readme", action="store_true", help="disable rendering readme/preadme.md into directory listings")
|
1250
1252
|
ap2.add_argument("--vague-403", action="store_true", help="send 404 instead of 403 (security through ambiguity, very enterprise)")
|
1251
1253
|
ap2.add_argument("--force-js", action="store_true", help="don't send folder listings as HTML, force clients to use the embedded json instead -- slight protection against misbehaving search engines which ignore \033[33m--no-robots\033[0m")
|
1252
1254
|
ap2.add_argument("--no-robots", action="store_true", help="adds http and html headers asking search engines to not index anything (volflag=norobots)")
|
@@ -1444,7 +1446,7 @@ def add_ui(ap, retry):
|
|
1444
1446
|
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")
|
1445
1447
|
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 for README.md docs (volflag=md_sbf); see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox")
|
1446
1448
|
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 for prologue/epilogue docs (volflag=lg_sbf)")
|
1447
|
-
ap2.add_argument("--no-sb-md", action="store_true", help="don't sandbox README.md documents (volflags: no_sb_md | sb_md)")
|
1449
|
+
ap2.add_argument("--no-sb-md", action="store_true", help="don't sandbox README/PREADME.md documents (volflags: no_sb_md | sb_md)")
|
1448
1450
|
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")
|
1449
1451
|
|
1450
1452
|
|
@@ -1468,6 +1470,7 @@ def add_debug(ap):
|
|
1468
1470
|
ap2.add_argument("--bak-flips", action="store_true", help="[up2k] if a client uploads a bitflipped/corrupted chunk, store a copy according to \033[33m--bf-nc\033[0m and \033[33m--bf-dir\033[0m")
|
1469
1471
|
ap2.add_argument("--bf-nc", metavar="NUM", type=int, default=200, help="bak-flips: stop if there's more than \033[33mNUM\033[0m files at \033[33m--kf-dir\033[0m already; default: 6.3 GiB max (200*32M)")
|
1470
1472
|
ap2.add_argument("--bf-dir", metavar="PATH", type=u, default="bf", help="bak-flips: store corrupted chunks at \033[33mPATH\033[0m; default: folder named 'bf' wherever copyparty was started")
|
1473
|
+
ap2.add_argument("--bf-log", metavar="PATH", type=u, default="", help="bak-flips: log corruption info to a textfile at \033[33mPATH\033[0m")
|
1471
1474
|
|
1472
1475
|
|
1473
1476
|
# fmt: on
|
@@ -917,7 +917,7 @@ class AuthSrv(object):
|
|
917
917
|
|
918
918
|
for un, gn in un_gn:
|
919
919
|
# if ap/vp has a user/group placeholder, make sure to keep
|
920
|
-
# track so the same user/
|
920
|
+
# track so the same user/group is mapped when setting perms;
|
921
921
|
# otherwise clear un/gn to indicate it's a regular volume
|
922
922
|
|
923
923
|
src1 = src0.replace("${u}", un or "\n")
|