copyparty 1.16.16__py3-none-any.whl → 1.16.18__py3-none-any.whl
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/__main__.py +21 -40
- copyparty/__version__.py +2 -2
- copyparty/authsrv.py +137 -56
- copyparty/cfg.py +10 -0
- copyparty/fsutil.py +7 -5
- copyparty/ftpd.py +11 -0
- copyparty/httpcli.py +87 -33
- copyparty/mtag.py +1 -2
- copyparty/svchub.py +5 -4
- copyparty/szip.py +1 -2
- copyparty/tcpsrv.py +18 -0
- copyparty/tftpd.py +29 -8
- copyparty/up2k.py +13 -8
- copyparty/util.py +62 -3
- copyparty/web/browser.js.gz +0 -0
- copyparty/web/up2k.js.gz +0 -0
- copyparty/web/util.js.gz +0 -0
- {copyparty-1.16.16.dist-info → copyparty-1.16.18.dist-info}/METADATA +14 -3
- {copyparty-1.16.16.dist-info → copyparty-1.16.18.dist-info}/RECORD +23 -23
- {copyparty-1.16.16.dist-info → copyparty-1.16.18.dist-info}/WHEEL +1 -1
- {copyparty-1.16.16.dist-info → copyparty-1.16.18.dist-info}/entry_points.txt +0 -0
- {copyparty-1.16.16.dist-info → copyparty-1.16.18.dist-info/licenses}/LICENSE +0 -0
- {copyparty-1.16.16.dist-info → copyparty-1.16.18.dist-info}/top_level.txt +0 -0
copyparty/util.py
CHANGED
@@ -31,6 +31,17 @@ from collections import Counter
|
|
31
31
|
from ipaddress import IPv4Address, IPv4Network, IPv6Address, IPv6Network
|
32
32
|
from queue import Queue
|
33
33
|
|
34
|
+
try:
|
35
|
+
from zlib_ng import gzip_ng as gzip
|
36
|
+
from zlib_ng import zlib_ng as zlib
|
37
|
+
|
38
|
+
sys.modules["gzip"] = gzip
|
39
|
+
# sys.modules["zlib"] = zlib
|
40
|
+
# `- somehow makes tarfile 3% slower with default malloc, and barely faster with mimalloc
|
41
|
+
except:
|
42
|
+
import gzip
|
43
|
+
import zlib
|
44
|
+
|
34
45
|
from .__init__ import (
|
35
46
|
ANYWIN,
|
36
47
|
EXE,
|
@@ -213,6 +224,9 @@ SYMTIME = PY36 and os.utime in os.supports_follow_symlinks
|
|
213
224
|
|
214
225
|
META_NOBOTS = '<meta name="robots" content="noindex, nofollow">\n'
|
215
226
|
|
227
|
+
# smart enough to understand javascript while also ignoring rel="nofollow"
|
228
|
+
BAD_BOTS = r"Barkrowler|bingbot|BLEXBot|Googlebot|GPTBot|PetalBot|SeekportBot|SemrushBot|YandexBot"
|
229
|
+
|
216
230
|
FFMPEG_URL = "https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z"
|
217
231
|
|
218
232
|
URL_PRJ = "https://github.com/9001/copyparty"
|
@@ -427,6 +441,8 @@ UNHUMANIZE_UNITS = {
|
|
427
441
|
|
428
442
|
VF_CAREFUL = {"mv_re_t": 5, "rm_re_t": 5, "mv_re_r": 0.1, "rm_re_r": 0.1}
|
429
443
|
|
444
|
+
FN_EMB = set([".prologue.html", ".epilogue.html", "readme.md", "preadme.md"])
|
445
|
+
|
430
446
|
|
431
447
|
def read_ram() :
|
432
448
|
a = b = 0
|
@@ -572,6 +588,38 @@ except Exception as ex:
|
|
572
588
|
print("using fallback base64 codec due to %r" % (ex,))
|
573
589
|
|
574
590
|
|
591
|
+
class NotUTF8(Exception):
|
592
|
+
pass
|
593
|
+
|
594
|
+
|
595
|
+
def read_utf8(log , ap , strict ) :
|
596
|
+
with open(ap, "rb") as f:
|
597
|
+
buf = f.read()
|
598
|
+
|
599
|
+
try:
|
600
|
+
return buf.decode("utf-8", "strict")
|
601
|
+
except UnicodeDecodeError as ex:
|
602
|
+
eo = ex.start
|
603
|
+
eb = buf[eo : eo + 1]
|
604
|
+
|
605
|
+
if not strict:
|
606
|
+
t = "WARNING: The file [%s] is not using the UTF-8 character encoding; some characters in the file will be skipped/ignored. The first unreadable character was byte %r at offset %d. Please convert this file to UTF-8 by opening the file in your text-editor and saving it as UTF-8."
|
607
|
+
t = t % (ap, eb, eo)
|
608
|
+
if log:
|
609
|
+
log(t, 3)
|
610
|
+
else:
|
611
|
+
print(t)
|
612
|
+
return buf.decode("utf-8", "replace")
|
613
|
+
|
614
|
+
t = "ERROR: The file [%s] is not using the UTF-8 character encoding, and cannot be loaded. The first unreadable character was byte %r at offset %d. Please convert this file to UTF-8 by opening the file in your text-editor and saving it as UTF-8."
|
615
|
+
t = t % (ap, eb, eo)
|
616
|
+
if log:
|
617
|
+
log(t, 3)
|
618
|
+
else:
|
619
|
+
print(t)
|
620
|
+
raise NotUTF8(t)
|
621
|
+
|
622
|
+
|
575
623
|
class Daemon(threading.Thread):
|
576
624
|
def __init__(
|
577
625
|
self,
|
@@ -1337,8 +1385,6 @@ def stackmon(fp , ival , suffix ) :
|
|
1337
1385
|
buf = st.encode("utf-8", "replace")
|
1338
1386
|
|
1339
1387
|
if fp.endswith(".gz"):
|
1340
|
-
import gzip
|
1341
|
-
|
1342
1388
|
# 2459b 2304b 2241b 2202b 2194b 2191b lv3..8
|
1343
1389
|
# 0.06s 0.08s 0.11s 0.13s 0.16s 0.19s
|
1344
1390
|
buf = gzip.compress(buf, compresslevel=6)
|
@@ -3926,9 +3972,22 @@ class WrongPostKey(Pebkac):
|
|
3926
3972
|
self.datagen = datagen
|
3927
3973
|
|
3928
3974
|
|
3929
|
-
_ = (
|
3975
|
+
_ = (
|
3976
|
+
gzip,
|
3977
|
+
mp,
|
3978
|
+
zlib,
|
3979
|
+
BytesIO,
|
3980
|
+
quote,
|
3981
|
+
unquote,
|
3982
|
+
SQLITE_VER,
|
3983
|
+
JINJA_VER,
|
3984
|
+
PYFTPD_VER,
|
3985
|
+
PARTFTPY_VER,
|
3986
|
+
)
|
3930
3987
|
__all__ = [
|
3988
|
+
"gzip",
|
3931
3989
|
"mp",
|
3990
|
+
"zlib",
|
3932
3991
|
"BytesIO",
|
3933
3992
|
"quote",
|
3934
3993
|
"unquote",
|
copyparty/web/browser.js.gz
CHANGED
Binary file
|
copyparty/web/up2k.js.gz
CHANGED
Binary file
|
copyparty/web/util.js.gz
CHANGED
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: copyparty
|
3
|
-
Version: 1.16.
|
3
|
+
Version: 1.16.18
|
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
|
@@ -54,6 +54,7 @@ Provides-Extra: pwhash
|
|
54
54
|
Requires-Dist: argon2-cffi; extra == "pwhash"
|
55
55
|
Provides-Extra: zeromq
|
56
56
|
Requires-Dist: pyzmq; extra == "zeromq"
|
57
|
+
Dynamic: license-file
|
57
58
|
|
58
59
|
<img src="https://github.com/9001/copyparty/raw/hovudstraum/docs/logo.svg" width="250" align="right"/>
|
59
60
|
|
@@ -157,6 +158,7 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
157
158
|
* [custom mimetypes](#custom-mimetypes) - change the association of a file extension
|
158
159
|
* [GDPR compliance](#GDPR-compliance) - imagine using copyparty professionally...
|
159
160
|
* [feature chickenbits](#feature-chickenbits) - buggy feature? rip it out
|
161
|
+
* [feature beefybits](#feature-beefybits) - force-enable features with known issues on your OS/env
|
160
162
|
* [packages](#packages) - the party might be closer than you think
|
161
163
|
* [arch package](#arch-package) - now [available on aur](https://aur.archlinux.org/packages/copyparty) maintained by [@icxes](https://github.com/icxes)
|
162
164
|
* [fedora package](#fedora-package) - does not exist yet
|
@@ -1893,7 +1895,7 @@ tell search engines you don't wanna be indexed, either using the good old [robo
|
|
1893
1895
|
* volflag `[...]:c,norobots` does the same thing for that single volume
|
1894
1896
|
* volflag `[...]:c,robots` ALLOWS search-engine crawling for that volume, even if `--no-robots` is set globally
|
1895
1897
|
|
1896
|
-
also, `--force-js` disables the plain HTML folder listing, making things harder to parse for search engines
|
1898
|
+
also, `--force-js` disables the plain HTML folder listing, making things harder to parse for *some* search engines -- note that crawlers which understand javascript (such as google) will not be affected
|
1897
1899
|
|
1898
1900
|
|
1899
1901
|
## themes
|
@@ -2194,6 +2196,15 @@ buggy feature? rip it out by setting any of the following environment variables
|
|
2194
2196
|
example: `PRTY_NO_IFADDR=1 python3 copyparty-sfx.py`
|
2195
2197
|
|
2196
2198
|
|
2199
|
+
### feature beefybits
|
2200
|
+
|
2201
|
+
force-enable features with known issues on your OS/env by setting any of the following environment variables, also affectionately known as `fuckitbits` or `hail-mary-bits`
|
2202
|
+
|
2203
|
+
| env-var | what it does |
|
2204
|
+
| ------------------------ | ------------ |
|
2205
|
+
| `PRTY_FORCE_MP` | force-enable multiprocessing (real multithreading) on MacOS and other broken platforms |
|
2206
|
+
|
2207
|
+
|
2197
2208
|
# packages
|
2198
2209
|
|
2199
2210
|
the party might be closer than you think
|
@@ -1,38 +1,38 @@
|
|
1
1
|
copyparty/__init__.py,sha256=VR6ZZhB9IxaK5TDXDTBM_OIP5ydkrdbaEnstktLM__s,2649
|
2
|
-
copyparty/__main__.py,sha256=
|
3
|
-
copyparty/__version__.py,sha256=
|
4
|
-
copyparty/authsrv.py,sha256=
|
2
|
+
copyparty/__main__.py,sha256=uViBDvQpkCCi0qjolJD80zDc8loFhhEHjYwhH0PGP-E,118299
|
3
|
+
copyparty/__version__.py,sha256=78j3OrDBpMZNsMwQSRDHMqr_rVUvNjxpxYHjQjQPJuE,252
|
4
|
+
copyparty/authsrv.py,sha256=nZ27CC3HxwVbbCLPMEO9v6NZV7pLYP3euwrQ9qwT3gg,111163
|
5
5
|
copyparty/broker_mp.py,sha256=QdOXXvV2Xn6J0CysEqyY3GZbqxQMyWnTpnba-a5lMc0,4987
|
6
6
|
copyparty/broker_mpw.py,sha256=PpSS4SK3pItlpfD8OwVr3QmJEPKlUgaf2nuMOozixgU,3347
|
7
7
|
copyparty/broker_thr.py,sha256=fjoYtpSscUA7-nMl4r1n2R7UK3J9lrvLS3rUZ-iJzKQ,1721
|
8
8
|
copyparty/broker_util.py,sha256=76mfnFOpX1gUUvtjm8UQI7jpTIaVINX10QonM-B7ggc,1680
|
9
9
|
copyparty/cert.py,sha256=0ZAPeXeMR164vWn9GQU3JDKooYXEq_NOQkDeg543ivg,8009
|
10
|
-
copyparty/cfg.py,sha256=
|
10
|
+
copyparty/cfg.py,sha256=921wcbj05-dLLM9AWDavqFfcp4-aVRUlFlwir44W_Eo,14106
|
11
11
|
copyparty/dxml.py,sha256=vu5uZQtwvwoqnFHbULs2Zh_y2DETu0T-ENpMZ1i2CV4,2505
|
12
|
-
copyparty/fsutil.py,sha256=
|
13
|
-
copyparty/ftpd.py,sha256=
|
14
|
-
copyparty/httpcli.py,sha256=
|
12
|
+
copyparty/fsutil.py,sha256=NC_CJC4TDag399vVDH9_uQfdfpTMwRFLNxERSWhlVvs,4594
|
13
|
+
copyparty/ftpd.py,sha256=G7PApVIFeSzRo4-D-9uRb8NxYgz6nFwTEbrOk1ErYCU,17969
|
14
|
+
copyparty/httpcli.py,sha256=NeHP9wqO998OJ3zKzAMZQ50rMaq6eXBC7M0fvRs3BDc,221105
|
15
15
|
copyparty/httpconn.py,sha256=mQSgljh0Q-jyWjF4tQLrHbRKRe9WKl19kGqsGMsJpWo,6880
|
16
16
|
copyparty/httpsrv.py,sha256=pxH_Eh8ElBLvOEDejgpP9Bvk65HNEou-03aYIcgXhrs,18090
|
17
17
|
copyparty/ico.py,sha256=eWSxEae4wOCfheHl-m-wchYvFRAR_97kJDb4NGaB-Z8,3561
|
18
18
|
copyparty/mdns.py,sha256=G73OWWg1copda47LgayCRK7qjVrk6cnUGpMR5ugmi7o,18315
|
19
19
|
copyparty/metrics.py,sha256=1dim0ShnsD5cfspRbeN9Mt14wOIxPRtxCZY2IScikKw,8974
|
20
|
-
copyparty/mtag.py,sha256=
|
20
|
+
copyparty/mtag.py,sha256=7lINRFc1Vrc-ebP2hU3dBHH3BRFOnEmEZ0jzlpYb8Jg,19910
|
21
21
|
copyparty/multicast.py,sha256=Me4XEEJijvvK2lMRwmGU2hsaI5_E9AEpCjIC4b9UefA,12393
|
22
22
|
copyparty/pwhash.py,sha256=X87RWeay8IhzGVZLDKE5LctF9YVUcYxPAJ1BX6r_9CU,4248
|
23
23
|
copyparty/smbd.py,sha256=dixFl2wlWymq_Cycc8a4cVB4gY8RSg2e3tE7Xr-aDa0,14614
|
24
24
|
copyparty/ssdp.py,sha256=R1Z61GZOxBMF2Sk4RTxKWMOemogmcjEWG-CvLihd45k,7023
|
25
25
|
copyparty/star.py,sha256=tV5BbX6AiQ7N4UU8DYtSTckNYeoeey4DBqq4LjfymbY,3818
|
26
26
|
copyparty/sutil.py,sha256=6zEEGl4hRe6bTB83Y_RtnBGxr2JcUa__GdiAMqNJZnY,3208
|
27
|
-
copyparty/svchub.py,sha256
|
28
|
-
copyparty/szip.py,sha256=
|
29
|
-
copyparty/tcpsrv.py,sha256=
|
30
|
-
copyparty/tftpd.py,sha256=
|
27
|
+
copyparty/svchub.py,sha256=-4GjPLFytUdALrfaAvsQHm_HKYoQkteTXJFKxrF3Q1Y,41574
|
28
|
+
copyparty/szip.py,sha256=7_RVwHCGk7ON79sAB5HAIUbTEbjDDtn99141aGaI_MA,8596
|
29
|
+
copyparty/tcpsrv.py,sha256=L8jsmFhs6GdJYA58gnsUM1RDakFzHSQGlDcsaeTq-8w,20472
|
30
|
+
copyparty/tftpd.py,sha256=HAXNbIM7I3yFng_a4ubLWGQ4trRTineAZsUPTZDWNQs,14001
|
31
31
|
copyparty/th_cli.py,sha256=PxDAmUvO_8Vm5edXiWtsCft0Fw69QL9rCHf9zLmUNeA,4800
|
32
32
|
copyparty/th_srv.py,sha256=tHbh_Ve3v8tYclWH2thLs5oFufeXgJi1duUMveKIx9k,30725
|
33
33
|
copyparty/u2idx.py,sha256=G6MDbD4I_sJSOwaNFZ6XLTQhnEDrB12pVKuKhzQ_leE,13676
|
34
|
-
copyparty/up2k.py,sha256=
|
35
|
-
copyparty/util.py,sha256=
|
34
|
+
copyparty/up2k.py,sha256=RRC58ac9IpK0CyBJIs0Ri1Fk0IsGlQRp1bvB-agDQko,177450
|
35
|
+
copyparty/util.py,sha256=wjBrdCEBlPhCL3N9Ls4dRKIjYpDHK7W1DzPpLEIvgjQ,101114
|
36
36
|
copyparty/bos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
37
|
copyparty/bos/bos.py,sha256=Wb7eWsXJgR5AFlBR9ZOyKrLTwy-Kct9RrGiOu4Jo37Y,1622
|
38
38
|
copyparty/bos/path.py,sha256=yEjCq2ki9CvxA5sCT8pS0keEXwugs0ZeUyUhdBziOCI,777
|
@@ -57,7 +57,7 @@ copyparty/stolen/ifaddr/_win32.py,sha256=EE-QyoBgeB7lYQ6z62VjXNaRozaYfCkaJBHGNA8
|
|
57
57
|
copyparty/web/baguettebox.js.gz,sha256=r2c_hOZV_RTyl4CqWWX14FDWP8nnDVwGkDl4Sfk0rU4,8239
|
58
58
|
copyparty/web/browser.css.gz,sha256=_HiFW5vPUusWadoqdY8ZihuWizY9UECAc5nIamBPRi4,11654
|
59
59
|
copyparty/web/browser.html,sha256=auvhLVE_t0aIN0q-nk0zOWFqITgDhroMAAviBNLoFfc,4788
|
60
|
-
copyparty/web/browser.js.gz,sha256=
|
60
|
+
copyparty/web/browser.js.gz,sha256=48fDqIqQKCkrH0VsYVj03sDOx9gEZ-DfiHDaqEUuyr0,92341
|
61
61
|
copyparty/web/browser2.html,sha256=NRUZ08GH-e2YcGXcoz0UjYg6JIVF42u4IMX4HHwWTmg,1587
|
62
62
|
copyparty/web/cf.html,sha256=lJThtNFNAQT1ClCHHlivAkDGE0LutedwopXD62Z8Nys,589
|
63
63
|
copyparty/web/dbg-audio.js.gz,sha256=Ma-KZtK8LnmiwNvNKFKXMPYl_Nn_3U7GsJ6-DRWC2HE,688
|
@@ -83,8 +83,8 @@ copyparty/web/splash.js.gz,sha256=4VqNznN10-bT33IJm3VWzBEJ1s08XZyxFB1TYPUkuAo,27
|
|
83
83
|
copyparty/web/svcs.html,sha256=dnE1fG15zOpq7u0GYt8ij6BUv_LTwsiipFeneVYlMsM,14140
|
84
84
|
copyparty/web/svcs.js.gz,sha256=lMXEP9W-VlXyANlva4q0ASSxvvHYlE2CrmxGgZXZop0,713
|
85
85
|
copyparty/web/ui.css.gz,sha256=0sHIwGsL3_xH8Uu6N0Ag3bKBTjf-e_yfFbKynEZXAnk,2800
|
86
|
-
copyparty/web/up2k.js.gz,sha256=
|
87
|
-
copyparty/web/util.js.gz,sha256=
|
86
|
+
copyparty/web/up2k.js.gz,sha256=VQVWBXK2gEz1b8if_ujXHNHnfBO7cdrKoSjqX397VUI,24519
|
87
|
+
copyparty/web/util.js.gz,sha256=rD9iLfVLKRhxC8hmakal-s18xN_rs6GuOqyRPii6HQ8,15110
|
88
88
|
copyparty/web/w.hash.js.gz,sha256=JhJagnqIkcKng_hs6otEgzcuQE7keToG_r5dd2o3EfU,1108
|
89
89
|
copyparty/web/a/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
90
90
|
copyparty/web/a/partyfuse.py,sha256=9p5Hpg_IBiSimv7j9kmPhCGpy-FLXSRUOYnLjJ5JifU,28049
|
@@ -109,9 +109,9 @@ copyparty/web/deps/prismd.css.gz,sha256=ObUlksQVr-OuYlTz-I4B23TeBg2QDVVGRnWBz8cV
|
|
109
109
|
copyparty/web/deps/scp.woff2,sha256=w99BDU5i8MukkMEL-iW0YO9H4vFFZSPWxbkH70ytaAg,8612
|
110
110
|
copyparty/web/deps/sha512.ac.js.gz,sha256=lFZaCLumgWxrvEuDr4bqdKHsqjX82AbVAb7_F45Yk88,7033
|
111
111
|
copyparty/web/deps/sha512.hw.js.gz,sha256=UAed2_ocklZCnIzcSYz2h4P1ycztlCLj-ewsRTud2lU,7939
|
112
|
-
copyparty-1.16.
|
113
|
-
copyparty-1.16.
|
114
|
-
copyparty-1.16.
|
115
|
-
copyparty-1.16.
|
116
|
-
copyparty-1.16.
|
117
|
-
copyparty-1.16.
|
112
|
+
copyparty-1.16.18.dist-info/licenses/LICENSE,sha256=gOr4h33pCsBEg9uIy9AYmb7qlocL4V9t2uPJS5wllr0,1072
|
113
|
+
copyparty-1.16.18.dist-info/METADATA,sha256=VyOufoEysGMjSNtqLmv-7SFthPGqw-tk_G0Vjt2aBUs,158674
|
114
|
+
copyparty-1.16.18.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
115
|
+
copyparty-1.16.18.dist-info/entry_points.txt,sha256=4zw6a3rqASywQomiYLObjjlxybaI65LYYOTJwgKz7b0,128
|
116
|
+
copyparty-1.16.18.dist-info/top_level.txt,sha256=LnYUPsDyk-8kFgM6YJLG4h820DQekn81cObKSu9g-sI,10
|
117
|
+
copyparty-1.16.18.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|