copyparty 1.15.3__tar.gz → 1.15.5__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.3 → copyparty-1.15.5}/PKG-INFO +10 -8
- {copyparty-1.15.3 → copyparty-1.15.5}/README.md +9 -7
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/__init__.py +54 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/__main__.py +14 -12
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/__version__.py +2 -2
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/cert.py +20 -8
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/cfg.py +1 -1
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/ftpd.py +1 -1
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/httpcli.py +226 -67
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/httpconn.py +0 -3
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/httpsrv.py +10 -15
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/metrics.py +1 -1
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/smbd.py +6 -3
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/qrcodegen.py +17 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/szip.py +1 -1
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/u2idx.py +1 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/up2k.py +30 -12
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/util.py +148 -64
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/a/partyfuse.py +233 -357
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/a/u2c.py +249 -153
- copyparty-1.15.5/copyparty/web/browser.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/browser.html +3 -6
- copyparty-1.15.5/copyparty/web/browser.js.gz +0 -0
- copyparty-1.15.5/copyparty/web/deps/fuse.py +1064 -0
- copyparty-1.15.5/copyparty/web/deps/marked.js.gz +0 -0
- copyparty-1.15.5/copyparty/web/shares.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/shares.html +7 -4
- copyparty-1.15.5/copyparty/web/shares.js.gz +0 -0
- copyparty-1.15.5/copyparty/web/splash.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/svcs.html +1 -1
- copyparty-1.15.5/copyparty/web/ui.css.gz +0 -0
- copyparty-1.15.5/copyparty/web/util.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty.egg-info/PKG-INFO +10 -8
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty.egg-info/SOURCES.txt +1 -0
- copyparty-1.15.3/copyparty/web/browser.css.gz +0 -0
- copyparty-1.15.3/copyparty/web/browser.js.gz +0 -0
- copyparty-1.15.3/copyparty/web/deps/marked.js.gz +0 -0
- copyparty-1.15.3/copyparty/web/shares.css.gz +0 -0
- copyparty-1.15.3/copyparty/web/shares.js.gz +0 -0
- copyparty-1.15.3/copyparty/web/splash.js.gz +0 -0
- copyparty-1.15.3/copyparty/web/ui.css.gz +0 -0
- copyparty-1.15.3/copyparty/web/util.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/LICENSE +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/authsrv.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/bos/__init__.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/bos/bos.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/bos/path.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/broker_mp.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/broker_mpw.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/broker_thr.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/broker_util.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/dxml.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/fsutil.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/ico.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/mdns.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/mtag.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/multicast.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/pwhash.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/res/COPYING.txt +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/res/__init__.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/res/insecure.pem +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/ssdp.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/star.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/__init__.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/dnslib/__init__.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/dnslib/bimap.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/dnslib/bit.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/dnslib/buffer.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/dnslib/dns.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/dnslib/label.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/dnslib/lex.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/dnslib/ranges.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/ifaddr/__init__.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/ifaddr/_posix.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/ifaddr/_shared.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/ifaddr/_win32.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/stolen/surrogateescape.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/sutil.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/svchub.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/tcpsrv.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/tftpd.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/th_cli.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/th_srv.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/a/__init__.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/a/webdav-cfg.bat +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/baguettebox.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/browser2.html +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/cf.html +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/dbg-audio.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/dd/2.png +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/dd/3.png +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/dd/4.png +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/dd/5.png +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/dd/__init__.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/__init__.py +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/busy.mp3.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/easymde.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/easymde.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/mini-fa.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/mini-fa.woff +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/prism.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/prism.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/prismd.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/scp.woff2 +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/sha512.ac.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/deps/sha512.hw.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/md.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/md.html +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/md.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/md2.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/md2.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/mde.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/mde.html +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/mde.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/msg.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/msg.html +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/splash.css.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/splash.html +12 -12
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/svcs.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/up2k.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty/web/w.hash.js.gz +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty.egg-info/dependency_links.txt +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty.egg-info/entry_points.txt +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty.egg-info/requires.txt +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/copyparty.egg-info/top_level.txt +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/pyproject.toml +0 -0
- {copyparty-1.15.3 → copyparty-1.15.5}/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.5
|
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
|
@@ -831,6 +831,7 @@ semi-intentional limitations:
|
|
831
831
|
|
832
832
|
* cleanup of expired shares only works when global option `e2d` is set, and/or at least one volume on the server has volflag `e2d`
|
833
833
|
* only folders from the same volume are shared; if you are sharing a folder which contains other volumes, then the contents of those volumes will not be available
|
834
|
+
* related to [IdP volumes being forgotten on shutdown](https://github.com/9001/copyparty/blob/hovudstraum/docs/idp.md#idp-volumes-are-forgotten-on-shutdown), any shares pointing into a user's IdP volume will be unavailable until that user makes their first request after a restart
|
834
835
|
* no option to "delete after first access" because tricky
|
835
836
|
* when linking something to discord (for example) it'll get accessed by their scraper and that would count as a hit
|
836
837
|
* browsers wouldn't be able to resume a broken download unless the requester's IP gets allowlisted for X minutes (ref. tricky)
|
@@ -1169,12 +1170,12 @@ some **BIG WARNINGS** specific to SMB/CIFS, in decreasing importance:
|
|
1169
1170
|
* [shadowing](#shadowing) probably works as expected but no guarantees
|
1170
1171
|
|
1171
1172
|
and some minor issues,
|
1172
|
-
* clients only see the first ~400 files in big folders;
|
1173
|
+
* clients only see the first ~400 files in big folders;
|
1174
|
+
* this was originally due to [impacket#1433](https://github.com/SecureAuthCorp/impacket/issues/1433) which was fixed in impacket-0.12, so you can disable the workaround with `--smb-nwa-1` but then you get unacceptably poor performance instead
|
1173
1175
|
* hot-reload of server config (`/?reload=cfg`) does not include the `[global]` section (commandline args)
|
1174
1176
|
* listens on the first IPv4 `-i` interface only (default = :: = 0.0.0.0 = all)
|
1175
1177
|
* login doesn't work on winxp, but anonymous access is ok -- remove all accounts from copyparty config for that to work
|
1176
1178
|
* win10 onwards does not allow connecting anonymously / without accounts
|
1177
|
-
* on windows, creating a new file through rightclick --> new --> textfile throws an error due to impacket limitations -- hit OK and F5 to get your file
|
1178
1179
|
* python3 only
|
1179
1180
|
* slow (the builtin webdav support in windows is 5x faster, and rclone-webdav is 30x faster)
|
1180
1181
|
|
@@ -1213,8 +1214,6 @@ note that this disables hotlinking because the opengraph spec demands it; to sne
|
|
1213
1214
|
|
1214
1215
|
you can also hotlink files regardless by appending `?raw` to the url
|
1215
1216
|
|
1216
|
-
NOTE: because discord (and maybe others) strip query args such as `?raw` in opengraph tags, any links which require a filekey or dirkey will not work
|
1217
|
-
|
1218
1217
|
if you want to entirely replace the copyparty response with your own jinja2 template, give the template filepath to `--og-tpl` or volflag `og_tpl` (all members of `HttpCli` are available through the `this` object)
|
1219
1218
|
|
1220
1219
|
|
@@ -1939,6 +1938,7 @@ interact with copyparty using non-browser clients
|
|
1939
1938
|
|
1940
1939
|
* FUSE: mount a copyparty server as a local filesystem
|
1941
1940
|
* cross-platform python client available in [./bin/](bin/)
|
1941
|
+
* able to mount nginx and iis directory listings too, not just copyparty
|
1942
1942
|
* can be downloaded from copyparty: controlpanel -> connect -> [partyfuse.py](http://127.0.0.1:3923/.cpr/a/partyfuse.py)
|
1943
1943
|
* [rclone](https://rclone.org/) as client can give ~5x performance, see [./docs/rclone.md](docs/rclone.md)
|
1944
1944
|
|
@@ -1978,7 +1978,7 @@ alternatively, some alternatives roughly sorted by speed (unreproducible benchma
|
|
1978
1978
|
|
1979
1979
|
* [rclone-webdav](./docs/rclone.md) (25s), read/WRITE (rclone v1.63 or later)
|
1980
1980
|
* [rclone-http](./docs/rclone.md) (26s), read-only
|
1981
|
-
* [partyfuse.py](./bin/#partyfusepy) (
|
1981
|
+
* [partyfuse.py](./bin/#partyfusepy) (26s), read-only
|
1982
1982
|
* [rclone-ftp](./docs/rclone.md) (47s), read/WRITE
|
1983
1983
|
* davfs2 (103s), read/WRITE
|
1984
1984
|
* [win10-webdav](#webdav-server) (138s), read/WRITE
|
@@ -2140,6 +2140,8 @@ volflag `dky` disables the actual key-check, meaning anyone can see the contents
|
|
2140
2140
|
|
2141
2141
|
volflag `dks` lets people enter subfolders as well, and also enables download-as-zip/tar
|
2142
2142
|
|
2143
|
+
if you enable dirkeys, it is probably a good idea to enable filekeys too, otherwise it will be impossible to hotlink files from a folder which was accessed using a dirkey
|
2144
|
+
|
2143
2145
|
dirkeys are generated based on another salt (`--dk-salt`) + filesystem-path and have a few limitations:
|
2144
2146
|
* the key does not change if the contents of the folder is modified
|
2145
2147
|
* if you need a new dirkey, either change the salt or rename the folder
|
@@ -2222,7 +2224,7 @@ enable [thumbnails](#thumbnails) of...
|
|
2222
2224
|
* **JPEG XL pictures:** `pyvips` or `ffmpeg`
|
2223
2225
|
|
2224
2226
|
enable [smb](#smb-server) support (**not** recommended):
|
2225
|
-
* `impacket==0.
|
2227
|
+
* `impacket==0.12.0`
|
2226
2228
|
|
2227
2229
|
`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`
|
2228
2230
|
|
@@ -2296,7 +2298,7 @@ then again, if you are already into downloading shady binaries from the internet
|
|
2296
2298
|
|
2297
2299
|
## zipapp
|
2298
2300
|
|
2299
|
-
another emergency alternative, [copyparty.pyz](https://github.com/9001/copyparty/releases/latest/download/copyparty.pyz) has less features, 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 *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
|
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 temporay 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
|
2300
2302
|
|
2301
2303
|
run it by doubleclicking it, or try typing `python copyparty.pyz` in your terminal/console/commandline/telex if that fails
|
2302
2304
|
|
@@ -777,6 +777,7 @@ semi-intentional limitations:
|
|
777
777
|
|
778
778
|
* cleanup of expired shares only works when global option `e2d` is set, and/or at least one volume on the server has volflag `e2d`
|
779
779
|
* only folders from the same volume are shared; if you are sharing a folder which contains other volumes, then the contents of those volumes will not be available
|
780
|
+
* related to [IdP volumes being forgotten on shutdown](https://github.com/9001/copyparty/blob/hovudstraum/docs/idp.md#idp-volumes-are-forgotten-on-shutdown), any shares pointing into a user's IdP volume will be unavailable until that user makes their first request after a restart
|
780
781
|
* no option to "delete after first access" because tricky
|
781
782
|
* when linking something to discord (for example) it'll get accessed by their scraper and that would count as a hit
|
782
783
|
* browsers wouldn't be able to resume a broken download unless the requester's IP gets allowlisted for X minutes (ref. tricky)
|
@@ -1115,12 +1116,12 @@ some **BIG WARNINGS** specific to SMB/CIFS, in decreasing importance:
|
|
1115
1116
|
* [shadowing](#shadowing) probably works as expected but no guarantees
|
1116
1117
|
|
1117
1118
|
and some minor issues,
|
1118
|
-
* clients only see the first ~400 files in big folders;
|
1119
|
+
* clients only see the first ~400 files in big folders;
|
1120
|
+
* this was originally due to [impacket#1433](https://github.com/SecureAuthCorp/impacket/issues/1433) which was fixed in impacket-0.12, so you can disable the workaround with `--smb-nwa-1` but then you get unacceptably poor performance instead
|
1119
1121
|
* hot-reload of server config (`/?reload=cfg`) does not include the `[global]` section (commandline args)
|
1120
1122
|
* listens on the first IPv4 `-i` interface only (default = :: = 0.0.0.0 = all)
|
1121
1123
|
* login doesn't work on winxp, but anonymous access is ok -- remove all accounts from copyparty config for that to work
|
1122
1124
|
* win10 onwards does not allow connecting anonymously / without accounts
|
1123
|
-
* on windows, creating a new file through rightclick --> new --> textfile throws an error due to impacket limitations -- hit OK and F5 to get your file
|
1124
1125
|
* python3 only
|
1125
1126
|
* slow (the builtin webdav support in windows is 5x faster, and rclone-webdav is 30x faster)
|
1126
1127
|
|
@@ -1159,8 +1160,6 @@ note that this disables hotlinking because the opengraph spec demands it; to sne
|
|
1159
1160
|
|
1160
1161
|
you can also hotlink files regardless by appending `?raw` to the url
|
1161
1162
|
|
1162
|
-
NOTE: because discord (and maybe others) strip query args such as `?raw` in opengraph tags, any links which require a filekey or dirkey will not work
|
1163
|
-
|
1164
1163
|
if you want to entirely replace the copyparty response with your own jinja2 template, give the template filepath to `--og-tpl` or volflag `og_tpl` (all members of `HttpCli` are available through the `this` object)
|
1165
1164
|
|
1166
1165
|
|
@@ -1885,6 +1884,7 @@ interact with copyparty using non-browser clients
|
|
1885
1884
|
|
1886
1885
|
* FUSE: mount a copyparty server as a local filesystem
|
1887
1886
|
* cross-platform python client available in [./bin/](bin/)
|
1887
|
+
* able to mount nginx and iis directory listings too, not just copyparty
|
1888
1888
|
* can be downloaded from copyparty: controlpanel -> connect -> [partyfuse.py](http://127.0.0.1:3923/.cpr/a/partyfuse.py)
|
1889
1889
|
* [rclone](https://rclone.org/) as client can give ~5x performance, see [./docs/rclone.md](docs/rclone.md)
|
1890
1890
|
|
@@ -1924,7 +1924,7 @@ alternatively, some alternatives roughly sorted by speed (unreproducible benchma
|
|
1924
1924
|
|
1925
1925
|
* [rclone-webdav](./docs/rclone.md) (25s), read/WRITE (rclone v1.63 or later)
|
1926
1926
|
* [rclone-http](./docs/rclone.md) (26s), read-only
|
1927
|
-
* [partyfuse.py](./bin/#partyfusepy) (
|
1927
|
+
* [partyfuse.py](./bin/#partyfusepy) (26s), read-only
|
1928
1928
|
* [rclone-ftp](./docs/rclone.md) (47s), read/WRITE
|
1929
1929
|
* davfs2 (103s), read/WRITE
|
1930
1930
|
* [win10-webdav](#webdav-server) (138s), read/WRITE
|
@@ -2086,6 +2086,8 @@ volflag `dky` disables the actual key-check, meaning anyone can see the contents
|
|
2086
2086
|
|
2087
2087
|
volflag `dks` lets people enter subfolders as well, and also enables download-as-zip/tar
|
2088
2088
|
|
2089
|
+
if you enable dirkeys, it is probably a good idea to enable filekeys too, otherwise it will be impossible to hotlink files from a folder which was accessed using a dirkey
|
2090
|
+
|
2089
2091
|
dirkeys are generated based on another salt (`--dk-salt`) + filesystem-path and have a few limitations:
|
2090
2092
|
* the key does not change if the contents of the folder is modified
|
2091
2093
|
* if you need a new dirkey, either change the salt or rename the folder
|
@@ -2168,7 +2170,7 @@ enable [thumbnails](#thumbnails) of...
|
|
2168
2170
|
* **JPEG XL pictures:** `pyvips` or `ffmpeg`
|
2169
2171
|
|
2170
2172
|
enable [smb](#smb-server) support (**not** recommended):
|
2171
|
-
* `impacket==0.
|
2173
|
+
* `impacket==0.12.0`
|
2172
2174
|
|
2173
2175
|
`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`
|
2174
2176
|
|
@@ -2242,7 +2244,7 @@ then again, if you are already into downloading shady binaries from the internet
|
|
2242
2244
|
|
2243
2245
|
## zipapp
|
2244
2246
|
|
2245
|
-
another emergency alternative, [copyparty.pyz](https://github.com/9001/copyparty/releases/latest/download/copyparty.pyz) has less features, 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 *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
|
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 temporay 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
|
2246
2248
|
|
2247
2249
|
run it by doubleclicking it, or try typing `python copyparty.pyz` in your terminal/console/commandline/telex if that fails
|
2248
2250
|
|
@@ -48,6 +48,60 @@ try:
|
|
48
48
|
except:
|
49
49
|
CORES = (os.cpu_count() if hasattr(os, "cpu_count") else 0) or 2
|
50
50
|
|
51
|
+
# all embedded resources to be retrievable over http
|
52
|
+
zs = """
|
53
|
+
web/a/partyfuse.py
|
54
|
+
web/a/u2c.py
|
55
|
+
web/a/webdav-cfg.bat
|
56
|
+
web/baguettebox.js
|
57
|
+
web/browser.css
|
58
|
+
web/browser.html
|
59
|
+
web/browser.js
|
60
|
+
web/browser2.html
|
61
|
+
web/cf.html
|
62
|
+
web/copyparty.gif
|
63
|
+
web/dd/2.png
|
64
|
+
web/dd/3.png
|
65
|
+
web/dd/4.png
|
66
|
+
web/dd/5.png
|
67
|
+
web/deps/busy.mp3
|
68
|
+
web/deps/easymde.css
|
69
|
+
web/deps/easymde.js
|
70
|
+
web/deps/marked.js
|
71
|
+
web/deps/fuse.py
|
72
|
+
web/deps/mini-fa.css
|
73
|
+
web/deps/mini-fa.woff
|
74
|
+
web/deps/prism.css
|
75
|
+
web/deps/prism.js
|
76
|
+
web/deps/prismd.css
|
77
|
+
web/deps/scp.woff2
|
78
|
+
web/deps/sha512.ac.js
|
79
|
+
web/deps/sha512.hw.js
|
80
|
+
web/md.css
|
81
|
+
web/md.html
|
82
|
+
web/md.js
|
83
|
+
web/md2.css
|
84
|
+
web/md2.js
|
85
|
+
web/mde.css
|
86
|
+
web/mde.html
|
87
|
+
web/mde.js
|
88
|
+
web/msg.css
|
89
|
+
web/msg.html
|
90
|
+
web/shares.css
|
91
|
+
web/shares.html
|
92
|
+
web/shares.js
|
93
|
+
web/splash.css
|
94
|
+
web/splash.html
|
95
|
+
web/splash.js
|
96
|
+
web/svcs.html
|
97
|
+
web/svcs.js
|
98
|
+
web/ui.css
|
99
|
+
web/up2k.js
|
100
|
+
web/util.js
|
101
|
+
web/w.hash.js
|
102
|
+
"""
|
103
|
+
RES = set(zs.strip().split("\n"))
|
104
|
+
|
51
105
|
|
52
106
|
class EnvParams(object):
|
53
107
|
def __init__(self) :
|
@@ -57,6 +57,8 @@ from .util import (
|
|
57
57
|
ansi_re,
|
58
58
|
b64enc,
|
59
59
|
dedent,
|
60
|
+
has_resource,
|
61
|
+
load_resource,
|
60
62
|
min_ex,
|
61
63
|
pybin,
|
62
64
|
termsize,
|
@@ -319,8 +321,7 @@ def ensure_locale() :
|
|
319
321
|
|
320
322
|
|
321
323
|
def ensure_webdeps() :
|
322
|
-
|
323
|
-
if os.path.exists(ap):
|
324
|
+
if has_resource(E, "web/deps/mini-fa.woff"):
|
324
325
|
return
|
325
326
|
|
326
327
|
warn(
|
@@ -511,14 +512,18 @@ def sfx_tpoke(top ):
|
|
511
512
|
|
512
513
|
|
513
514
|
def showlic() :
|
514
|
-
|
515
|
-
|
515
|
+
try:
|
516
|
+
with load_resource(E, "res/COPYING.txt") as f:
|
517
|
+
buf = f.read()
|
518
|
+
except:
|
519
|
+
buf = b""
|
520
|
+
|
521
|
+
if buf:
|
522
|
+
print(buf.decode("utf-8", "replace"))
|
523
|
+
else:
|
516
524
|
print("no relevant license info to display")
|
517
525
|
return
|
518
526
|
|
519
|
-
with open(p, "rb") as f:
|
520
|
-
print(f.read().decode("utf-8", "replace"))
|
521
|
-
|
522
527
|
|
523
528
|
def get_sects():
|
524
529
|
return [
|
@@ -1166,7 +1171,7 @@ def add_smb(ap):
|
|
1166
1171
|
ap2.add_argument("--smbw", action="store_true", help="enable write support (please dont)")
|
1167
1172
|
ap2.add_argument("--smb1", action="store_true", help="disable SMBv2, only enable SMBv1 (CIFS)")
|
1168
1173
|
ap2.add_argument("--smb-port", metavar="PORT", type=int, default=445, help="port to listen on -- if you change this value, you must NAT from TCP:445 to this port using iptables or similar")
|
1169
|
-
ap2.add_argument("--smb-nwa-1", action="store_true", help="
|
1174
|
+
ap2.add_argument("--smb-nwa-1", action="store_true", help="truncate directory listings to 64kB (~400 files); avoids impacket-0.11 bug, fixes impacket-0.12 performance")
|
1170
1175
|
ap2.add_argument("--smb-nwa-2", action="store_true", help="disable impacket workaround for filecopy globs")
|
1171
1176
|
ap2.add_argument("--smba", action="store_true", help="small performance boost: disable per-account permissions, enables account coalescing instead (if one user has write/delete-access, then everyone does)")
|
1172
1177
|
ap2.add_argument("--smbv", action="store_true", help="verbose")
|
@@ -1558,16 +1563,13 @@ def run_argparse(
|
|
1558
1563
|
return ret
|
1559
1564
|
|
1560
1565
|
|
1561
|
-
def main(argv = None
|
1566
|
+
def main(argv = None) :
|
1562
1567
|
time.strptime("19970815", "%Y%m%d") # python#7980
|
1563
1568
|
if WINDOWS:
|
1564
1569
|
os.system("rem") # enables colors
|
1565
1570
|
|
1566
1571
|
init_E(E)
|
1567
1572
|
|
1568
|
-
if rsrc: # pyz
|
1569
|
-
E.mod = rsrc
|
1570
|
-
|
1571
1573
|
if argv is None:
|
1572
1574
|
argv = sys.argv
|
1573
1575
|
|
@@ -7,7 +7,7 @@ import shutil
|
|
7
7
|
import time
|
8
8
|
|
9
9
|
from .__init__ import ANYWIN
|
10
|
-
from .util import Netdev, runcmd, wrename, wunlink
|
10
|
+
from .util import Netdev, load_resource, runcmd, wrename, wunlink
|
11
11
|
|
12
12
|
HAVE_CFSSL = not os.environ.get("PRTY_NO_CFSSL")
|
13
13
|
|
@@ -25,13 +25,15 @@ def ensure_cert(log , args) :
|
|
25
25
|
|
26
26
|
i feel awful about this and so should they
|
27
27
|
"""
|
28
|
-
|
28
|
+
with load_resource(args.E, "res/insecure.pem") as f:
|
29
|
+
cert_insec = f.read()
|
29
30
|
cert_appdata = os.path.join(args.E.cfg, "cert.pem")
|
30
31
|
if not os.path.isfile(args.cert):
|
31
32
|
if cert_appdata != args.cert:
|
32
33
|
raise Exception("certificate file does not exist: " + args.cert)
|
33
34
|
|
34
|
-
|
35
|
+
with open(args.cert, "wb") as f:
|
36
|
+
f.write(cert_insec)
|
35
37
|
|
36
38
|
with open(args.cert, "rb") as f:
|
37
39
|
buf = f.read()
|
@@ -46,7 +48,9 @@ def ensure_cert(log , args) :
|
|
46
48
|
raise Exception(m + "private key must appear before server certificate")
|
47
49
|
|
48
50
|
try:
|
49
|
-
|
51
|
+
with open(args.cert, "rb") as f:
|
52
|
+
active_cert = f.read()
|
53
|
+
if active_cert == cert_insec:
|
50
54
|
t = "using default TLS certificate; https will be insecure:\033[36m {}"
|
51
55
|
log("cert", t.format(args.cert), 3)
|
52
56
|
except:
|
@@ -147,14 +151,22 @@ def _gen_srv(log , args, netdevs ):
|
|
147
151
|
raise Exception("no useable cert found")
|
148
152
|
|
149
153
|
expired = time.time() + args.crt_sdays * 60 * 60 * 24 * 0.5 > expiry
|
150
|
-
|
154
|
+
if expired:
|
155
|
+
raise Exception("old server-cert has expired")
|
156
|
+
|
151
157
|
for n in names:
|
152
158
|
if n not in inf["sans"]:
|
153
159
|
raise Exception("does not have {}".format(n))
|
154
|
-
|
155
|
-
|
156
|
-
|
160
|
+
|
161
|
+
with load_resource(args.E, "res/insecure.pem") as f:
|
162
|
+
cert_insec = f.read()
|
163
|
+
|
164
|
+
with open(args.cert, "rb") as f:
|
165
|
+
active_cert = f.read()
|
166
|
+
|
167
|
+
if active_cert and active_cert != cert_insec:
|
157
168
|
return
|
169
|
+
|
158
170
|
except Exception as ex:
|
159
171
|
log("cert", "will create new server-cert; {}".format(ex))
|
160
172
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
from __future__ import print_function, unicode_literals
|
3
3
|
|
4
4
|
# awk -F\" '/add_argument\("-[^-]/{print(substr($2,2))}' copyparty/__main__.py | sort | tr '\n' ' '
|
5
|
-
zs = "a c e2d e2ds e2dsa e2t e2ts e2tsr e2v e2vp e2vu ed emp i j lo mcr mte mth mtm mtp nb nc nid nih nw p q s ss sss v z zv"
|
5
|
+
zs = "a c e2d e2ds e2dsa e2t e2ts e2tsr e2v e2vp e2vu ed emp i j lo mcr mte mth mtm mtp nb nc nid nih nth nw p q s ss sss v z zv"
|
6
6
|
onedash = set(zs.split())
|
7
7
|
|
8
8
|
|
@@ -159,7 +159,7 @@ class FtpFs(AbstractedFS):
|
|
159
159
|
t = "Unsupported characters in [{}]"
|
160
160
|
raise FSE(t.format(vpath), 1)
|
161
161
|
|
162
|
-
fn = sanitize_fn(fn or "", ""
|
162
|
+
fn = sanitize_fn(fn or "", "")
|
163
163
|
vpath = vjoin(rd, fn)
|
164
164
|
vfs, rem = self.hub.asrv.vfs.get(vpath, self.uname, r, w, m, d)
|
165
165
|
if not vfs.realpath:
|