Repository: AdguardTeam/AdGuardHome

Issue #2675: Error: control/filtering/set_rules | Failed to read request body
Created: 2021-02-13T01:55:05Z
Issue Details
Hello everyone,
I have installed AdGuard Home on 21 August 2020 on my router Turris Omnia. I have been using it  without any issues whatsoever since then. The filtering or blocking worked (and still works) as expected. So, I created my own set of rules in a tab Filters - Custom filtering rules which worked great until yesterday (12.02.2021). When I tried to add an exception and unblock a domain, I received an error message:
Error: control/filtering/set_rules | Failed to read request body: attempted to read more than 65536 bytes | 400
The error prevents me from editing my Custom filtering rules. I cannot add, remove or change anything. When I click on the Apply button after making some change, it returns an error message described as above. The blocking or allowing a certain domain (from my Custom filtering rules) is, however, still fully functional.
The error message appeared right after the new update (v0.105.0). There was no such error before this update. I realize my file could be quite large (907 KB in .txt) and has approximately more than 41 500 lines, but everything worked before the update. The router does not have full storage, it has more than 3 GB of space remaining. The router itself is not overloaded and does not report any issues. I edit the list only via Copy and Paste from a plain .txt file stored in my computer using web interface of AdGuard Home from web browser. Rebooting does not help.

Version of AdGuard Home server:

Version: v0.105.0


How did you install AdGuard Home:

I have followed a guide on OpenWrt forum


How did you setup DNS configuration:

I have installed AdGuard Home and configured it as a DNS server on my main router, Turris Omnia.


If it's a router or IoT, please write device model:

Turris Omnia 1 GB No Wi-Fi - The full documentation of the device is here: https://wiki.turris.cz/doc/_media/omnia/omnia_datasheet_1gb_rgb.pdf


CPU architecture:

Marvell Armada 385, dual-core 1.6 GHz, ARMv7


Operating system and version:

Firmware Version: OpenWrt omnia 15.05 r47055 / LuCI fd63d5cc7dfc69c640b741dceb80555141a80670 branch (git-19.318.61483-fd63d5c)
Kernel Version: 4.4.199-a890a5a94ebb621f8f1720c24d12fef1-1



Expected Behavior
I would like to know if this issue could be fixed - So I could edit my custom filters again, if possible.
Actual Behavior
The current error prevents me from editing my Custom filtering rules. I cannot remove a line with a domain or add another one (for both rules - block and unblock). However, the Custom filtering rules are still working - they still allow or block particular domain according to their rules.
Screenshots


Additional Information
Unfortunately, I am not a programmer or an IT specialist so I cannot help you much more, without additional help from you. I would be very grateful if someone would have read this message and will try to help me or fix the issue in the next build. Thank you very much for your time and attention.

Duplicate issue #5565: Error: control/dns_config | decoding request: attempted to read more than 65536 bytes | 400
Created: 2023-03-05T11:23:57Z
Prerequisites


 I have checked the Wiki and Discussions and found no answer


 I have searched other issues and found no duplicates


 I want to report a bug and not ask a question


Operating system type
Linux, Other (please mention the version in the description)
CPU architecture
x86
Installation
GitHub releases or script from README
Setup
On one machine
AdGuard Home version
v0.107.25
Description
What did you do?
Due to the special network environment in China, I want to set up upstream DNS server rules. I found a list of commonly used websites in China and wanted AdGuard Home to use the Chinese domestic upstream DNS server when encountering them, and use the foreign DNS upstream server for all websites other than that. This will maximize DNS query speed while preventing DNS hijacking by the government. (Yes, foreign DNS upstream servers do not have nodes in China, so latency is high when accessing them)
So I pasted the rule to make AdGuard Home refer to Chinese domestic upstream DNS server when processing a list of Chinese domains.
Expected result
AdGuard Home save the rules successfully.
Actual result
An error popped up with a message: Error: control/dns_config | decoding request: attempted to read more than 65536 bytes | 400
Screenshots (if applicable)

Additional information
This issue is very similar to issue #2675. However, that issue is about configuring filter rules, while this one is about configuring upstream DNS server. Since that issue has been fixed, I believe this one can also be done easily using the same fix method.
If you want to reproduce this issue, you can add this sample upstream DNS server rule to Settings->DNS settings->Upstream DNS servers. Sample download link:https://cloud.hzao.top/s/jKUW

Closing comment (2023-03-06T09:23:31Z): Hello. Large upstream configurations should be set using an upstream file and the dns.upstream_dns_file configuration option. Our documentation explicitly mentions the China use-case.

I am very sorry for not carefully reading the documentation. I just found this similar to #2675 so I assumed it's something that needs to be fixed. Thank you for your help and patience.