Filename derived configuration

Allows a default configuration to be downloaded, with the URL found in the filename of the program itself. With this strategy, a mainstream version of Dull can be used.

The ConfigURL filename standard

Dull uses the following filename format in order to embed the configurl into the filename of the program.

{ignored}_configurl_{base64-modified}.exe

The text before _configurl_ is ignored. The text match for _configurl_ is case-insensitive. The filename .exe extension is ignored. The base64-modified encoded segment contains the URL text when decoded.

The standard 3 non-alphanumeric characters { + / = } are not valid in most file system filenames, so a modified base64 is used that substitutes these characters for valid alternatives. Consideration was made for POSIX compliant filenames and also Windows. The following exchanges are made:

Standard base64 character

Substitute character for valid filename

+

-

/

.

=

_

The fullstop character might make the URL appear to have a multi-segment extension. Only the last dotted segment is removed as per https://docs.microsoft.com/en-us/dotnet/api/system.io.path.getfilenamewithoutextension?view=netframework-4.5.2‚Äč

An example

The filename:

dull_configurl_aHR0cHM6Ly9kdWxsYXBwLmNvbS9mYWtlLXVybC9zdGFuZGFyZC1yZW1vdGUuY29uZmlnLmpzb24_.exe

The base64-modified:

aHR0cHM6Ly9kdWxsYXBwLmNvbS9mYWtlLXVybC9zdGFuZGFyZC1yZW1vdGUuY29uZmlnLmpzb24_

The base64-standard:

aHR0cHM6Ly9kdWxsYXBwLmNvbS9mYWtlLXVybC9zdGFuZGFyZC1yZW1vdGUuY29uZmlnLmpzb24=

The decoded url:

https://dullapp.com/fake-url/standard-remote.config.json