{
    "version": "0.4.8.10-13.0.9",
    "description": "Enables anonymous communication over the onion network (expert mode).",
    "homepage": "https://www.torproject.org",
    "license": "BSD-3-Clause",
    "notes": [
        "You will need to configure Tor before using, as it does not come pre-configured.",
        "See https://tb-manual.torproject.org/ for details."
    ],
    "architecture": {
        "64bit": {
            "url": "https://archive.torproject.org/tor-package-archive/torbrowser/13.0.9/tor-expert-bundle-windows-x86_64-13.0.9.tar.gz",
            "hash": "5cf48f44431eeb4949290318e87e8fec2a2499d5e81d5b33f1b8f8e1dbc134c5"
        },
        "32bit": {
            "url": "https://archive.torproject.org/tor-package-archive/torbrowser/13.0.9/tor-expert-bundle-windows-i686-13.0.9.tar.gz",
            "hash": "5f4a361a5d8c87f6934fd96a0244d280ab0e832304d7e04aaf4f525726c32c62"
        }
    },
    "pre_install": [
        "$current_dir = if (get_config NO_JUNCTIONS) { $dir } else { \"$(appdir $app $global)\\current\" }",
        "$content = @(",
        "    \"DataDirectory `\"$current_dir\\data`\"\"",
        "    \"GeoIPFile `\"$current_dir\\data\\geoip`\"\"",
        "    \"GeoIPv6File `\"$current_dir\\data\\geoip6`\"\"",
        ")",
        "if (!(Test-Path \"$persist_dir\\torrc\")) {",
        "    Add-Content \"$dir\\torrc\" $content.Replace('\\', '/') -Encoding ASCII -Force",
        "}"
    ],
    "bin": [
        [
            "tor\\tor.exe",
            "tor",
            "-f \"$dir\\torrc\""
        ],
        "tor\\tor-gencert.exe"
    ],
    "persist": [
        "data",
        "torrc"
    ],
    "checkver": {
        "url": "https://www.torproject.org/download/tor/",
        "regex": "windows-i686-[\\d.]+.tar.gz\">(?<browser>[\\d.]+) \\(tor (?<tor>[\\d.]+)\\)",
        "replace": "${tor}-${browser}"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://archive.torproject.org/tor-package-archive/torbrowser/$matchBrowser/tor-expert-bundle-windows-x86_64-$matchBrowser.tar.gz"
            },
            "32bit": {
                "url": "https://archive.torproject.org/tor-package-archive/torbrowser/$matchBrowser/tor-expert-bundle-windows-i686-$matchBrowser.tar.gz"
            }
        },
        "hash": {
            "url": "$baseurl/sha256sums-signed-build.txt"
        }
    }
}
