immortalwrt / homeproxy

The modern ImmortalWrt proxy platform for ARM64/AMD64 (powered by sing-box)
GNU General Public License v2.0
532 stars 159 forks source link

The checkbox 'Disable DNS cache' is invalid when it's checked. #150

Closed thisIsIan-W closed 3 months ago

thisIsIan-W commented 3 months ago

Steps to reveal this issue:

Client Settings -> Routing Settings -> Routing mode, choose ' Custom routing', then, DNS Settings -> check the checkbox 'Disable DNS cache', then Save and Apply.

Now, even if the cache file is manually deleted, it'll still be automatically regenerated by homeproxy in "/etc/homeproxy/cache.db".

The file that may need to be modified is 'generate_client.uc,' and the code that may need to be changed is:


/* Experimental start */
if (routing_mode === 'custom') {
    config.experimental = {
        cache_file: {
            enabled: true,
            path: HP_DIR + '/cache.db',
            store_rdrc: (cache_file_store_rdrc === '1') || null,
            rdrc_timeout: cache_file_rdrc_timeout
        }
    };

    /* ...omitted... */

}

/* Experimental end */
muink commented 3 months ago

cache.db is not used for caching DNS but for RDRC, ruleset and clash dashboard