Skip to content

Feature: A NO_INTERNET build flag to enable a “No internet connections allowed” build & code updated for this. #18575

Description

@SoraKagami

What feature or improvement do you think would benefit Files?

Reasoning:

Recently, the number of malware and software exploitation incidents has grown significantly.
Even if a project is safe today, a compromised dependency could still introduce risk in the future. Another possibility is that an exploit such as a buffer overflow in a file being accessed, could attempt to escape and use the Files application to gain internet access for malicious purposes.

Having a true “never allow connections to the internet” build, or at least an optional build configuration, would improve both safety and privacy for those who want it. This may be especially useful for developers who prefer or require offline build environments.

Such a build would imply that all internet connected services would be disabled. A NO_INTERNET build would likely involve disabling internet-connected services such as OneDrive support, auto updates, update checks and online license checks. Unless implemented as an installable add-on.

Requirements

#if, #else, #endif added to all code areas where internet calls exist, with alternative code-paths added for a local LAN-only version for allowing at most, local SMB access when the NO_INTERNET build flag is enabled.

Functions to support sanitizing file/LAN paths will be added for compiles with NO_INTERNET enabled.

Files Version

4.1.1

Windows Version

10.0.19045.4651

Comments

I want to contribute fixes and features to Files, but given the current risks in June 2026, my builds and testing have to happen offline using pre-compiled, pre-scanned NuGet packages etc. Everything gets downloaded first, scanned on VirusTotal and then, if deemed safe enough, copied into a VM dedicated to building projects.

I have made a private local branch of v4.1.1 along with a custom Satori, and stripped out all of the networking code for an initial test. After that, I managed to apply a few performance-related updates and bug fixes.

Unfortunately, my codebase was so heavily modified that it is nearly impossible to issue pull requests to the current Files repository without making the pull requests difficult to review.

If a NO_INTERNET build flag, along with the changes to support it is something the maintainers here would be interested in or willing to allow, I can try to recreate the changes using the current main branch as the starting point, then integrate conditional compilation symbols (#if, #else, #endif) for the networking-related code. And after that start porting over the performance & bug fixes to create clean pull requests.

I do wish I had done this (NO_INTERNET build flag solution) from the start but back then it was just supposed to be a quick “Can I do this?” test that grew and eventually led to downstream fixes and optimizations being built on top of it.

The alternative would be to provide the modified files as attachments and describe the changes manually, but this may be harder for the maintainers to review. I would prefer to avoid that approach if possible & instead work toward clean pull requests.

Thanks to the devs behind the Files app!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature request.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions