Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newnode 2.1.5 (new formula) #162683

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions Formula/n/newnode-helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
class NewnodeHelper < Formula
desc "Web proxy that uses a distributed p2p network to circumvent censorship"
homepage "https://www.newnode.com/newnode-vpn"
url "https://github.com/clostra/newnode.git",
tag: "2.1.4", revision: "c42a04ded55cfdff857878f4d9234950e530bb00"
license ""
theoden8 marked this conversation as resolved.
Show resolved Hide resolved

depends_on xcode: ["9.3", :build]
depends_on "automake"
depends_on "coreutils"
depends_on "libtool"
depends_on "mbedtls@2"
theoden8 marked this conversation as resolved.
Show resolved Hide resolved
depends_on "wget"
theoden8 marked this conversation as resolved.
Show resolved Hide resolved

def install
system "git", "clone", "--recurse-submodules", "https://github.com/clostra/newnode.git"
theoden8 marked this conversation as resolved.
Show resolved Hide resolved
system "cd newnode && ./build.sh"
bin.install "newnode/client" => "newnode-helper"
path = (var/"newnode-helper")
path.mkpath
path.chmod 0775
theoden8 marked this conversation as resolved.
Show resolved Hide resolved
theoden8 marked this conversation as resolved.
Show resolved Hide resolved
end

service do
run [opt_bin/"newnode-helper", "-p", "8006", "-v"]
keep_alive true
working_dir var/"newnode-helper"
log_path var/"log/newnode-helper.log"
error_log_path var/"log/newnode-helper-error.log"
end

test do
# use wget to try to download a file via the newnode's HTTP proxy
# if that works, newnode vpn is working
ENV["https_proxy"] = "http://localhost:8006"
sleep 5
system "wget", "https://brew.sh"
end
end
Loading