vpn-slice 0.13 (new formula)

Closes #51825.

Signed-off-by: Rui Chen <chenrui333@gmail.com>
master
henrik242 2020-03-17 19:28:48 +01:00 committed by Rui Chen
parent ae25b5b778
commit 79cb98062a
1 changed files with 27 additions and 0 deletions

27
Formula/vpn-slice.rb Normal file
View File

@ -0,0 +1,27 @@
class VpnSlice < Formula
include Language::Python::Virtualenv
desc "Vpnc-script replacement for easy and secure split-tunnel VPN setup"
homepage "https://github.com/dlenski/vpn-slice"
url "https://github.com/dlenski/vpn-slice/archive/v0.13.tar.gz"
sha256 "08f62c688b8e5f0a1f643593bd6d29c38ab92e3714a5108bfde762a3cdaf33df"
head "https://github.com/dlenski/vpn-slice.git"
depends_on "python@3.8"
resource "setproctitle" do
url "https://files.pythonhosted.org/packages/5a/0d/dc0d2234aacba6cf1a729964383e3452c52096dc695581248b548786f2b3/setproctitle-1.1.10.tar.gz"
sha256 "6283b7a58477dd8478fbb9e76defb37968ee4ba47b05ec1c053cb39638bd7398"
end
def install
virtualenv_install_with_resources
end
test do
# vpn-slice needs root/sudo credentials
output = `#{bin}/vpn-slice 192.168.0.0/24 2>&1`
assert_match "Cannot read\/write \/etc\/hosts", output
assert_equal 1, $CHILD_STATUS.exitstatus
end
end