Skip to content

Commit

Permalink
tweak format (#5295)
Browse files Browse the repository at this point in the history
* tweak format

* auto commit generated command files

* auto commit generated command files

* push components

* edit migration page (#5303)

---------

Co-authored-by: import this <[email protected]>
  • Loading branch information
mfahampshire and serinko authored Dec 23, 2024
1 parent 41fb17a commit 4d3d60b
Show file tree
Hide file tree
Showing 29 changed files with 177 additions and 147 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Migrate your `nym-gateway` to `nym-node --mode entry-gateway` or `--mode exit-ga
<Steps>
###### 1. Move relevant info from `config.toml`
```sh
./nym-node migrate --config-file ~/.nym/gateways/<GATEWAY_ID>/config/config.toml gateway
./nym-node migrate --config-file ~/.nym/gateways/<ID>/config/config.toml gateway
```

###### 2. Initialise with new `nym-node` config chosing one of the options below:
Expand All @@ -19,5 +19,6 @@ Migrate your `nym-gateway` to `nym-node --mode entry-gateway` or `--mode exit-ga
```sh
./nym-node run --id <ID> --mode exit-gateway --public-ips "$(curl -4 https://ifconfig.me)" --hostname <HOSTNAME> --http-bind-address 0.0.0.0:8080 --mixnet-bind-address 0.0.0.0:1789 --location <LOCATION> --accept-operator-terms-and-conditions --wireguard-enabled true
```

</Steps>
</>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Monday, December 9th 2024, 19:43:12 UTC
Monday, December 23rd 2024, 11:36:26 UTC
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
```sh

Binary Name: nym-api
Build Timestamp: 2024-12-18T10:26:40.905460408Z
Build Version: 1.1.46
Commit SHA: 62045d76b32265f6a5e6358ab7aebbc827d47dcd
Commit Date: 2024-11-26T11:53:05.000000000+01:00
Build Timestamp: 2024-12-18T17:33:13.184930493Z
Build Version: 1.1.47
Commit SHA: b628a5f8148f74c646915292c8b6dc0a46202a27
Commit Date: 2024-12-13T11:49:27.000000000+01:00
Commit Branch: master
rustc Version: 1.84.0-nightly
rustc Channel: nightly
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
```sh

Binary Name: nym-client
Build Timestamp: 2024-12-18T10:26:40.905460408Z
Build Version: 1.1.44
Commit SHA: 62045d76b32265f6a5e6358ab7aebbc827d47dcd
Commit Date: 2024-11-26T11:53:05.000000000+01:00
Build Timestamp: 2024-12-18T17:33:13.184930493Z
Build Version: 1.1.45
Commit SHA: b628a5f8148f74c646915292c8b6dc0a46202a27
Commit Date: 2024-12-13T11:49:27.000000000+01:00
Commit Branch: master
rustc Version: 1.84.0-nightly
rustc Channel: nightly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ const completion: Fig.Spec = {
],
},
},
{
name: "--stats-reporting-address",
description: "Sets the address to report statistics",
hidden: true,
isRepeatable: true,
args: {
name: "stats_reporting_address",
isOptional: true,
},
},
{
name: "--disable-socket",
description: "Whether to not start the websocket",
Expand Down Expand Up @@ -201,6 +211,16 @@ const completion: Fig.Spec = {
],
},
},
{
name: "--stats-reporting-address",
description: "Sets the address to report statistics",
hidden: true,
isRepeatable: true,
args: {
name: "stats_reporting_address",
isOptional: true,
},
},
{
name: "--disable-socket",
description: "Whether to not start the websocket",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```sh
[2m2024-11-06T12:18:46.723546Z[0m [31mERROR[0m [2mnym-node/src/config/upgrade_helpers.rs[0m[2m:[0m[2m17[0m[2m:[0m Failed to finish upgrade - failed to load config file using path '/home/m/.nym/nym-nodes/default-nym-node/config/config.toml'. detailed message: No such file or directory (os error 2)
[2m2024-12-18T17:36:27.004764Z[0m [31mERROR[0m [2mnym-node/src/config/upgrade_helpers.rs[0m[2m:[0m[2m19[0m[2m:[0m Failed to finish upgrade - failed to load config file using path '/home/m/.nym/nym-nodes/default-nym-node/config/config.toml'. detailed message: No such file or directory (os error 2)
```
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
```sh

Binary Name: nym-node
Build Timestamp: 2024-12-18T10:26:40.905460408Z
Build Version: 1.1.11
Commit SHA: 62045d76b32265f6a5e6358ab7aebbc827d47dcd
Commit Date: 2024-11-26T11:53:05.000000000+01:00
Build Timestamp: 2024-12-18T17:33:13.184930493Z
Build Version: 1.2.0
Commit SHA: b628a5f8148f74c646915292c8b6dc0a46202a27
Commit Date: 2024-12-13T11:49:27.000000000+01:00
Commit Branch: master
rustc Version: 1.84.0-nightly
rustc Channel: nightly
Expand Down
Original file line number Diff line number Diff line change
@@ -1,72 +1,8 @@
```sh
Attempt to migrate an existing mixnode or gateway into a nym-node

Usage: nym-node migrate [OPTIONS] <--id <ID>|--config-file <CONFIG_FILE>> <NODE_TYPE>

Arguments:
<NODE_TYPE> Type of node (mixnode or gateway) to migrate into a nym-node [possible values: mixnode, gateway]
Usage: nym-node migrate

Options:
--id <ID>
Id of the node that's going to get migrated
--config-file <CONFIG_FILE>
Path to a configuration file of the node that's going to get migrated
--preserve-id
Specify whether to preserve id of the imported node
--public-ips <PUBLIC_IPS>
Comma separated list of public ip addresses that will be announced to the nym-api and subsequently to the clients. In nearly all circumstances, it's going to be identical to the address you're going to use for bonding [env: NYMNODE_PUBLIC_IPS=]
--hostname <HOSTNAME>
Optional hostname associated with this gateway that will be announced to the nym-api and subsequently to the clients [env: NYMNODE_HOSTNAME=]
--location <LOCATION>
Optional **physical** location of this node's server. Either full country name (e.g. 'Poland'), two-letter alpha2 (e.g. 'PL'), three-letter alpha3 (e.g. 'POL') or three-digit numeric-3 (e.g. '616') can be provided [env: NYMNODE_LOCATION=]
--http-bind-address <HTTP_BIND_ADDRESS>
Socket address this node will use for binding its http API. default: `0.0.0.0:8080` [env: NYMNODE_HTTP_BIND_ADDRESS=]
--landing-page-assets-path <LANDING_PAGE_ASSETS_PATH>
Path to assets directory of custom landing page of this node [env: NYMNODE_HTTP_LANDING_ASSETS=]
--http-access-token <HTTP_ACCESS_TOKEN>
An optional bearer token for accessing certain http endpoints. Currently only used for prometheus metrics [env: NYMNODE_HTTP_ACCESS_TOKEN=]
--expose-system-info <EXPOSE_SYSTEM_INFO>
Specify whether basic system information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_INFO=] [possible values: true, false]
--expose-system-hardware <EXPOSE_SYSTEM_HARDWARE>
Specify whether basic system hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_HARDWARE=] [possible values: true, false]
--expose-crypto-hardware <EXPOSE_CRYPTO_HARDWARE>
Specify whether detailed system crypto hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_CRYPTO_HARDWARE=] [possible values: true, false]
--mixnet-bind-address <MIXNET_BIND_ADDRESS>
Address this node will bind to for listening for mixnet packets default: `0.0.0.0:1789` [env: NYMNODE_MIXNET_BIND_ADDRESS=]
--mixnet-announce-port <MIXNET_ANNOUNCE_PORT>
If applicable, custom port announced in the self-described API that other clients and nodes will use. Useful when the node is behind a proxy [env: NYMNODE_MIXNET_ANNOUNCE_PORT=]
--nym-api-urls <NYM_API_URLS>
Addresses to nym APIs from which the node gets the view of the network [env: NYMNODE_NYM_APIS=]
--nyxd-urls <NYXD_URLS>
Addresses to nyxd chain endpoint which the node will use for chain interactions [env: NYMNODE_NYXD=]
--wireguard-enabled <WIREGUARD_ENABLED>
Specifies whether the wireguard service is enabled on this node [env: NYMNODE_WG_ENABLED=] [possible values: true, false]
--wireguard-bind-address <WIREGUARD_BIND_ADDRESS>
Socket address this node will use for binding its wireguard interface. default: `0.0.0.0:51822` [env: NYMNODE_WG_BIND_ADDRESS=]
--wireguard-private-ip <WIREGUARD_PRIVATE_IP>
Private IP address of the wireguard gateway. default: `10.1.0.1` [env: NYMNODE_WG_IP=]
--wireguard-announced-port <WIREGUARD_ANNOUNCED_PORT>
Port announced to external clients wishing to connect to the wireguard interface. Useful in the instances where the node is behind a proxy [env: NYMNODE_WG_ANNOUNCED_PORT=]
--wireguard-private-network-prefix <WIREGUARD_PRIVATE_NETWORK_PREFIX>
The prefix denoting the maximum number of the clients that can be connected via Wireguard. The maximum value for IPv4 is 32 and for IPv6 is 128 [env: NYMNODE_WG_PRIVATE_NETWORK_PREFIX=]
--verloc-bind-address <VERLOC_BIND_ADDRESS>
Socket address this node will use for binding its verloc API. default: `0.0.0.0:1790` [env: NYMNODE_VERLOC_BIND_ADDRESS=]
--verloc-announce-port <VERLOC_ANNOUNCE_PORT>
If applicable, custom port announced in the self-described API that other clients and nodes will use. Useful when the node is behind a proxy [env: NYMNODE_VERLOC_ANNOUNCE_PORT=]
--entry-bind-address <ENTRY_BIND_ADDRESS>
Socket address this node will use for binding its client websocket API. default: `0.0.0.0:9000` [env: NYMNODE_ENTRY_BIND_ADDRESS=]
--announce-ws-port <ANNOUNCE_WS_PORT>
Custom announced port for listening for websocket client traffic. If unspecified, the value from the `bind_address` will be used instead [env: NYMNODE_ENTRY_ANNOUNCE_WS_PORT=]
--announce-wss-port <ANNOUNCE_WSS_PORT>
If applicable, announced port for listening for secure websocket client traffic [env: NYMNODE_ENTRY_ANNOUNCE_WSS_PORT=]
--enforce-zk-nyms <ENFORCE_ZK_NYMS>
Indicates whether this gateway is accepting only coconut credentials for accessing the mixnet or if it also accepts non-paying clients [env: NYMNODE_ENFORCE_ZK_NYMS=] [possible values: true, false]
--mnemonic <MNEMONIC>
Custom cosmos wallet mnemonic used for zk-nym redemption. If no value is provided, a fresh mnemonic is going to be generated [env: NYMNODE_MNEMONIC=]
--upstream-exit-policy-url <UPSTREAM_EXIT_POLICY_URL>
Specifies the url for an upstream source of the exit policy used by this node [env: NYMNODE_UPSTREAM_EXIT_POLICY=]
--open-proxy <OPEN_PROXY>
Specifies whether this exit node should run in 'open-proxy' mode and thus would attempt to resolve **ANY** request it receives [env: NYMNODE_OPEN_PROXY=] [possible values: true, false]
-h, --help
Print help
-h, --help Print help
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```sh
** Attention **
This binary DOES NOT' support migrating from older mixnode/gateway binaries anymore
please use an older version instead before attempting to use this binary again.
```
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```sh
[2m2024-11-06T12:18:46.742880Z[0m [31mERROR[0m [2mnym-node/src/config/upgrade_helpers.rs[0m[2m:[0m[2m17[0m[2m:[0m Failed to finish upgrade - failed to load config file using path '/home/m/.nym/nym-nodes/default-nym-node/config/config.toml'. detailed message: No such file or directory (os error 2)
[2m2024-12-18T17:36:27.019221Z[0m [31mERROR[0m [2mnym-node/src/config/upgrade_helpers.rs[0m[2m:[0m[2m19[0m[2m:[0m Failed to finish upgrade - failed to load config file using path '/home/m/.nym/nym-nodes/default-nym-node/config/config.toml'. detailed message: No such file or directory (os error 2)
```
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ Options:
Specifies whether the wireguard service is enabled on this node [env: NYMNODE_WG_ENABLED=] [possible values: true, false]
--wireguard-bind-address <WIREGUARD_BIND_ADDRESS>
Socket address this node will use for binding its wireguard interface. default: `0.0.0.0:51822` [env: NYMNODE_WG_BIND_ADDRESS=]
--wireguard-private-ip <WIREGUARD_PRIVATE_IP>
Private IP address of the wireguard gateway. default: `10.1.0.1` [env: NYMNODE_WG_IP=]
--wireguard-announced-port <WIREGUARD_ANNOUNCED_PORT>
Port announced to external clients wishing to connect to the wireguard interface. Useful in the instances where the node is behind a proxy [env: NYMNODE_WG_ANNOUNCED_PORT=]
--wireguard-private-network-prefix <WIREGUARD_PRIVATE_NETWORK_PREFIX>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
```sh

Binary Name: nym-socks5-client
Build Timestamp: 2024-12-18T10:26:40.905460408Z
Build Version: 1.1.44
Commit SHA: 62045d76b32265f6a5e6358ab7aebbc827d47dcd
Commit Date: 2024-11-26T11:53:05.000000000+01:00
Build Timestamp: 2024-12-18T17:33:13.184930493Z
Build Version: 1.1.45
Commit SHA: b628a5f8148f74c646915292c8b6dc0a46202a27
Commit Date: 2024-12-13T11:49:27.000000000+01:00
Commit Branch: master
rustc Version: 1.84.0-nightly
rustc Channel: nightly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ const completion: Fig.Spec = {
],
},
},
{
name: "--stats-reporting-address",
description: "Sets the address to report statistics",
hidden: true,
isRepeatable: true,
args: {
name: "stats_reporting_address",
isOptional: true,
},
},
{
name: "--provider",
description: "Address of the socks5 provider to send messages to",
Expand Down Expand Up @@ -209,6 +219,16 @@ const completion: Fig.Spec = {
],
},
},
{
name: "--stats-reporting-address",
description: "Sets the address to report statistics",
hidden: true,
isRepeatable: true,
args: {
name: "stats_reporting_address",
isOptional: true,
},
},
{
name: "--use-anonymous-replies",
description: "Specifies whether this client is going to use an anonymous sender tag for communication with the service provider. While this is going to hide its actual address information, it will make the actual communication slower and consume nearly double the bandwidth as it will require sending reply SURBs",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
```sh

Binary Name: nymvisor
Build Timestamp: 2024-12-18T10:26:40.905460408Z
Build Version: 0.1.9
Commit SHA: 62045d76b32265f6a5e6358ab7aebbc827d47dcd
Commit Date: 2024-11-26T11:53:05.000000000+01:00
Build Timestamp: 2024-12-18T17:33:13.184930493Z
Build Version: 0.1.10
Commit SHA: b628a5f8148f74c646915292c8b6dc0a46202a27
Commit Date: 2024-12-13T11:49:27.000000000+01:00
Commit Branch: master
rustc Version: 1.84.0-nightly
rustc Channel: nightly
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
7 changes: 0 additions & 7 deletions documentation/docs/pages/developers/clients/socks5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

> This client can also be utilised via the [Rust SDK](../rust).
## What is this client for?
Many existing applications are able to use either the SOCKS4, SOCKS4A, or SOCKS5 proxy protocols. If you want to send such an application's traffic through the mixnet, you can use the `nym-socks5-client` to bounce network traffic through the Nym network, like this:

```mermaid
Expand Down Expand Up @@ -49,9 +48,3 @@ The `nym-socks5-client` allows you to do the following from your local machine:
* Send the Sphinx packets through the Nym Network. Packets are shuffled and mixed as they transit the mixnet.

The `nym-node` then reassembles the original TCP stream using the packets' sequence numbers, and make the intended request. It will then chop up the response into Sphinx packets and send them back through the mixnet to your `nym-socks5-client`. The application will then receive its data, without even noticing that it wasn't talking to a "normal" SOCKS5 proxy!

## Download or compile socks5 client

If you are using OSX or a Debian-based operating system, you can download the `nym-socks5-client` binary from our [Github releases page](https://github.com/nymtech/nym/releases).

If you are using a different operating system, or want to build from source, simply use `cargo build --release` from the root of the Nym monorepo.
28 changes: 24 additions & 4 deletions documentation/docs/pages/developers/clients/socks5/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ Example output:
```sh
Binary Name: nym-socks5-client
Build Timestamp: 2024-12-18T10:26:40.905460408Z
Build Version: 1.1.44
Commit SHA: 62045d76b32265f6a5e6358ab7aebbc827d47dcd
Commit Date: 2024-11-26T11:53:05.000000000+01:00
Build Timestamp: 2024-12-18T17:33:13.184930493Z
Build Version: 1.1.45
Commit SHA: b628a5f8148f74c646915292c8b6dc0a46202a27
Commit Date: 2024-12-13T11:49:27.000000000+01:00
Commit Branch: master
rustc Version: 1.84.0-nightly
rustc Channel: nightly
Expand Down Expand Up @@ -256,6 +256,16 @@ const completion: Fig.Spec = {
],
},
},
{
name: "--stats-reporting-address",
description: "Sets the address to report statistics",
hidden: true,
isRepeatable: true,
args: {
name: "stats_reporting_address",
isOptional: true,
},
},
{
name: "--provider",
description: "Address of the socks5 provider to send messages to",
Expand Down Expand Up @@ -397,6 +407,16 @@ const completion: Fig.Spec = {
],
},
},
{
name: "--stats-reporting-address",
description: "Sets the address to report statistics",
hidden: true,
isRepeatable: true,
args: {
name: "stats_reporting_address",
isOptional: true,
},
},
{
name: "--use-anonymous-replies",
description: "Specifies whether this client is going to use an anonymous sender tag for communication with the service provider. While this is going to hide its actual address information, it will make the actual communication slower and consume nearly double the bandwidth as it will require sending reply SURBs",
Expand Down
6 changes: 4 additions & 2 deletions documentation/docs/pages/developers/clients/socks5/config.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Configuring your client
# Config

## Default Config Directories
When you initalise a client instance, a configuration directory will be generated and stored in `$HOME_DIR/.nym/socks5-clients/<client-name>/`.

```
Expand All @@ -21,7 +23,7 @@ The `config.toml` file contains client configuration options, while the two `pem

The generated files contain the client name, public/private keypairs, and gateway address. The name `<client_id>` in the example above is just a local identifier so that you can name your clients.

#### Configuring your client for Docker
## Configuring your client for Docker
By default, the native client listens to host `127.0.0.1`. However this can be an issue if you wish to run a client in a Dockerized environment, where it can be convenenient to listen on a different host such as `0.0.0.0`.

You can set this via the `--host` flag during either the `init` or `run` commands.
Expand Down
6 changes: 6 additions & 0 deletions documentation/docs/pages/developers/clients/socks5/setup.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Client setup

## Download or compile socks5 client

If you are using OSX or a Debian-based operating system, you can download the `nym-socks5-client` binary from our [Github releases page](https://github.com/nymtech/nym/releases).

If you are using a different operating system, or want to build from source, simply use `cargo build --release` from the root of the Nym monorepo.
## Viewing command help

You can check that your binaries are properly compiled with:
Expand Down
Loading

0 comments on commit 4d3d60b

Please sign in to comment.