|
本帖最后由 God_is_a_girl 于 2024-3-10 20:54 编辑
之前有个帖子有说明这个如何绕过限制,他是直接修改jquery.fileupload.js文件,将maxChunkSize: undefined, 改成maxChunkSize: 100000000 ,
但是会造成一个问题:
Nextcloud的完整性检查失败,从而引发错误消息,比如提到文件hash对不上。下一次更新可能把这个配置刷掉。
还有个问题我不知道是哪里配置导致的问题,可能是我的问题,上传的速度变成了几百kb/s
当然,这个也可以无视这个报错的信息,确实能够绕过cf限制;
有兴趣的可以试试下面办法:
修改nextcloud目录下的config/config.php,
把下面内容添加进去:
- 'chunk_size' => 94371840, // 切片文件大小,限制为90M,可以用来绕过cloudflare 100M文件大小限制
复制代码
我的这个完整的配置如下:
- <?php
- $CONFIG = array (
- 'trusted_proxies' => [
- '173.245.48.0/20', '103.21.244.0/22', '103.22.200.0/22', '103.31.4.0/22',
- '141.101.64.0/18', '108.162.192.0/18', '190.93.240.0/20', '188.114.96.0/20',
- '197.234.240.0/22', '198.41.128.0/17', '162.158.0.0/15', '104.16.0.0/13',
- '104.24.0.0/14', '172.64.0.0/13', '131.0.72.0/22', '2400:cb00::/32',
- '2606:4700::/32', '2803:f800::/32', '2405:b500::/32', '2405:8100::/32',
- '2a06:98c0::/29', '2c0f:f248::/32'
- ],
- 'forwarded_for_headers' => ['HTTP_X_FORWARDED_FOR'],
- 'instanceid' => '保密',
- 'passwordsalt' => '保密',
- 'secret' => '保密l',
- 'trusted_domains' =>
- array (
- 0 => '域名保密',
- ),
- 'datadirectory' => '/var/www/html/nextcloud/data',
- 'dbtype' => '保密',
- 'version' => '28.0.3.2',
- 'overwrite.cli.url' => '域名保密',
- 'dbname' => '保密',
- 'dbhost' => 'localhost',
- 'dbport' => '',
- 'dbtableprefix' => 'oc_',
- 'mysql.utf8mb4' => true,
- 'dbuser' => '保密',
- 'dbpassword' => '保密',
- 'installed' => true,
- 'backgroundjobs_mode' => 'cron',
- 'loglevel' => 0,
- 'maintenance' => false,
- 'maintenance_window_start' => 1,
- 'twofactor_enforced' => 'true',
- 'twofactor_enforced_groups' =>
- array (
- 0 => 'admin',
- ),
- 'twofactor_enforced_excluded_groups' =>
- array (
- ),
- 'chunk_size' => 94371840, // 切片文件大小,限制为90M,可以用来绕过cloudflare 100M文件大小限制
- );
复制代码
上面的配置或许和你的有差异,你只要把最后一行添加进去就好了 |
|