diff --git a/copyparty/__main__.py b/copyparty/__main__.py index 8fcccd3f..d11ab733 100755 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -697,7 +697,7 @@ def add_zeroconf(ap): def add_zc_mdns(ap): - ap2 = ap.add_argument_group("Zeroconf-mDNS options:") + ap2 = ap.add_argument_group("Zeroconf-mDNS options") ap2.add_argument("--zm", action="store_true", help="announce the enabled protocols over mDNS (multicast DNS-SD) -- compatible with KDE, gnome, macOS, ...") ap2.add_argument("--zm-on", metavar="NETS", type=u, default="", help="enable zeroconf ONLY on the comma-separated list of subnets and/or interface names/indexes") ap2.add_argument("--zm-off", metavar="NETS", type=u, default="", help="disable zeroconf on the comma-separated list of subnets and/or interface names/indexes") @@ -716,7 +716,7 @@ def add_zc_mdns(ap): def add_zc_ssdp(ap): - ap2 = ap.add_argument_group("Zeroconf-SSDP options:") + ap2 = ap.add_argument_group("Zeroconf-SSDP options") ap2.add_argument("--zs", action="store_true", help="announce the enabled protocols over SSDP -- compatible with Windows") ap2.add_argument("--zs-on", metavar="NETS", type=u, default="", help="enable zeroconf ONLY on the comma-separated list of subnets and/or interface names/indexes") ap2.add_argument("--zs-off", metavar="NETS", type=u, default="", help="disable zeroconf on the comma-separated list of subnets and/or interface names/indexes") diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 02b2f4ea..049f1e95 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -1789,7 +1789,7 @@ class HttpCli(object): if x[0] != "Set-Cookie" or "cppwd=" not in x[1] ] - dst = "/" + dst = self.args.SRS if self.vpath: dst += quotep(self.vpath) @@ -2614,6 +2614,7 @@ class HttpCli(object): if self.args.rclone_mdns or not self.args.zm else self.conn.hsrv.nm.map(self.ip) or host ) + vp = (self.uparam["hc"] or "").lstrip("/") html = self.j2s( "svcs", args=self.args, @@ -2621,7 +2622,8 @@ class HttpCli(object): s="s" if self.is_https else "", rip=rip, ep=ep, - vp=(self.uparam["hc"] or "").lstrip("/"), + vp=vp, + rvp=vjoin(self.args.R, vp), host=host, hport=hport, aname=aname, diff --git a/copyparty/svchub.py b/copyparty/svchub.py index bc0aaf4a..fe01b607 100644 --- a/copyparty/svchub.py +++ b/copyparty/svchub.py @@ -310,6 +310,7 @@ class SvcHub(object): al.R = R = R.strip("/") al.SR = "/" + R if R else "" al.RS = R + "/" if R else "" + al.SRS = "/" + R + "/" if R else "/" return True diff --git a/copyparty/web/splash.html b/copyparty/web/splash.html index 21319711..ea64e178 100644 --- a/copyparty/web/splash.html +++ b/copyparty/web/splash.html @@ -46,7 +46,7 @@
{% for mp in avol %} {%- if mp in vstate and vstate[mp] %} -or choose your OS for cooler alternatives:
if you can, install winfsp+rclone and then paste this in cmd:
rclone config create {{ aname }}-dav webdav url=http{{ s }}://{{ rip }}{{ hport }} vendor=other{% if accs %} user=k pass={{ pw }}{% endif %} - rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-dav:{{ vp }} W: + rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-dav:{{ rvp }} W:{% if s %}
note: if you are on LAN (or just dont have valid certificates), add --no-check-certificate
to the mount command
---
if you want to use the native WebDAV client in windows instead (slow and buggy), first run webdav-cfg.bat to remove the 47 MiB filesize limit (also fixes latency and password login), then connect:
- net use w: http{{ s }}://{{ ep }}/{{ vp }}{% if accs %} k /user:{{ pw }}{% endif %} + net use w: http{{ s }}://{{ ep }}/{{ rvp }}{% if accs %} k /user:{{ pw }}{% endif %}
yum install davfs2 - {% if accs %}printf '%s\n' {{ pw }} k | {% endif %}mount -t davfs -ouid=1000 http{{ s }}://{{ ep }}/{{ vp }} mp + {% if accs %}printf '%s\n' {{ pw }} k | {% endif %}mount -t davfs -ouid=1000 http{{ s }}://{{ ep }}/{{ rvp }} mp
or you can use rclone instead, which is much slower but doesn't require root:
rclone config create {{ aname }}-dav webdav url=http{{ s }}://{{ rip }}{{ hport }} vendor=other{% if accs %} user=k pass={{ pw }}{% endif %} - rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-dav:{{ vp }} mp + rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-dav:{{ rvp }} mp{% if s %}
note: if you are on LAN (or just dont have valid certificates), add --no-check-certificate
to the mount command
---
{%- if accs %} - echo {{ pw }} | gio mount dav{{ s }}://k@{{ ep }}/{{ vp }} + echo {{ pw }} | gio mount dav{{ s }}://k@{{ ep }}/{{ rvp }} {%- else %} - gio mount -a dav{{ s }}://{{ ep }}/{{ vp }} + gio mount -a dav{{ s }}://{{ ep }}/{{ rvp }} {%- endif %}
- osascript -e ' mount volume "http{{ s }}://k:{{ pw }}@{{ ep }}/{{ vp }}" ' + osascript -e ' mount volume "http{{ s }}://k:{{ pw }}@{{ ep }}/{{ rvp }}" '
or you can open up a Finder, press command-K and paste this instead:
- http{{ s }}://k:{{ pw }}@{{ ep }}/{{ vp }} + http{{ s }}://k:{{ pw }}@{{ ep }}/{{ rvp }}{% if s %} @@ -108,26 +108,26 @@
if you can, install winfsp+rclone and then paste this in cmd:
rclone config create {{ aname }}-ftp ftp host={{ rip }} port={{ args.ftp or args.ftps }} pass=k user={% if accs %}{{ pw }}{% else %}anonymous{% endif %} tls={{ "false" if args.ftp else "true" }} - rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-ftp:{{ vp }} W: + rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-ftp:{{ rvp }} W:
if you want to use the native FTP client in windows instead (please dont), press win+R
and run this command:
- explorer {{ "ftp" if args.ftp else "ftps" }}://{% if accs %}{{ pw }}:k@{% endif %}{{ host }}:{{ args.ftp or args.ftps }}/{{ vp }} + explorer {{ "ftp" if args.ftp else "ftps" }}://{% if accs %}{{ pw }}:k@{% endif %}{{ host }}:{{ args.ftp or args.ftps }}/{{ rvp }}
rclone config create {{ aname }}-ftp ftp host={{ rip }} port={{ args.ftp or args.ftps }} pass=k user={% if accs %}{{ pw }}{% else %}anonymous{% endif %} tls={{ "false" if args.ftp else "true" }} - rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-ftp:{{ vp }} mp + rclone mount --vfs-cache-mode writes --dir-cache-time 5s {{ aname }}-ftp:{{ rvp }} mp
emergency alternative (gnome/gui-only):
{%- if accs %} - echo {{ pw }} | gio mount ftp{{ "" if args.ftp else "s" }}://k@{{ host }}:{{ args.ftp or args.ftps }}/{{ vp }} + echo {{ pw }} | gio mount ftp{{ "" if args.ftp else "s" }}://k@{{ host }}:{{ args.ftp or args.ftps }}/{{ rvp }} {%- else %} - gio mount -a ftp{{ "" if args.ftp else "s" }}://{{ host }}:{{ args.ftp or args.ftps }}/{{ vp }} + gio mount -a ftp{{ "" if args.ftp else "s" }}://{{ host }}:{{ args.ftp or args.ftps }}/{{ rvp }} {%- endif %}
note: FTP is read-only on macos; please use WebDAV instead
- open {{ "ftp" if args.ftp else "ftps" }}://{% if accs %}k:{{ pw }}@{% else %}anonymous:@{% endif %}{{ host }}:{{ args.ftp or args.ftps }}/{{ vp }} + open {{ "ftp" if args.ftp else "ftps" }}://{% if accs %}k:{{ pw }}@{% else %}anonymous:@{% endif %}{{ host }}:{{ args.ftp or args.ftps }}/{{ rvp }}
- partyfuse.py{% if accs %} -a {{ pw }}{% endif %} http{{ s }}://{{ ep }}/{{ vp }} W:mp + partyfuse.py{% if accs %} -a {{ pw }}{% endif %} http{{ s }}://{{ ep }}/{{ rvp }} W:mp{% if s %}
note: if you are on LAN (or just dont have valid certificates), add -td