Skip to content

[feat] Allow usage of Wix extensions (FirewallException etc) #4546

@betamos

Description

@betamos

Describe the problem

On Windows, apps are typically intercepted for a user prompt when they accept incoming network connections through TCP or UDP.

I have an app targeted toward non-technical users which does not work without this. My app's sidecar is the one that does the networking. I would like a way to suppress these warnings for the intended use.

Turns out that it's supported and fairly common to add firewall rules during install through Wix directives.

First, you need to reference the schema:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension">

Then you need to add your rules to something.. I nested it within a <File> tag for my sidecar binary, but there may be other options:

<File ...>
    <fire:FirewallException Id="ArbitraryId1" Name="App Name (TCP)" Profile="all" Protocol="tcp" Scope="any" IgnoreFailure="yes" />
    <fire:FirewallException Id="ArbitraryId2" Name="App Name (UDP)" Profile="all" Protocol="udp" Scope="any" IgnoreFailure="yes" />
</File>

Finally, both candle and light needs a flag to turn on the extension:

candle.exe -ext WixFirewallExtension [...]
light.exe -ext WixFirewallExtension [...]

Describe the solution you'd like

Unclear.. It doesn't seem realistic that tauri maintains a complex structure of different options in Wix, plist etc.
It may be smart to offer flexibility, since both firewall rules and my rules in particular are quite specific use cases.

  1. For the light & candle flags, as well as the schema parts:
    a. Perhaps it's possible to simply enable all extensions by default? Or
    b. Offer a way to add wix extensions through the WixConfig object.
  2. For the actual directives:
    a. Perhaps WixConfig.fragmentPaths (or similar) already works today? It would need a way to reference template variables (the sidecar binary in my case). I don't know how to do that.
    b. Override the wsx template entirely (works today, but requires more maintenance)

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions