-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
/
Copy pathlightproxy.rb
28 lines (24 loc) · 945 Bytes
/
lightproxy.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
cask "lightproxy" do
version "1.1.41"
sha256 "e71f606717712eabb06e1cf0c643302f8d52d339d227367a16ca519883d4bd00"
url "https://github.com/alibaba/lightproxy/releases/download/v#{version}/LightProxy-#{version}.dmg",
verified: "github.com/alibaba/lightproxy/"
name "LightProxy"
desc "Proxy & Debug tools based on whistle with Chrome Devtools UI"
homepage "https://alibaba.github.io/lightproxy/"
app "LightProxy.app"
uninstall_postflight do
stdout, * = system_command "/usr/bin/security",
args: ["find-certificate", "-a", "-c", "LightProxy", "-Z"],
sudo: true
hashes = stdout.lines.grep(/^SHA-256 hash:/) { |l| l.split(":").second.strip }
hashes.each do |h|
system_command "/usr/bin/security",
args: ["delete-certificate", "-Z", h],
sudo: true
end
end
caveats do
requires_rosetta
end
end