Skip to content

Commit

Permalink
gost@3 3.0.0-nightly.20231129
Browse files Browse the repository at this point in the history
  • Loading branch information
moonfruit committed Nov 30, 2023
1 parent 0264cfb commit 88b7d16
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
class GostAT3 < Formula
desc "Go simple tunnel"
homepage "https://gost.run/"
url "https://github.com/go-gost/gost/archive/refs/tags/v3.0.0-nightly.20231129.tar.gz"
version "3.0.0-nightly.20231129"
sha256 "7db5094a00d465e2a440f392753d135028d53ad0ed0dd888932d04b2671754fc"
license "MIT"
head "https://github.com/go-gost/gost.git", branch: "master"

livecheck do
url :stable
end

keg_only :versioned_formula

depends_on "go" => :build

def install
system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"gost"), "./cmd/gost"
prefix.install "README_en.md"
end

test do
bind_address = "127.0.0.1:#{free_port}"
fork do
exec "#{bin}/gost -L #{bind_address}"
end
sleep 2
output = shell_output("curl -I -x #{bind_address} https://github.com")
assert_match %r{HTTP/\d+(?:\.\d+)? 200}, output
assert_match(/Server: GitHub.com/i, output)
end
end

0 comments on commit 88b7d16

Please sign in to comment.