cask "mitmproxy" do arch arm: "arm64", intel: "x86_64" version "11.0.0" sha256 arm: "fad75d039aec51fa81d9cdaeea2695cee2a437c0447dcc1b5862942b8dc73943", intel: "4d9d4781f2737610bd87f593ad92ec7a0330b9a0c2afac495e2ee0b7f8a68bed" url "https://downloads.mitmproxy.org/#{version}/mitmproxy-#{version}-macos-#{arch}.tar.gz" name "mitmproxy" desc "Intercept, modify, replay, save HTTP/S traffic" homepage "https://mitmproxy.org/" # The downloads page (https://mitmproxy.org/downloads/) uses an XML file to # dynamically generate the list of version directories on load. livecheck do url "https://downloads.mitmproxy.org/list" strategy :xml do |xml| xml.get_elements("//Prefix").map do |item| item.text&.strip&.delete_suffix("/") end end end binary "mitmproxy.app/Contents/MacOS/mitmproxy" binary "mitmproxy.app/Contents/MacOS/mitmdump" binary "mitmproxy.app/Contents/MacOS/mitmweb" zap trash: "~/.mitmproxy" end