copyparty 1.19.7__py3-none-any.whl → 1.19.9__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.
Files changed (67) hide show
  1. copyparty/__init__.py +2 -0
  2. copyparty/__main__.py +60 -27
  3. copyparty/__version__.py +2 -2
  4. copyparty/authsrv.py +195 -14
  5. copyparty/bos/bos.py +38 -2
  6. copyparty/cfg.py +6 -0
  7. copyparty/ftpd.py +7 -25
  8. copyparty/httpcli.py +84 -34
  9. copyparty/httpsrv.py +1 -1
  10. copyparty/mdns.py +3 -1
  11. copyparty/mtag.py +0 -1
  12. copyparty/smbd.py +1 -1
  13. copyparty/svchub.py +38 -3
  14. copyparty/tcpsrv.py +4 -0
  15. copyparty/u2idx.py +29 -4
  16. copyparty/up2k.py +63 -29
  17. copyparty/util.py +49 -24
  18. copyparty/web/a/partyfuse.py +19 -11
  19. copyparty/web/a/u2c.py +6 -4
  20. copyparty/web/baguettebox.js.gz +0 -0
  21. copyparty/web/browser.css.gz +0 -0
  22. copyparty/web/browser.html +1 -1
  23. copyparty/web/browser.js.gz +0 -0
  24. copyparty/web/dbg-audio.js.gz +0 -0
  25. copyparty/web/deps/busy.mp3.gz +0 -0
  26. copyparty/web/deps/easymde.css.gz +0 -0
  27. copyparty/web/deps/easymde.js.gz +0 -0
  28. copyparty/web/deps/marked.js.gz +0 -0
  29. copyparty/web/deps/mini-fa.css.gz +0 -0
  30. copyparty/web/deps/prism.css.gz +0 -0
  31. copyparty/web/deps/prism.js.gz +0 -0
  32. copyparty/web/deps/prismd.css.gz +0 -0
  33. copyparty/web/deps/scp.woff2 +0 -0
  34. copyparty/web/deps/sha512.ac.js.gz +0 -0
  35. copyparty/web/idp.html +5 -5
  36. copyparty/web/md.css.gz +0 -0
  37. copyparty/web/md.html +1 -1
  38. copyparty/web/md.js.gz +0 -0
  39. copyparty/web/md2.css.gz +0 -0
  40. copyparty/web/md2.js.gz +0 -0
  41. copyparty/web/mde.css.gz +0 -0
  42. copyparty/web/mde.html +1 -1
  43. copyparty/web/mde.js.gz +0 -0
  44. copyparty/web/msg.css.gz +0 -0
  45. copyparty/web/msg.html +1 -1
  46. copyparty/web/rups.css.gz +0 -0
  47. copyparty/web/rups.html +1 -1
  48. copyparty/web/rups.js.gz +0 -0
  49. copyparty/web/shares.css.gz +0 -0
  50. copyparty/web/shares.html +5 -5
  51. copyparty/web/shares.js.gz +0 -0
  52. copyparty/web/splash.css.gz +0 -0
  53. copyparty/web/splash.html +54 -38
  54. copyparty/web/splash.js.gz +0 -0
  55. copyparty/web/svcs.html +80 -39
  56. copyparty/web/svcs.js.gz +0 -0
  57. copyparty/web/ui.css.gz +0 -0
  58. copyparty/web/up2k.js.gz +0 -0
  59. copyparty/web/util.js.gz +0 -0
  60. copyparty/web/w.hash.js.gz +0 -0
  61. {copyparty-1.19.7.dist-info → copyparty-1.19.9.dist-info}/METADATA +12 -1
  62. copyparty-1.19.9.dist-info/RECORD +113 -0
  63. copyparty-1.19.7.dist-info/RECORD +0 -113
  64. {copyparty-1.19.7.dist-info → copyparty-1.19.9.dist-info}/WHEEL +0 -0
  65. {copyparty-1.19.7.dist-info → copyparty-1.19.9.dist-info}/entry_points.txt +0 -0
  66. {copyparty-1.19.7.dist-info → copyparty-1.19.9.dist-info}/licenses/LICENSE +0 -0
  67. {copyparty-1.19.7.dist-info → copyparty-1.19.9.dist-info}/top_level.txt +0 -0
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
copyparty/web/idp.html CHANGED
@@ -10,7 +10,7 @@
10
10
  <meta name="theme-color" content="#{{ tcolor }}">
11
11
  <link rel="stylesheet" media="screen" href="{{ r }}/.cpr/shares.css?_={{ ts }}">
12
12
  <link rel="stylesheet" media="screen" href="{{ r }}/.cpr/ui.css?_={{ ts }}">
13
- {{ html_head }}
13
+ {{- html_head }}
14
14
  </head>
15
15
 
16
16
  <body>
@@ -23,17 +23,17 @@
23
23
  <th>user</th>
24
24
  <th>groups</th>
25
25
  </tr></thead><tbody>
26
- {% for un, gn in rows %}
26
+ {%- for un, gn in rows %}
27
27
  <tr>
28
28
  <td><a href="{{ r }}/?idp=rm={{ un|e }}">forget</a></td>
29
29
  <td>{{ un|e }}</td>
30
30
  <td>{{ gn|e }}</td>
31
31
  </tr>
32
- {% endfor %}
32
+ {%- endfor %}
33
33
  </tbody></table>
34
- {% if not rows %}
34
+ {%- if not rows %}
35
35
  (there are no IdP users in the cache)
36
- {% endif %}
36
+ {%- endif %}
37
37
  </div>
38
38
  <a href="#" id="repl">π</a>
39
39
  <script>
copyparty/web/md.css.gz CHANGED
Binary file
copyparty/web/md.html CHANGED
@@ -9,7 +9,7 @@
9
9
  {%- if edit %}
10
10
  <link rel="stylesheet" href="{{ r }}/.cpr/md2.css?_={{ ts }}">
11
11
  {%- endif %}
12
- {{ html_head }}
12
+ {{- html_head }}
13
13
  </head>
14
14
  <body>
15
15
  <div id="mn"></div>
copyparty/web/md.js.gz CHANGED
Binary file
copyparty/web/md2.css.gz CHANGED
Binary file
copyparty/web/md2.js.gz CHANGED
Binary file
copyparty/web/mde.css.gz CHANGED
Binary file
copyparty/web/mde.html CHANGED
@@ -8,7 +8,7 @@
8
8
  <link rel="stylesheet" href="{{ r }}/.cpr/mde.css?_={{ ts }}">
9
9
  <link rel="stylesheet" href="{{ r }}/.cpr/deps/mini-fa.css?_={{ ts }}">
10
10
  <link rel="stylesheet" href="{{ r }}/.cpr/deps/easymde.css?_={{ ts }}">
11
- {{ html_head }}
11
+ {{- html_head }}
12
12
  </head>
13
13
  <body>
14
14
  <div id="mw">
copyparty/web/mde.js.gz CHANGED
Binary file
copyparty/web/msg.css.gz CHANGED
Binary file
copyparty/web/msg.html CHANGED
@@ -8,7 +8,7 @@
8
8
  <meta name="viewport" content="width=device-width, initial-scale=0.8">
9
9
  <meta name="theme-color" content="#{{ tcolor }}">
10
10
  <link rel="stylesheet" media="screen" href="{{ r }}/.cpr/msg.css?_={{ ts }}">
11
- {{ html_head }}
11
+ {{- html_head }}
12
12
  </head>
13
13
 
14
14
  <body>
copyparty/web/rups.css.gz CHANGED
Binary file
copyparty/web/rups.html CHANGED
@@ -10,7 +10,7 @@
10
10
  <meta name="theme-color" content="#{{ tcolor }}">
11
11
  <link rel="stylesheet" media="screen" href="{{ r }}/.cpr/rups.css?_={{ ts }}">
12
12
  <link rel="stylesheet" media="screen" href="{{ r }}/.cpr/ui.css?_={{ ts }}">
13
- {{ html_head }}
13
+ {{- html_head }}
14
14
  </head>
15
15
 
16
16
  <body>
copyparty/web/rups.js.gz CHANGED
Binary file
Binary file
copyparty/web/shares.html CHANGED
@@ -10,7 +10,7 @@
10
10
  <meta name="theme-color" content="#{{ tcolor }}">
11
11
  <link rel="stylesheet" media="screen" href="{{ r }}/.cpr/shares.css?_={{ ts }}">
12
12
  <link rel="stylesheet" media="screen" href="{{ r }}/.cpr/ui.css?_={{ ts }}">
13
- {{ html_head }}
13
+ {{- html_head }}
14
14
  </head>
15
15
 
16
16
  <body>
@@ -36,7 +36,7 @@
36
36
  <th>hrs</th>
37
37
  <th>add time</th>
38
38
  </tr></thead><tbody>
39
- {% for k, pw, vp, pr, st, un, t0, t1 in rows %}
39
+ {%- for k, pw, vp, pr, st, un, t0, t1 in rows %}
40
40
  <tr>
41
41
  <td>
42
42
  <a href="{{ r }}{{ shr }}{{ k }}?qr">qr</a>
@@ -54,11 +54,11 @@
54
54
  <td>{{ "inf" if not t1 else "dead" if t1 < now else ((t1 - now) / 3600) | round(1) }}</td>
55
55
  <td></td>
56
56
  </tr>
57
- {% endfor %}
57
+ {%- endfor %}
58
58
  </tbody></table>
59
- {% if not rows %}
59
+ {%- if not rows %}
60
60
  (you don't have any active shares btw)
61
- {% endif %}
61
+ {%- endif %}
62
62
  </div>
63
63
  <a href="#" id="repl">π</a>
64
64
  <script>
Binary file
Binary file
copyparty/web/splash.html CHANGED
@@ -9,7 +9,7 @@
9
9
  <meta name="theme-color" content="#{{ tcolor }}">
10
10
  <link rel="stylesheet" media="screen" href="{{ r }}/.cpr/splash.css?_={{ ts }}">
11
11
  <link rel="stylesheet" media="screen" href="{{ r }}/.cpr/ui.css?_={{ ts }}">
12
- {{ html_head }}
12
+ {{- html_head }}
13
13
  </head>
14
14
 
15
15
  <body>
@@ -18,12 +18,16 @@
18
18
  <a id="a" href="{{ r }}/?h{{ re }}" class="af">refresh</a>
19
19
  <a id="v" href="{{ r }}/?hc" class="af">connect</a>
20
20
 
21
- {%- if this.uname == '*' %}
22
- <p id="b">howdy stranger &nbsp; <small>(you're not logged in)</small></p>
23
- {%- else %}
24
- <a id="c" href="{{ r }}/?pw=x" class="logout">logout</a>
25
- <p><span id="m">welcome back,</span> <strong id="un">{{ this.uname|e }}</strong></p>
26
- {%- endif %}
21
+ {%- if this.uname == '*' %}
22
+ <p id="b">howdy stranger &nbsp; <small>(you're not logged in)</small></p>
23
+ {%- else %}
24
+ {%- if this.args.idp_logout %}
25
+ <a id="c" href="{{ this.args.idp_logout }}" class="logout">logout</a>
26
+ {%- else %}
27
+ <a id="c" href="{{ r }}/?pw=x" class="logout">logout</a>
28
+ {%- endif %}
29
+ <p><span id="m">welcome back,</span> <strong id="un">{{ this.uname|e }}</strong></p>
30
+ {%- endif %}
27
31
  {%- endif %}
28
32
 
29
33
  {%- if msg %}
@@ -37,9 +41,9 @@
37
41
  <table class="vols">
38
42
  <thead><tr><th>%</th><th>speed</th><th>eta</th><th>idle</th><th>dir</th><th>file</th></tr></thead>
39
43
  <tbody>
40
- {% for u in ups %}
44
+ {%- for u in ups %}
41
45
  <tr><td>{{ u[0] }}</td><td>{{ u[1] }}</td><td>{{ u[2] }}</td><td>{{ u[3] }}</td><td><a href="{{ u[4] }}">{{ u[5]|e }}</a></td><td>{{ u[6]|e }}</td></tr>
42
- {% endfor %}
46
+ {%- endfor %}
43
47
  </tbody>
44
48
  </table>
45
49
  {%- endif %}
@@ -49,9 +53,9 @@
49
53
  <table class="vols">
50
54
  <thead><tr><th>%</th><th>sent</th><th>speed</th><th>eta</th><th>idle</th><th></th><th>dir</th><th>file</th></tr></thead>
51
55
  <tbody>
52
- {% for u in dls %}
56
+ {%- for u in dls %}
53
57
  <tr><td>{{ u[0] }}</td><td>{{ u[1] }}</td><td>{{ u[2] }}</td><td>{{ u[3] }}</td><td>{{ u[4] }}</td><td>{{ u[5] }}</td><td><a href="{{ u[6] }}">{{ u[7]|e }}</a></td><td>{{ u[8] }}</td></tr>
54
- {% endfor %}
58
+ {%- endfor %}
55
59
  </tbody>
56
60
  </table>
57
61
  {%- endif %}
@@ -70,11 +74,11 @@
70
74
  <table class="vols">
71
75
  <thead><tr><th>vol</th><th id="t">action</th><th>status</th></tr></thead>
72
76
  <tbody>
73
- {% for mp in avol %}
77
+ {%- for mp in avol %}
74
78
  {%- if mp in vstate and vstate[mp] %}
75
79
  <tr><td><a href="{{ r }}{{ mp }}{{ url_suf }}">{{ mp }}</a></td><td><a class="s" href="{{ r }}{{ mp }}?scan">rescan</a></td><td>{{ vstate[mp] }}</td></tr>
76
80
  {%- endif %}
77
- {% endfor %}
81
+ {%- endfor %}
78
82
  </tbody>
79
83
  </table>
80
84
  </td></tr></table>
@@ -87,18 +91,18 @@
87
91
  {%- if rvol %}
88
92
  <h1 id="f">you can browse:</h1>
89
93
  <ul>
90
- {% for mp in rvol %}
94
+ {%- for mp in rvol %}
91
95
  <li><a href="{{ r }}{{ mp }}{{ url_suf }}">{{ mp }}</a></li>
92
- {% endfor %}
96
+ {%- endfor %}
93
97
  </ul>
94
98
  {%- endif %}
95
99
 
96
100
  {%- if wvol %}
97
101
  <h1 id="g">you can upload to:</h1>
98
102
  <ul>
99
- {% for mp in wvol %}
103
+ {%- for mp in wvol %}
100
104
  <li><a href="{{ r }}{{ mp }}{{ url_suf }}">{{ mp }}</a></li>
101
- {% endfor %}
105
+ {%- endfor %}
102
106
  </ul>
103
107
  {%- endif %}
104
108
 
@@ -110,71 +114,83 @@
110
114
  <input type="password" id="lp" name="cppwd" placeholder=" password" />
111
115
  <input type="hidden" name="uhash" id="uhash" value="x" />
112
116
  <input type="submit" id="ls" value="Unlock" />
113
- {% if ahttps %}
117
+ {%- if ahttps %}
114
118
  <a id="w" href="{{ ahttps }}">switch to https</a>
115
- {% endif %}
119
+ {%- endif %}
116
120
  </form>
117
121
  </div>
118
122
  {%- else %}
119
123
  <h1 id="l">login for more:</h1>
120
124
  <div>
125
+ {%- if this.args.idp_login %}
126
+ <ul><li>
127
+ <a href="{{ this.args.idp_login | replace("{dst}",r+"/"+qvpath) }}">{{ this.args.idp_login_t }}</a>
128
+ {%- if this.args.ao_have_pw %}or alternatively:{%- endif %}
129
+ </li></ul>
130
+ {%- endif %}
131
+ {%- if this.args.ao_have_pw %}
121
132
  <form id="lf" method="post" enctype="multipart/form-data" action="{{ r }}/{{ qvpath }}">
122
133
  <input type="hidden" id="la" name="act" value="login" />
123
- {% if this.args.usernames %}
134
+ {%- if this.args.usernames %}
124
135
  <input type="text" id="lu" name="uname" placeholder=" username" size="12" />
125
136
  <input type="password" id="lp" name="cppwd" placeholder=" password" size="12" />
126
- {% else %}
137
+ {%- else %}
127
138
  <input type="password" id="lp" name="cppwd" placeholder=" password" />
128
- {% endif %}
139
+ {%- endif %}
129
140
  <input type="hidden" name="uhash" id="uhash" value="x" />
130
141
  <input type="submit" id="ls" value="login" />
131
- {% if chpw %}
142
+ {%- if chpw %}
132
143
  <a id="x" href="#">change password</a>
133
- {% endif %}
134
- {% if ahttps %}
144
+ {%- endif %}
145
+ {%- if ahttps %}
135
146
  <a id="w" href="{{ ahttps }}">switch to https</a>
136
- {% endif %}
147
+ {%- endif %}
137
148
  </form>
149
+ {%- endif %}
138
150
  </div>
139
151
  {%- endif %}
140
152
 
141
153
  <h1 id="cc">other stuff:</h1>
142
154
  <ul>
155
+ {%- if ahttps %}
156
+ <li><a id="wb" href="{{ ahttps }}">switch to https</a></li>
157
+ {%- endif %}
158
+
143
159
  {%- if this.uname in this.args.idp_adm_set %}
144
160
  <li><a id="ag" href="{{ r }}/?idp">view idp cache</a></li>
145
- {% endif %}
161
+ {%- endif %}
146
162
 
147
163
  {%- if this.uname != '*' and this.args.shr %}
148
164
  <li><a id="y" href="{{ r }}/?shares">edit shares</a></li>
149
- {% endif %}
165
+ {%- endif %}
150
166
 
151
- {% if k304 or k304vis %}
152
- {% if k304 %}
167
+ {%- if k304 or k304vis %}
168
+ {%- if k304 %}
153
169
  <li><a id="h" href="{{ r }}/?cc&setck=k304=n">disable k304</a> (currently enabled)
154
170
  {%- else %}
155
171
  <li><a id="i" href="{{ r }}/?cc&setck=k304=y" class="r">enable k304</a> (currently disabled)
156
- {% endif %}
172
+ {%- endif %}
157
173
  <blockquote id="j">enabling k304 will disconnect your client on every HTTP 304, which can prevent some buggy proxies from getting stuck (suddenly not loading pages), <em>but</em> it will also make things slower in general</blockquote></li>
158
- {% endif %}
174
+ {%- endif %}
159
175
 
160
- {% if no304 or no304vis %}
161
- {% if no304 %}
176
+ {%- if no304 or no304vis %}
177
+ {%- if no304 %}
162
178
  <li><a id="ab" href="{{ r }}/?cc&setck=no304=n">disable no304</a> (currently enabled)
163
179
  {%- else %}
164
180
  <li><a id="ac" href="{{ r }}/?cc&setck=no304=y" class="r">enable no304</a> (currently disabled)
165
- {% endif %}
181
+ {%- endif %}
166
182
  <blockquote id="ad">enabling no304 will disable all caching; try this if k304 wasn't enough. This will waste a huge amount of network traffic!</blockquote></li>
167
- {% endif %}
183
+ {%- endif %}
168
184
 
169
185
  <li><a id="af" href="{{ r }}/?ru">show recent uploads</a></li>
170
186
  <li><a id="k" href="{{ r }}/?reset" class="r" onclick="localStorage.clear();return true">reset client settings</a></li>
171
187
 
172
- {%- if this.uname != '*' %}
188
+ {%- if this.uname != '*' and not in_shr %}
173
189
  <li><form method="post" enctype="multipart/form-data">
174
190
  <input type="hidden" name="act" value="logout" />
175
191
  <input type="submit" id="lo" value="logout “{{ this.uname|e }}” everywhere" />
176
192
  </form></li>
177
- {% endif %}
193
+ {%- endif %}
178
194
  </ul>
179
195
 
180
196
  </div>
Binary file