- specifies the public certificate (`ca-cert.pem`) to embed in the client
Both nexush and nexus-cli clients are built for multiple OSes (Linux, Windows, Mac) and architectures (amd64, i386 and arm64).
The line below builds nexush for all supported OSes and architectures, where the public certificate (`ca-cert.pem`) is located in `$HOME/nexus-server/certs` and the nexus' server ip is 10.0.2.15 and it listens to port 1077:
```sh
make xbuild_client BIN=nexush CERT=$HOME/nexus-server/certs SERVER=10.0.2.15:1077
make xbuild_client BIN=nexush CERT=$HOME/nexus-server/certs/ca-cert.pem SERVER=10.0.2.15:1077
```
Below, we build nexus-cli for all supported OSes and architectures, without an embedded certificate, and the server's ip is 127.0.0.1 and it listens to port 1077:
...
...
@@ -230,16 +223,21 @@ build/
└── nexush.exe
```
Although the public certificate is embedded in the client, it is possible to override it at execution time through the `NEXUS_CERT` environment variable. For example:
For this specific case, only `SERVER` and `CERT` environment variables are used, in a similar way to what is described in [Building nexush and nexus-cli](#building-nexush-and-nexus-cli).
This is a specific case that builds a client only for Linux/amd64 platofrm. The required environment variables are the same as in [Building nexush and nexus-cli](#building-nexush-and-nexus-cli).
To only build nexush for Linux/amd64:
```sh
make build_nexush CERT=$HOME/nexus-server/certs SERVER=10.0.2.15:1077
make build_nexush CERT=$HOME/nexus-server/certs/ca-cert.pem SERVER=10.0.2.15:1077
```
If you're only interested in building nexus-cli for Linux/amd64 uses the `build_nexus-cli` target instead.
Similarly, if you're only interested in building nexus-cli for Linux/amd64 uses the `build_nexus-cli` target instead.
## Specifically running nexush for Linux/amd64
...
...
@@ -270,7 +268,7 @@ Similarly to nexush and nexus-cli, nexus-exam requires `SERVER` and `CERT` envir
Here is an example of how to build nexus-exam:
```sh
make build_nexus-exam CERT=$HOME/nexus-server/certs SERVER=10.0.2.15:1077 EXAM_USER=exam@nexus.org EXAM_PWD='3k0%tjslk$g42'
make build_nexus-exam CERT=$HOME/nexus-server/certs/ca-cert.pem SERVER=10.0.2.15:1077 EXAM_USER=exam@nexus.org EXAM_PWD='3k0%tjslk$g42'