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

redame: add build instructions, and add commands godebug stub #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
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
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,61 @@

`ncprop279` acts as a bridge between Tor Prop279 clients and Namecoin; it can be used for Namecoin naming in Tor. Unlike `dns-prop279`, it does not use the DNS wire protocol. This reduces attack surface and binary size, but prevents delegation from Namecoin to DNS via NS/DS records.

## Building

### Prerequisites:

Ensure you have the Go tools installed.

### Option A: Using Go get commands without Go modules

Should work on any platform with Bash; only Go 1.15-1.16.x; will not work on Go 1.17+:

1. Ensure you have the `GOPATH` environment variable set. (For those not
familar with Go, setting it to the path to an empty directory will suffice.
The directory will be filled with build files.)

2. To disable Go modules:

export GO111MODULE=off

3. To retrieve the source code automatically:

go get -d -t -u github.com/namecoin/ncprop279/...

4. To perform a necessary build step that parses ReactOS property list and applies compressed public key patch:

go generate github.com/namecoin/certinject/...
go generate github.com/namecoin/x509-compressed/...

6. To build the ncprop279 binary at `$GOPATH/bin/ncprop279`.

go get -t -u github.com/namecoin/ncprop279/...

### Option B: Using Go mod commands with Go modules

Should work on any platform with Bash; Go 1.15+:

1. Clone [certinject](https://github.com/namecoin/certinject), [x509-compressed](https://github.com/namecoin/x509-compressed), and ncdns to sibling directories.

2. Install `certinject` according to its instructions.

3. Install `x509-compressed` according to its "with Go modules" instructions.

4. Setup Go modules in the ncprop279 directory:

go mod init github.com/namecoin/ncdns
go mod edit -replace github.com/coreos/go-systemd=github.com/coreos/go-systemd/v22@latest -replace github.com/namecoin/certinject=../certinject -replace github.com/namecoin/x509-compressed=../x509-compressed -replace github.com/namecoin/x509-compressed/godebug=../x509-compressed/godebug
go mod tidy

5. Compile the ncprop279 binary in the ncprop279 directory:

go build ./..

6. Optionally, install into `$GOPATH` at `$GOPATH/bin/ncprop279`:

go install ./...

## Usage

You need [StemNS](https://github.com/namecoin/StemNS) or [TorNS](https://github.com/meejah/TorNS) in order to use `ncprop279`. You also need a Namecoin lookup client such as Namecoin Core, ConsensusJ-Namecoin, or Electrum-NMC. Your StemNS/TorNS services configuration might look like this:
Expand Down