WebDav problem

myc818

New Member
YetiShare User
Dec 24, 2020
28
3
3
Hello, I purchased the WebDav plugin today. After installation, it functions normally but the download speed is very slow
My account is a premium user, I don’t use CDN, can you help me?

Script version 5.20
 

Attachments

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
Hi,

Are you seeing faster speeds when downloading directly with the script?

Also, are you using xaccelredirect, xsendfile or none? (the advanced downloads option on the file server admin settings)

Thanks,
Adam.
 

myc818

New Member
YetiShare User
Dec 24, 2020
28
3
3
Hi,

Are you seeing faster speeds when downloading directly with the script?

Also, are you using xaccelredirect, xsendfile or none? (the advanced downloads option on the file server admin settings)

Thanks,
Adam.
Direct download speed is very fast, yes I use X-Accel-Redirect And it is available

But WebDav upload speed is fast

My nginx configuration file

# pass the PHP scripts to FastCGI server listening on unix:/tmp/php-cgi.sock
location ~ \.php$ {
if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#include fastcgi_params;
include fastcgi.conf;
}
location / {
if (!-e $request_filename) {
rewrite ^/(.*) /index.php?_page_url=$1 last;
}
}

location ~ \.php$ {
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
}

location /files/ {
root /data2/cloud_disk;
internal;
}

# these locations would be hidden by .htaccess normally
location /logs/ {
deny all;
}

location ~* "/\.(htaccess|htpasswd)$" {
deny all;
return 404;
}
}
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
I would merge the following with your other php location block:

location ~ \.php$ {
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
}


I don't see what else would cause downloads to go slow over webdav. I'll double check the code...
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
Are you using external storage servers or is it all on the same server?
 

myc818

New Member
YetiShare User
Dec 24, 2020
28
3
3
I would merge the following with your other php location block:

location ~ \.php$ {
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;
}


I don't see what else would cause downloads to go slow over webdav. I'll double check the code...
I used the demo website to do a test, and the download speed is very fast. Is it only me who has this problem?
In addition, demo website plugin V10, mine is V9, does it matter?
 

Attachments

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
I used the demo website to do a test, and the download speed is very fast. Is it only me who has this problem?
It's the first time it's been reported.

In addition, demo website plugin V10, mine is V9, does it matter?
There was no changes around this in the latest release.

Looking at the code, it returns a stream to the final download url, so should download like any other token download in the script.

return fopen($downloadUrl, 'rb', false, stream_context_create($contextOptions));
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
Ok, that's the only real difference with our demo site, it has no external storage servers.

I'm not sure what else could cause it, I'll have another look online.
 

myc818

New Member
YetiShare User
Dec 24, 2020
28
3
3
Ok, that's the only real difference with our demo site, it has no external storage servers.

I'm not sure what else could cause it, I'll have another look online.
I know the reason, because Lock Download Tokens To IP is turned on
But I have to enable this function, if it doesn’t, the server will crash
In order to increase the download speed, users will use software to spoof the IP address to obtain more download_token
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
There may be a way round that, although it'll require some code tweaks.

How did you find out that was the issue, did it work when you enabled the option?
 

myc818

New Member
YetiShare User
Dec 24, 2020
28
3
3
There may be a way round that, although it'll require some code tweaks.

How did you find out that was the issue, did it work when you enabled the option?
I reinstalled the test script on the server and compared all the options and found.
Yes, the download speed is so slow when this feature is turned on, you can try
 
  • Like
Reactions: adam

myc818

New Member
YetiShare User
Dec 24, 2020
28
3
3
There may be a way round that, although it'll require some code tweaks.

How did you find out that was the issue, did it work when you enabled the option?
Hello, this problem is not fixed in version 5.3
downloads are locked down by IP address WebDav download function is invalid
 

Attachments