copyparty 1.10.2__tar.gz → 1.11.1__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.
Files changed (128) hide show
  1. {copyparty-1.10.2 → copyparty-1.11.1}/PKG-INFO +62 -20
  2. {copyparty-1.10.2 → copyparty-1.11.1}/README.md +60 -18
  3. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/__main__.py +16 -6
  4. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/__version__.py +3 -3
  5. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/authsrv.py +365 -66
  6. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/cfg.py +3 -0
  7. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/ftpd.py +2 -2
  8. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/httpcli.py +113 -48
  9. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/httpconn.py +4 -1
  10. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/httpsrv.py +8 -3
  11. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/metrics.py +3 -0
  12. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/multicast.py +1 -1
  13. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/smbd.py +1 -1
  14. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/svchub.py +55 -14
  15. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/tftpd.py +11 -9
  16. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/up2k.py +143 -49
  17. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/util.py +52 -8
  18. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/baguettebox.js.gz +0 -0
  19. copyparty-1.11.1/copyparty/web/browser.css.gz +0 -0
  20. copyparty-1.11.1/copyparty/web/browser.js.gz +0 -0
  21. copyparty-1.11.1/copyparty/web/deps/easymde.css.gz +0 -0
  22. copyparty-1.11.1/copyparty/web/deps/easymde.js.gz +0 -0
  23. copyparty-1.11.1/copyparty/web/md.css.gz +0 -0
  24. copyparty-1.11.1/copyparty/web/md.js.gz +0 -0
  25. copyparty-1.11.1/copyparty/web/md2.css.gz +0 -0
  26. copyparty-1.11.1/copyparty/web/md2.js.gz +0 -0
  27. copyparty-1.11.1/copyparty/web/mde.css.gz +0 -0
  28. copyparty-1.11.1/copyparty/web/mde.js.gz +0 -0
  29. copyparty-1.11.1/copyparty/web/msg.css.gz +0 -0
  30. copyparty-1.11.1/copyparty/web/splash.css.gz +0 -0
  31. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/splash.html +4 -2
  32. copyparty-1.11.1/copyparty/web/splash.js.gz +0 -0
  33. copyparty-1.11.1/copyparty/web/ui.css.gz +0 -0
  34. copyparty-1.11.1/copyparty/web/up2k.js.gz +0 -0
  35. copyparty-1.11.1/copyparty/web/util.js.gz +0 -0
  36. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty.egg-info/PKG-INFO +62 -20
  37. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty.egg-info/SOURCES.txt +2 -0
  38. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty.egg-info/requires.txt +1 -1
  39. {copyparty-1.10.2 → copyparty-1.11.1}/pyproject.toml +1 -1
  40. copyparty-1.10.2/copyparty/web/browser.css.gz +0 -0
  41. copyparty-1.10.2/copyparty/web/browser.js.gz +0 -0
  42. copyparty-1.10.2/copyparty/web/md.css.gz +0 -0
  43. copyparty-1.10.2/copyparty/web/md.js.gz +0 -0
  44. copyparty-1.10.2/copyparty/web/md2.css.gz +0 -0
  45. copyparty-1.10.2/copyparty/web/md2.js.gz +0 -0
  46. copyparty-1.10.2/copyparty/web/mde.css.gz +0 -0
  47. copyparty-1.10.2/copyparty/web/mde.js.gz +0 -0
  48. copyparty-1.10.2/copyparty/web/msg.css.gz +0 -0
  49. copyparty-1.10.2/copyparty/web/splash.css.gz +0 -0
  50. copyparty-1.10.2/copyparty/web/splash.js.gz +0 -0
  51. copyparty-1.10.2/copyparty/web/ui.css.gz +0 -0
  52. copyparty-1.10.2/copyparty/web/up2k.js.gz +0 -0
  53. copyparty-1.10.2/copyparty/web/util.js.gz +0 -0
  54. {copyparty-1.10.2 → copyparty-1.11.1}/LICENSE +0 -0
  55. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/__init__.py +0 -0
  56. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/bos/__init__.py +0 -0
  57. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/bos/bos.py +0 -0
  58. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/bos/path.py +0 -0
  59. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/broker_mp.py +0 -0
  60. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/broker_mpw.py +0 -0
  61. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/broker_thr.py +0 -0
  62. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/broker_util.py +0 -0
  63. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/cert.py +0 -0
  64. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/dxml.py +0 -0
  65. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/fsutil.py +0 -0
  66. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/ico.py +0 -0
  67. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/mdns.py +0 -0
  68. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/mtag.py +0 -0
  69. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/pwhash.py +0 -0
  70. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/res/COPYING.txt +0 -0
  71. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/res/__init__.py +0 -0
  72. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/res/insecure.pem +0 -0
  73. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/ssdp.py +0 -0
  74. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/star.py +0 -0
  75. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/__init__.py +0 -0
  76. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/dnslib/__init__.py +0 -0
  77. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/dnslib/bimap.py +0 -0
  78. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/dnslib/bit.py +0 -0
  79. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/dnslib/buffer.py +0 -0
  80. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/dnslib/dns.py +0 -0
  81. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/dnslib/label.py +0 -0
  82. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/dnslib/lex.py +0 -0
  83. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/dnslib/ranges.py +0 -0
  84. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/ifaddr/__init__.py +0 -0
  85. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/ifaddr/_posix.py +0 -0
  86. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/ifaddr/_shared.py +0 -0
  87. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/ifaddr/_win32.py +0 -0
  88. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/qrcodegen.py +0 -0
  89. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/stolen/surrogateescape.py +0 -0
  90. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/sutil.py +0 -0
  91. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/szip.py +0 -0
  92. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/tcpsrv.py +0 -0
  93. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/th_cli.py +0 -0
  94. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/th_srv.py +0 -0
  95. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/u2idx.py +0 -0
  96. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/a/__init__.py +0 -0
  97. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/a/partyfuse.py +0 -0
  98. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/a/u2c.py +0 -0
  99. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/a/webdav-cfg.bat +0 -0
  100. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/browser.html +1 -1
  101. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/browser2.html +1 -1
  102. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/cf.html +0 -0
  103. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/dbg-audio.js.gz +0 -0
  104. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/dd/2.png +0 -0
  105. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/dd/3.png +0 -0
  106. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/dd/4.png +0 -0
  107. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/dd/5.png +0 -0
  108. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/dd/__init__.py +0 -0
  109. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/deps/__init__.py +0 -0
  110. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/deps/marked.js.gz +0 -0
  111. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/deps/mini-fa.css.gz +0 -0
  112. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/deps/mini-fa.woff +0 -0
  113. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/deps/prism.css.gz +0 -0
  114. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/deps/prism.js.gz +0 -0
  115. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/deps/prismd.css.gz +0 -0
  116. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/deps/scp.woff2 +0 -0
  117. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/deps/sha512.ac.js.gz +0 -0
  118. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/deps/sha512.hw.js.gz +0 -0
  119. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/md.html +1 -1
  120. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/mde.html +1 -1
  121. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/msg.html +1 -1
  122. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/svcs.html +1 -1
  123. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/svcs.js.gz +0 -0
  124. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty/web/w.hash.js.gz +0 -0
  125. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty.egg-info/dependency_links.txt +0 -0
  126. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty.egg-info/entry_points.txt +0 -0
  127. {copyparty-1.10.2 → copyparty-1.11.1}/copyparty.egg-info/top_level.txt +0 -0
  128. {copyparty-1.10.2 → copyparty-1.11.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: copyparty
3
- Version: 1.10.2
3
+ Version: 1.11.1
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
@@ -48,7 +48,7 @@ Provides-Extra: ftps
48
48
  Requires-Dist: pyftpdlib; extra == "ftps"
49
49
  Requires-Dist: pyopenssl; extra == "ftps"
50
50
  Provides-Extra: tftpd
51
- Requires-Dist: partftpy>=0.3.0; extra == "tftpd"
51
+ Requires-Dist: partftpy>=0.3.1; extra == "tftpd"
52
52
  Provides-Extra: pwhash
53
53
  Requires-Dist: argon2-cffi; extra == "pwhash"
54
54
 
@@ -124,14 +124,16 @@ turn almost any device into a file server with resumable uploads/downloads using
124
124
  * [upload events](#upload-events) - the older, more powerful approach ([examples](./bin/mtag/))
125
125
  * [handlers](#handlers) - redefine behavior with plugins ([examples](./bin/handlers/))
126
126
  * [identity providers](#identity-providers) - replace copyparty passwords with oauth and such
127
+ * [using the cloud as storage](#using-the-cloud-as-storage) - connecting to an aws s3 bucket and similar
127
128
  * [hiding from google](#hiding-from-google) - tell search engines you dont wanna be indexed
128
129
  * [themes](#themes)
129
130
  * [complete examples](#complete-examples)
130
131
  * [reverse-proxy](#reverse-proxy) - running copyparty next to other websites
132
+ * [real-ip](#real-ip) - teaching copyparty how to see client IPs
131
133
  * [prometheus](#prometheus) - metrics/stats can be enabled
132
134
  * [packages](#packages) - the party might be closer than you think
133
135
  * [arch package](#arch-package) - now [available on aur](https://aur.archlinux.org/packages/copyparty) maintained by [@icxes](https://github.com/icxes)
134
- * [fedora package](#fedora-package) - currently **NOT** available on [copr-pypi](https://copr.fedorainfracloud.org/coprs/g/copr/PyPI/)
136
+ * [fedora package](#fedora-package) - does not exist yet
135
137
  * [nix package](#nix-package) - `nix profile install github:9001/copyparty`
136
138
  * [nixos module](#nixos-module)
137
139
  * [browser support](#browser-support) - TLDR: yes
@@ -158,7 +160,7 @@ turn almost any device into a file server with resumable uploads/downloads using
158
160
  * [sfx](#sfx) - the self-contained "binary"
159
161
  * [copyparty.exe](#copypartyexe) - download [copyparty.exe](https://github.com/9001/copyparty/releases/latest/download/copyparty.exe) (win8+) or [copyparty32.exe](https://github.com/9001/copyparty/releases/latest/download/copyparty32.exe) (win7+)
160
162
  * [install on android](#install-on-android)
161
- * [reporting bugs](#reporting-bugs) - ideas for context to include in bug reports
163
+ * [reporting bugs](#reporting-bugs) - ideas for context to include, and where to submit them
162
164
  * [devnotes](#devnotes) - for build instructions etc, see [./docs/devnotes.md](./docs/devnotes.md)
163
165
 
164
166
 
@@ -340,6 +342,9 @@ roughly sorted by chance of encounter
340
342
  * cannot index non-ascii filenames with `-e2d`
341
343
  * cannot handle filenames with mojibake
342
344
 
345
+ if you have a new exciting bug to share, see [reporting bugs](#reporting-bugs)
346
+
347
+
343
348
  ## not my bugs
344
349
 
345
350
  same order here too
@@ -395,9 +400,24 @@ upgrade notes
395
400
  * yes, using the [`g` permission](#accounts-and-volumes), see the examples there
396
401
  * you can also do this with linux filesystem permissions; `chmod 111 music` will make it possible to access files and folders inside the `music` folder but not list the immediate contents -- also works with other software, not just copyparty
397
402
 
403
+ * can I link someone to a password-protected volume/file by including the password in the URL?
404
+ * yes, by adding `?pw=hunter2` to the end; replace `?` with `&` if there are parameters in the URL already, meaning it contains a `?` near the end
405
+
406
+ * how do I stop `.hist` folders from appearing everywhere on my HDD?
407
+ * by default, a `.hist` folder is created inside each volume for the filesystem index, thumbnails, audio transcodes, and markdown document history. Use the `--hist` global-option or the `hist` volflag to move it somewhere else; see [database location](#database-location)
408
+
398
409
  * can I make copyparty download a file to my server if I give it a URL?
399
410
  * yes, using [hooks](https://github.com/9001/copyparty/blob/hovudstraum/bin/hooks/wget.py)
400
411
 
412
+ * firefox refuses to connect over https, saying "Secure Connection Failed" or "SEC_ERROR_BAD_SIGNATURE", but the usual button to "Accept the Risk and Continue" is not shown
413
+ * firefox has corrupted its certstore; fix this by exiting firefox, then find and delete the file named `cert9.db` somewhere in your firefox profile folder
414
+
415
+ * the server keeps saying `thank you for playing` when I try to access the website
416
+ * you've gotten banned for malicious traffic! if this happens by mistake, and you're running a reverse-proxy and/or something like cloudflare, see [real-ip](#real-ip) on how to fix this
417
+
418
+ * copyparty seems to think I am using http, even though the URL is https
419
+ * your reverse-proxy is not sending the `X-Forwarded-Proto: https` header; this could be because your reverse-proxy itself is confused. Ensure that none of the intermediates (such as cloudflare) are terminating https before the traffic hits your entrypoint
420
+
401
421
  * i want to learn python and/or programming and am considering looking at the copyparty source code in that occasion
402
422
  * ```bash
403
423
  _| _ __ _ _|_
@@ -635,7 +655,7 @@ this initiates an upload using `up2k`; there are two uploaders available:
635
655
  * `[🎈] bup`, the basic uploader, supports almost every browser since netscape 4.0
636
656
  * `[🚀] up2k`, the good / fancy one
637
657
 
638
- NB: you can undo/delete your own uploads with `[🧯]` [unpost](#unpost)
658
+ NB: you can undo/delete your own uploads with `[🧯]` [unpost](#unpost) (and this is also where you abort unfinished uploads, but you have to refresh the page first)
639
659
 
640
660
  up2k has several advantages:
641
661
  * you can drop folders into the browser (files are added recursively)
@@ -1306,11 +1326,24 @@ replace 404 and 403 errors with something completely different (that's it for no
1306
1326
 
1307
1327
  replace copyparty passwords with oauth and such
1308
1328
 
1309
- work is [ongoing](https://github.com/9001/copyparty/issues/62) to support authenticating / authorizing users based on a separate authentication proxy, which makes it possible to support oauth, single-sign-on, etc.
1329
+ you can disable the built-in password-based login sysem, 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
1330
+
1331
+ a popular choice is [Authelia](https://www.authelia.com/) (config-file based), another one is [authentik](https://goauthentik.io/) (GUI-based, more complex)
1332
+
1333
+ there is a [docker-compose example](./docs/examples/docker/idp-authelia-traefik) which is hopefully a good starting point (alternatively see [./docs/idp.md](./docs/idp.md) if you're the DIY type)
1334
+
1335
+ a more complete example of the copyparty configuration options [look like this](./docs/examples/docker/idp/copyparty.conf)
1336
+
1337
+
1338
+ ## using the cloud as storage
1339
+
1340
+ connecting to an aws s3 bucket and similar
1341
+
1342
+ there is no built-in support for this, but you can use FUSE-software such as [rclone](https://rclone.org/) / [geesefs](https://github.com/yandex-cloud/geesefs) / [JuiceFS](https://juicefs.com/en/) to first mount your cloud storage as a local disk, and then let copyparty use (a folder in) that disk as a volume
1310
1343
 
1311
- it is currently possible to specify `--idp-h-usr x-username`; copyparty will then skip password validation and blindly trust the username specified in the `X-Username` request header
1344
+ you may experience poor upload performance this way, but that can sometimes be fixed by specifying the volflag `sparse` to force the use of sparse files; this has improved the upload speeds from `1.5 MiB/s` to over `80 MiB/s` in one case, but note that you are also more likely to discover funny bugs in your FUSE software this way, so buckle up
1312
1345
 
1313
- the remaining stuff (accepting user groups through another header, creating volumes on the fly) are still to-do; configuration will probably [look like this](./docs/examples/docker/idp/copyparty.conf)
1346
+ someone has also tested geesefs in combination with [gocryptfs](https://nuetzlich.net/gocryptfs/) with surprisingly good results, getting 60 MiB/s upload speeds on a gbit line, but JuiceFS won with 80 MiB/s using its built-in encryption
1314
1347
 
1315
1348
 
1316
1349
  ## hiding from google
@@ -1346,6 +1379,8 @@ the classname of the HTML tag is set according to the selected theme, which is u
1346
1379
 
1347
1380
  see the top of [./copyparty/web/browser.css](./copyparty/web/browser.css) where the color variables are set, and there's layout-specific stuff near the bottom
1348
1381
 
1382
+ if you want to change the fonts, see [./docs/rice/](./docs/rice/)
1383
+
1349
1384
 
1350
1385
  ## complete examples
1351
1386
 
@@ -1406,6 +1441,15 @@ example webserver configs:
1406
1441
  * [apache2 config](contrib/apache/copyparty.conf) -- location-based
1407
1442
 
1408
1443
 
1444
+ ### real-ip
1445
+
1446
+ teaching copyparty how to see client IPs when running behind a reverse-proxy, or a WAF, or another protection service such as cloudflare
1447
+
1448
+ if you (and maybe everybody else) keep getting a message that says `thank you for playing`, then you've gotten banned for malicious traffic. This ban applies to the IP address that copyparty *thinks* identifies the shady client -- so, depending on your setup, you might have to tell copyparty where to find the correct IP
1449
+
1450
+ for most common setups, there should be a helpful message in the server-log explaining what to do, but see [docs/xff.md](docs/xff.md) if you want to learn more, including a quick hack to **just make it work** (which is **not** recommended, but hey...)
1451
+
1452
+
1409
1453
  ## prometheus
1410
1454
 
1411
1455
  metrics/stats can be enabled at URL `/.cpr/metrics` for grafana / prometheus / etc (openmetrics 1.0.0)
@@ -1485,17 +1529,7 @@ it comes with a [systemd service](./contrib/package/arch/copyparty.service) and
1485
1529
 
1486
1530
  ## fedora package
1487
1531
 
1488
- currently **NOT** available on [copr-pypi](https://copr.fedorainfracloud.org/coprs/g/copr/PyPI/) , fedora is having issues with their build servers and won't be fixed for several months
1489
-
1490
- if you previously installed copyparty from copr, you may run one of the following commands to upgrade to a more recent version:
1491
-
1492
- ```bash
1493
- dnf install https://ocv.me/copyparty/fedora/37/python3-copyparty.fc37.noarch.rpm
1494
- dnf install https://ocv.me/copyparty/fedora/38/python3-copyparty.fc38.noarch.rpm
1495
- dnf install https://ocv.me/copyparty/fedora/39/python3-copyparty.fc39.noarch.rpm
1496
- ```
1497
-
1498
- to run copyparty as a service, use the [systemd service scripts](https://github.com/9001/copyparty/tree/hovudstraum/contrib/systemd), just replace `/usr/bin/python3 /usr/local/bin/copyparty-sfx.py` with `/usr/bin/copyparty`
1532
+ does not exist yet; using the [copr-pypi](https://copr.fedorainfracloud.org/coprs/g/copr/PyPI/) builds is **NOT recommended** because updates can be delayed by [several months](https://github.com/fedora-copr/copr/issues/3056)
1499
1533
 
1500
1534
 
1501
1535
  ## nix package
@@ -1997,7 +2031,12 @@ if you want thumbnails (photos+videos) and you're okay with spending another 132
1997
2031
 
1998
2032
  # reporting bugs
1999
2033
 
2000
- ideas for context to include in bug reports
2034
+ ideas for context to include, and where to submit them
2035
+
2036
+ please get in touch using any of the following URLs:
2037
+ * https://github.com/9001/copyparty/ **(primary)**
2038
+ * https://gitlab.com/9001/copyparty/ *(mirror)*
2039
+ * https://codeberg.org/9001/copyparty *(mirror)*
2001
2040
 
2002
2041
  in general, commandline arguments (and config file if any)
2003
2042
 
@@ -2012,3 +2051,6 @@ if there's a wall of base64 in the log (thread stacks) then please include that,
2012
2051
  # devnotes
2013
2052
 
2014
2053
  for build instructions etc, see [./docs/devnotes.md](./docs/devnotes.md)
2054
+
2055
+ see [./docs/TODO.md](./docs/TODO.md) for planned features / fixes / changes
2056
+
@@ -70,14 +70,16 @@ turn almost any device into a file server with resumable uploads/downloads using
70
70
  * [upload events](#upload-events) - the older, more powerful approach ([examples](./bin/mtag/))
71
71
  * [handlers](#handlers) - redefine behavior with plugins ([examples](./bin/handlers/))
72
72
  * [identity providers](#identity-providers) - replace copyparty passwords with oauth and such
73
+ * [using the cloud as storage](#using-the-cloud-as-storage) - connecting to an aws s3 bucket and similar
73
74
  * [hiding from google](#hiding-from-google) - tell search engines you dont wanna be indexed
74
75
  * [themes](#themes)
75
76
  * [complete examples](#complete-examples)
76
77
  * [reverse-proxy](#reverse-proxy) - running copyparty next to other websites
78
+ * [real-ip](#real-ip) - teaching copyparty how to see client IPs
77
79
  * [prometheus](#prometheus) - metrics/stats can be enabled
78
80
  * [packages](#packages) - the party might be closer than you think
79
81
  * [arch package](#arch-package) - now [available on aur](https://aur.archlinux.org/packages/copyparty) maintained by [@icxes](https://github.com/icxes)
80
- * [fedora package](#fedora-package) - currently **NOT** available on [copr-pypi](https://copr.fedorainfracloud.org/coprs/g/copr/PyPI/)
82
+ * [fedora package](#fedora-package) - does not exist yet
81
83
  * [nix package](#nix-package) - `nix profile install github:9001/copyparty`
82
84
  * [nixos module](#nixos-module)
83
85
  * [browser support](#browser-support) - TLDR: yes
@@ -104,7 +106,7 @@ turn almost any device into a file server with resumable uploads/downloads using
104
106
  * [sfx](#sfx) - the self-contained "binary"
105
107
  * [copyparty.exe](#copypartyexe) - download [copyparty.exe](https://github.com/9001/copyparty/releases/latest/download/copyparty.exe) (win8+) or [copyparty32.exe](https://github.com/9001/copyparty/releases/latest/download/copyparty32.exe) (win7+)
106
108
  * [install on android](#install-on-android)
107
- * [reporting bugs](#reporting-bugs) - ideas for context to include in bug reports
109
+ * [reporting bugs](#reporting-bugs) - ideas for context to include, and where to submit them
108
110
  * [devnotes](#devnotes) - for build instructions etc, see [./docs/devnotes.md](./docs/devnotes.md)
109
111
 
110
112
 
@@ -286,6 +288,9 @@ roughly sorted by chance of encounter
286
288
  * cannot index non-ascii filenames with `-e2d`
287
289
  * cannot handle filenames with mojibake
288
290
 
291
+ if you have a new exciting bug to share, see [reporting bugs](#reporting-bugs)
292
+
293
+
289
294
  ## not my bugs
290
295
 
291
296
  same order here too
@@ -341,9 +346,24 @@ upgrade notes
341
346
  * yes, using the [`g` permission](#accounts-and-volumes), see the examples there
342
347
  * you can also do this with linux filesystem permissions; `chmod 111 music` will make it possible to access files and folders inside the `music` folder but not list the immediate contents -- also works with other software, not just copyparty
343
348
 
349
+ * can I link someone to a password-protected volume/file by including the password in the URL?
350
+ * yes, by adding `?pw=hunter2` to the end; replace `?` with `&` if there are parameters in the URL already, meaning it contains a `?` near the end
351
+
352
+ * how do I stop `.hist` folders from appearing everywhere on my HDD?
353
+ * by default, a `.hist` folder is created inside each volume for the filesystem index, thumbnails, audio transcodes, and markdown document history. Use the `--hist` global-option or the `hist` volflag to move it somewhere else; see [database location](#database-location)
354
+
344
355
  * can I make copyparty download a file to my server if I give it a URL?
345
356
  * yes, using [hooks](https://github.com/9001/copyparty/blob/hovudstraum/bin/hooks/wget.py)
346
357
 
358
+ * firefox refuses to connect over https, saying "Secure Connection Failed" or "SEC_ERROR_BAD_SIGNATURE", but the usual button to "Accept the Risk and Continue" is not shown
359
+ * firefox has corrupted its certstore; fix this by exiting firefox, then find and delete the file named `cert9.db` somewhere in your firefox profile folder
360
+
361
+ * the server keeps saying `thank you for playing` when I try to access the website
362
+ * you've gotten banned for malicious traffic! if this happens by mistake, and you're running a reverse-proxy and/or something like cloudflare, see [real-ip](#real-ip) on how to fix this
363
+
364
+ * copyparty seems to think I am using http, even though the URL is https
365
+ * your reverse-proxy is not sending the `X-Forwarded-Proto: https` header; this could be because your reverse-proxy itself is confused. Ensure that none of the intermediates (such as cloudflare) are terminating https before the traffic hits your entrypoint
366
+
347
367
  * i want to learn python and/or programming and am considering looking at the copyparty source code in that occasion
348
368
  * ```bash
349
369
  _| _ __ _ _|_
@@ -581,7 +601,7 @@ this initiates an upload using `up2k`; there are two uploaders available:
581
601
  * `[🎈] bup`, the basic uploader, supports almost every browser since netscape 4.0
582
602
  * `[🚀] up2k`, the good / fancy one
583
603
 
584
- NB: you can undo/delete your own uploads with `[🧯]` [unpost](#unpost)
604
+ NB: you can undo/delete your own uploads with `[🧯]` [unpost](#unpost) (and this is also where you abort unfinished uploads, but you have to refresh the page first)
585
605
 
586
606
  up2k has several advantages:
587
607
  * you can drop folders into the browser (files are added recursively)
@@ -1252,11 +1272,24 @@ replace 404 and 403 errors with something completely different (that's it for no
1252
1272
 
1253
1273
  replace copyparty passwords with oauth and such
1254
1274
 
1255
- work is [ongoing](https://github.com/9001/copyparty/issues/62) to support authenticating / authorizing users based on a separate authentication proxy, which makes it possible to support oauth, single-sign-on, etc.
1275
+ you can disable the built-in password-based login sysem, 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
1276
+
1277
+ a popular choice is [Authelia](https://www.authelia.com/) (config-file based), another one is [authentik](https://goauthentik.io/) (GUI-based, more complex)
1278
+
1279
+ there is a [docker-compose example](./docs/examples/docker/idp-authelia-traefik) which is hopefully a good starting point (alternatively see [./docs/idp.md](./docs/idp.md) if you're the DIY type)
1280
+
1281
+ a more complete example of the copyparty configuration options [look like this](./docs/examples/docker/idp/copyparty.conf)
1282
+
1283
+
1284
+ ## using the cloud as storage
1285
+
1286
+ connecting to an aws s3 bucket and similar
1287
+
1288
+ there is no built-in support for this, but you can use FUSE-software such as [rclone](https://rclone.org/) / [geesefs](https://github.com/yandex-cloud/geesefs) / [JuiceFS](https://juicefs.com/en/) to first mount your cloud storage as a local disk, and then let copyparty use (a folder in) that disk as a volume
1256
1289
 
1257
- it is currently possible to specify `--idp-h-usr x-username`; copyparty will then skip password validation and blindly trust the username specified in the `X-Username` request header
1290
+ you may experience poor upload performance this way, but that can sometimes be fixed by specifying the volflag `sparse` to force the use of sparse files; this has improved the upload speeds from `1.5 MiB/s` to over `80 MiB/s` in one case, but note that you are also more likely to discover funny bugs in your FUSE software this way, so buckle up
1258
1291
 
1259
- the remaining stuff (accepting user groups through another header, creating volumes on the fly) are still to-do; configuration will probably [look like this](./docs/examples/docker/idp/copyparty.conf)
1292
+ someone has also tested geesefs in combination with [gocryptfs](https://nuetzlich.net/gocryptfs/) with surprisingly good results, getting 60 MiB/s upload speeds on a gbit line, but JuiceFS won with 80 MiB/s using its built-in encryption
1260
1293
 
1261
1294
 
1262
1295
  ## hiding from google
@@ -1292,6 +1325,8 @@ the classname of the HTML tag is set according to the selected theme, which is u
1292
1325
 
1293
1326
  see the top of [./copyparty/web/browser.css](./copyparty/web/browser.css) where the color variables are set, and there's layout-specific stuff near the bottom
1294
1327
 
1328
+ if you want to change the fonts, see [./docs/rice/](./docs/rice/)
1329
+
1295
1330
 
1296
1331
  ## complete examples
1297
1332
 
@@ -1352,6 +1387,15 @@ example webserver configs:
1352
1387
  * [apache2 config](contrib/apache/copyparty.conf) -- location-based
1353
1388
 
1354
1389
 
1390
+ ### real-ip
1391
+
1392
+ teaching copyparty how to see client IPs when running behind a reverse-proxy, or a WAF, or another protection service such as cloudflare
1393
+
1394
+ if you (and maybe everybody else) keep getting a message that says `thank you for playing`, then you've gotten banned for malicious traffic. This ban applies to the IP address that copyparty *thinks* identifies the shady client -- so, depending on your setup, you might have to tell copyparty where to find the correct IP
1395
+
1396
+ for most common setups, there should be a helpful message in the server-log explaining what to do, but see [docs/xff.md](docs/xff.md) if you want to learn more, including a quick hack to **just make it work** (which is **not** recommended, but hey...)
1397
+
1398
+
1355
1399
  ## prometheus
1356
1400
 
1357
1401
  metrics/stats can be enabled at URL `/.cpr/metrics` for grafana / prometheus / etc (openmetrics 1.0.0)
@@ -1431,17 +1475,7 @@ it comes with a [systemd service](./contrib/package/arch/copyparty.service) and
1431
1475
 
1432
1476
  ## fedora package
1433
1477
 
1434
- currently **NOT** available on [copr-pypi](https://copr.fedorainfracloud.org/coprs/g/copr/PyPI/) , fedora is having issues with their build servers and won't be fixed for several months
1435
-
1436
- if you previously installed copyparty from copr, you may run one of the following commands to upgrade to a more recent version:
1437
-
1438
- ```bash
1439
- dnf install https://ocv.me/copyparty/fedora/37/python3-copyparty.fc37.noarch.rpm
1440
- dnf install https://ocv.me/copyparty/fedora/38/python3-copyparty.fc38.noarch.rpm
1441
- dnf install https://ocv.me/copyparty/fedora/39/python3-copyparty.fc39.noarch.rpm
1442
- ```
1443
-
1444
- to run copyparty as a service, use the [systemd service scripts](https://github.com/9001/copyparty/tree/hovudstraum/contrib/systemd), just replace `/usr/bin/python3 /usr/local/bin/copyparty-sfx.py` with `/usr/bin/copyparty`
1478
+ does not exist yet; using the [copr-pypi](https://copr.fedorainfracloud.org/coprs/g/copr/PyPI/) builds is **NOT recommended** because updates can be delayed by [several months](https://github.com/fedora-copr/copr/issues/3056)
1445
1479
 
1446
1480
 
1447
1481
  ## nix package
@@ -1943,7 +1977,12 @@ if you want thumbnails (photos+videos) and you're okay with spending another 132
1943
1977
 
1944
1978
  # reporting bugs
1945
1979
 
1946
- ideas for context to include in bug reports
1980
+ ideas for context to include, and where to submit them
1981
+
1982
+ please get in touch using any of the following URLs:
1983
+ * https://github.com/9001/copyparty/ **(primary)**
1984
+ * https://gitlab.com/9001/copyparty/ *(mirror)*
1985
+ * https://codeberg.org/9001/copyparty *(mirror)*
1947
1986
 
1948
1987
  in general, commandline arguments (and config file if any)
1949
1988
 
@@ -1958,3 +1997,6 @@ if there's a wall of base64 in the log (thread stacks) then please include that,
1958
1997
  # devnotes
1959
1998
 
1960
1999
  for build instructions etc, see [./docs/devnotes.md](./docs/devnotes.md)
2000
+
2001
+ see [./docs/TODO.md](./docs/TODO.md) for planned features / fixes / changes
2002
+
@@ -389,7 +389,7 @@ def configure_ssl_ciphers(al ) :
389
389
 
390
390
  def args_from_cfg(cfg_path ) :
391
391
  lines = []
392
- expand_config_file(lines, cfg_path, "")
392
+ expand_config_file(None, lines, cfg_path, "")
393
393
  lines = upgrade_cfg_fmt(None, argparse.Namespace(vc=False), lines, "")
394
394
 
395
395
  ret = []
@@ -497,6 +497,10 @@ def get_sects():
497
497
  * "\033[33mperm\033[0m" is "permissions,username1,username2,..."
498
498
  * "\033[32mvolflag\033[0m" is config flags to set on this volume
499
499
 
500
+ --grp takes groupname:username1,username2,...
501
+ and groupnames can be used instead of usernames in -v
502
+ by prefixing the groupname with %
503
+
500
504
  list of permissions:
501
505
  "r" (read): list folder contents, download files
502
506
  "w" (write): upload files; need "r" to see the uploads
@@ -834,6 +838,7 @@ def add_general(ap, nc, srvname):
834
838
  ap2.add_argument("-j", metavar="CORES", type=int, default=1, help="max num cpu cores, 0=all")
835
839
  ap2.add_argument("-a", metavar="ACCT", type=u, action="append", help="add account, \033[33mUSER\033[0m:\033[33mPASS\033[0m; example [\033[32med:wark\033[0m]")
836
840
  ap2.add_argument("-v", metavar="VOL", type=u, action="append", help="add volume, \033[33mSRC\033[0m:\033[33mDST\033[0m:\033[33mFLAG\033[0m; examples [\033[32m.::r\033[0m], [\033[32m/mnt/nas/music:/music:r:aed\033[0m], see --help-accounts")
841
+ ap2.add_argument("--grp", metavar="G:N,N", type=u, action="append", help="add group, \033[33mNAME\033[0m:\033[33mUSER1\033[0m,\033[33mUSER2\033[0m,\033[33m...\033[0m; example [\033[32madmins:ed,foo,bar\033[0m]")
837
842
  ap2.add_argument("-ed", action="store_true", help="enable the ?dots url parameter / client option which allows clients to see dotfiles / hidden files (volflag=dots)")
838
843
  ap2.add_argument("--urlform", metavar="MODE", type=u, default="print,get", help="how to handle url-form POSTs; see \033[33m--help-urlform\033[0m")
839
844
  ap2.add_argument("--wintitle", metavar="TXT", type=u, default="cpp @ $pub", help="server terminal title, for example [\033[32m$ip-10.1.2.\033[0m] or [\033[32m$ip-]")
@@ -865,6 +870,7 @@ def add_upload(ap):
865
870
  ap2.add_argument("--dotpart", action="store_true", help="dotfile incomplete uploads, hiding them from clients unless \033[33m-ed\033[0m")
866
871
  ap2.add_argument("--plain-ip", action="store_true", help="when avoiding filename collisions by appending the uploader's ip to the filename: append the plaintext ip instead of salting and hashing the ip")
867
872
  ap2.add_argument("--unpost", metavar="SEC", type=int, default=3600*12, help="grace period where uploads can be deleted by the uploader, even without delete permissions; 0=disabled, default=12h")
873
+ ap2.add_argument("--u2abort", metavar="NUM", type=int, default=1, help="clients can abort incomplete uploads by using the unpost tab (requires \033[33m-e2d\033[0m). [\033[32m0\033[0m] = never allowed (disable feature), [\033[32m1\033[0m] = allow if client has the same IP as the upload AND is using the same account, [\033[32m2\033[0m] = just check the IP, [\033[32m3\033[0m] = just check account-name (volflag=u2abort)")
868
874
  ap2.add_argument("--blank-wt", metavar="SEC", type=int, default=300, help="file write grace period (any client can write to a blank file last-modified more recently than \033[33mSEC\033[0m seconds ago)")
869
875
  ap2.add_argument("--reg-cap", metavar="N", type=int, default=38400, help="max number of uploads to keep in memory when running without \033[33m-e2d\033[0m; roughly 1 MiB RAM per 600")
870
876
  ap2.add_argument("--no-fpool", action="store_true", help="disable file-handle pooling -- instead, repeatedly close and reopen files during upload (bad idea to enable this on windows and/or cow filesystems)")
@@ -895,8 +901,8 @@ def add_network(ap):
895
901
  ap2.add_argument("--ll", action="store_true", help="include link-local IPv4/IPv6 in mDNS replies, even if the NIC has routable IPs (breaks some mDNS clients)")
896
902
  ap2.add_argument("--rproxy", metavar="DEPTH", type=int, default=1, help="which ip to associate clients with; [\033[32m0\033[0m]=tcp, [\033[32m1\033[0m]=origin (first x-fwd, unsafe), [\033[32m2\033[0m]=outermost-proxy, [\033[32m3\033[0m]=second-proxy, [\033[32m-1\033[0m]=closest-proxy")
897
903
  ap2.add_argument("--xff-hdr", metavar="NAME", type=u, default="x-forwarded-for", help="if reverse-proxied, which http header to read the client's real ip from")
898
- ap2.add_argument("--xff-src", metavar="IP", type=u, default="127., ::1", help="comma-separated list of trusted reverse-proxy IPs; only accept the real-ip header (\033[33m--xff-hdr\033[0m) if the incoming connection is from an IP starting with either of these. Can be disabled with [\033[32many\033[0m] if you are behind cloudflare (or similar) and are using \033[32m--xff-hdr=cf-connecting-ip\033[0m (or similar)")
899
- ap2.add_argument("--ipa", metavar="PREFIX", type=u, default="", help="only accept connections from IP-addresses starting with \033[33mPREFIX\033[0m; example: [\033[32m127., 10.89., 192.168.\033[0m]")
904
+ ap2.add_argument("--xff-src", metavar="CIDR", type=u, default="127.0.0.0/8, ::1/128", help="comma-separated list of trusted reverse-proxy CIDRs; only accept the real-ip header (\033[33m--xff-hdr\033[0m) and IdP headers if the incoming connection is from an IP within either of these subnets. Specify [\033[32mlan\033[0m] to allow all LAN / private / non-internet IPs. Can be disabled with [\033[32many\033[0m] if you are behind cloudflare (or similar) and are using \033[32m--xff-hdr=cf-connecting-ip\033[0m (or similar)")
905
+ ap2.add_argument("--ipa", metavar="CIDR", type=u, default="", help="only accept connections from IP-addresses inside \033[33mCIDR\033[0m; examples: [\033[32mlan\033[0m] or [\033[32m10.89.0.0/16, 192.168.33.0/24\033[0m]")
900
906
  ap2.add_argument("--rp-loc", metavar="PATH", type=u, default="", help="if reverse-proxying on a location instead of a dedicated domain/subdomain, provide the base location here; example: [\033[32m/foo/bar\033[0m]")
901
907
  if ANYWIN:
902
908
  ap2.add_argument("--reuseaddr", action="store_true", help="set reuseaddr on listening sockets on windows; allows rapid restart of copyparty at the expense of being able to accidentally start multiple instances")
@@ -943,8 +949,9 @@ def add_cert(ap, cert_path):
943
949
  def add_auth(ap):
944
950
  ap2 = ap.add_argument_group('IdP / identity provider / user authentication options')
945
951
  ap2.add_argument("--idp-h-usr", metavar="HN", type=u, default="", help="bypass the copyparty authentication checks and assume the request-header \033[33mHN\033[0m contains the username of the requesting user (for use with authentik/oauth/...)\n\033[1;31mWARNING:\033[0m if you enable this, make sure clients are unable to specify this header themselves; must be washed away and replaced by a reverse-proxy")
946
- return
947
952
  ap2.add_argument("--idp-h-grp", metavar="HN", type=u, default="", help="assume the request-header \033[33mHN\033[0m contains the groupname of the requesting user; can be referenced in config files for group-based access control")
953
+ ap2.add_argument("--idp-h-key", metavar="HN", type=u, default="", help="optional but recommended safeguard; your reverse-proxy will insert a secret header named \033[33mHN\033[0m into all requests, and the other IdP headers will be ignored if this header is not present")
954
+ ap2.add_argument("--idp-gsep", metavar="RE", type=u, default="|:;+,", help="if there are multiple groups in \033[33m--idp-h-grp\033[0m, they are separated by one of the characters in \033[33mRE\033[0m")
948
955
 
949
956
 
950
957
  def add_zeroconf(ap):
@@ -993,7 +1000,7 @@ def add_ftp(ap):
993
1000
  ap2.add_argument("--ftps", metavar="PORT", type=int, help="enable FTPS server on \033[33mPORT\033[0m, for example \033[32m3990")
994
1001
  ap2.add_argument("--ftpv", action="store_true", help="verbose")
995
1002
  ap2.add_argument("--ftp4", action="store_true", help="only listen on IPv4")
996
- ap2.add_argument("--ftp-ipa", metavar="PFX", type=u, default="", help="only accept connections from IP-addresses starting with \033[33mPFX\033[0m; specify [\033[32many\033[0m] to disable inheriting \033[33m--ipa\033[0m. Example: [\033[32m127., 10.89., 192.168.\033[0m]")
1003
+ ap2.add_argument("--ftp-ipa", metavar="CIDR", type=u, default="", help="only accept connections from IP-addresses inside \033[33mCIDR\033[0m; specify [\033[32many\033[0m] to disable inheriting \033[33m--ipa\033[0m. Examples: [\033[32mlan\033[0m] or [\033[32m10.89.0.0/16, 192.168.33.0/24\033[0m]")
997
1004
  ap2.add_argument("--ftp-wt", metavar="SEC", type=int, default=7, help="grace period for resuming interrupted uploads (any client can write to any file last-modified more recently than \033[33mSEC\033[0m seconds ago)")
998
1005
  ap2.add_argument("--ftp-nat", metavar="ADDR", type=u, help="the NAT address to use for passive connections")
999
1006
  ap2.add_argument("--ftp-pr", metavar="P-P", type=u, help="the range of TCP ports to use for passive connections, for example \033[32m12000-13000")
@@ -1016,7 +1023,7 @@ def add_tftp(ap):
1016
1023
  ap2.add_argument("--tftp-no-fast", action="store_true", help="debug: disable optimizations")
1017
1024
  ap2.add_argument("--tftp-lsf", metavar="PTN", type=u, default="\\.?(dir|ls)(\\.txt)?", help="return a directory listing if a file with this name is requested and it does not exist; defaults matches .ls, dir, .dir.txt, ls.txt, ...")
1018
1025
  ap2.add_argument("--tftp-nols", action="store_true", help="if someone tries to download a directory, return an error instead of showing its directory listing")
1019
- ap2.add_argument("--tftp-ipa", metavar="PFX", type=u, default="", help="only accept connections from IP-addresses starting with \033[33mPFX\033[0m; specify [\033[32many\033[0m] to disable inheriting \033[33m--ipa\033[0m. Example: [\033[32m127., 10.89., 192.168.\033[0m]")
1026
+ ap2.add_argument("--tftp-ipa", metavar="CIDR", type=u, default="", help="only accept connections from IP-addresses inside \033[33mCIDR\033[0m; specify [\033[32many\033[0m] to disable inheriting \033[33m--ipa\033[0m. Examples: [\033[32mlan\033[0m] or [\033[32m10.89.0.0/16, 192.168.33.0/24\033[0m]")
1020
1027
  ap2.add_argument("--tftp-pr", metavar="P-P", type=u, help="the range of UDP ports to use for data transfer, for example \033[32m12000-13000")
1021
1028
 
1022
1029
 
@@ -1109,6 +1116,7 @@ def add_safety(ap):
1109
1116
  ap2.add_argument("--ban-url", metavar="N,W,B", type=u, default="9,2,1440", help="hitting more than \033[33mN\033[0m sus URL's in \033[33mW\033[0m minutes = ban for \033[33mB\033[0m minutes; applies only to permissions g/G/h (decent replacement for \033[33m--ban-404\033[0m if that can't be used)")
1110
1117
  ap2.add_argument("--sus-urls", metavar="R", type=u, default=r"\.php$|(^|/)wp-(admin|content|includes)/", help="URLs which are considered sus / eligible for banning; disable with blank or [\033[32mno\033[0m]")
1111
1118
  ap2.add_argument("--nonsus-urls", metavar="R", type=u, default=r"^(favicon\.ico|robots\.txt)$|^apple-touch-icon|^\.well-known", help="harmless URLs ignored from 404-bans; disable with blank or [\033[32mno\033[0m]")
1119
+ ap2.add_argument("--early-ban", action="store_true", help="if a client is banned, reject its connection as soon as possible; not a good idea to enable when proxied behind cloudflare since it could ban your reverse-proxy")
1112
1120
  ap2.add_argument("--aclose", metavar="MIN", type=int, default=10, help="if a client maxes out the server connection limit, downgrade it from connection:keep-alive to connection:close for \033[33mMIN\033[0m minutes (and also kill its active connections) -- disable with 0")
1113
1121
  ap2.add_argument("--loris", metavar="B", type=int, default=60, help="if a client maxes out the server connection limit without sending headers, ban it for \033[33mB\033[0m minutes; disable with [\033[32m0\033[0m]")
1114
1122
  ap2.add_argument("--acao", metavar="V[,V]", type=u, default="*", help="Access-Control-Allow-Origin; list of origins (domains/IPs without port) to accept requests from; [\033[32mhttps://1.2.3.4\033[0m]. Default [\033[32m*\033[0m] allows requests from all sites but removes cookies and http-auth; only ?pw=hunter2 survives")
@@ -1263,6 +1271,7 @@ def add_ui(ap, retry):
1263
1271
  ap2.add_argument("--bname", metavar="TXT", type=u, default="--name", help="server name (displayed in filebrowser document title)")
1264
1272
  ap2.add_argument("--pb-url", metavar="URL", type=u, default="https://github.com/9001/copyparty", help="powered-by link; disable with \033[33m-np\033[0m")
1265
1273
  ap2.add_argument("--ver", action="store_true", help="show version on the control panel (incompatible with \033[33m-nb\033[0m)")
1274
+ 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")
1266
1275
  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")
1267
1276
  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)")
1268
1277
  ap2.add_argument("--no-sb-md", action="store_true", help="don't sandbox README.md documents (volflags: no_sb_md | sb_md)")
@@ -1425,6 +1434,7 @@ def main(argv = None) :
1425
1434
  deprecated = [
1426
1435
  ("--salt", "--warksalt"),
1427
1436
  ("--hdr-au-usr", "--idp-h-usr"),
1437
+ ("--idp-h-sep", "--idp-gsep"),
1428
1438
  ("--th-no-crop", "--th-crop=n"),
1429
1439
  ]
1430
1440
  for dk, nk in deprecated:
@@ -1,8 +1,8 @@
1
1
  # coding: utf-8
2
2
 
3
- VERSION = (1, 10, 2)
4
- CODENAME = "tftp"
5
- BUILD_DT = (2024, 2, 21)
3
+ VERSION = (1, 11, 1)
4
+ CODENAME = "You Can (Not) Proceed"
5
+ BUILD_DT = (2024, 3, 18)
6
6
 
7
7
  S_VERSION = ".".join(map(str, VERSION))
8
8
  S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)