Skip to content

Commit 44cf9b0

Browse files
mfahampshiremfahampshire
and
mfahampshire
authored
Max/dev portal update (#4696)
* updated tutorials with archive + stub * removed out of date faq pages * added binary build instructions section * removed clients from docs * added clients to devportal * moved nym-vs-others to docs from devportal * removed ood quickstart stuff * tweaked integration options page * summary changes for new structure * moved sdk to devportal * removed sdk from docs * changed summary file for new structure * added intro client overview page * added wallet gif * fixed now broken links * removed old comm pages * added references to newer apps (oreowallet + zcash demo) * updated darkfi irc socks5 * fixed broken link --------- Co-authored-by: mfahampshire <[email protected]>
1 parent 39e2473 commit 44cf9b0

File tree

88 files changed

+244
-1921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+244
-1921
lines changed

documentation/dev-portal/src/SUMMARY.md

Lines changed: 38 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,59 @@
11
#
2-
# Summary
3-
42
- [Introduction](introduction.md)
3+
- [Clients Overview - Start Here!](clients-overview.md)
4+
5+
# SDKs
6+
- [Rust SDK](sdk/rust/rust.md)
7+
- [Message Types](sdk/rust/message-types.md)
8+
- [Message Helpers](sdk/rust/message-helpers.md)
9+
- [Troubleshooting](sdk/rust/troubleshooting.md)
10+
- [Examples](sdk/rust/examples.md)
11+
- [Simple Send](sdk/rust/examples/simple.md)
12+
- [Create and Store Keys](sdk/rust/examples/keys.md)
13+
- [Manual Storage](sdk/rust/examples/storage.md)
14+
- [Anonymous Replies](sdk/rust/examples/surbs.md)
15+
- [Use Custom Network Topology](sdk/rust/examples/custom-network.md)
16+
- [Socks Proxy](sdk/rust/examples/socks.md)
17+
- [Split Send and Receive](sdk/rust/examples/split-send.md)
18+
- [Testnet Bandwidth Cred](sdk/rust/examples/credential.md)
19+
- [Example Cargo file](sdk/rust/examples/cargo.md)
20+
- [Typescript SDK](sdk/typescript.md)
21+
22+
# Binaries
23+
- [Pre-built Binaries](binaries/pre-built-binaries.md)
24+
- [Building from Source](binaries/building-nym.md)
25+
26+
# Standalone Clients
27+
- [Websocket Client](clients/websocket-client.md)
28+
- [Setup & Run](clients/websocket/setup.md)
29+
- [Configuration](clients/websocket/config.md)
30+
- [Using Your Client](clients/websocket/usage.md)
31+
- [Examples](clients/websocket/examples.md)
32+
- [Socks5 Client](clients/socks5-client.md)
33+
- [Setup & Run](clients/socks5/setup.md)
34+
- [Using Your Client](clients/socks5/usage.md)
35+
- [Webassembly Client](clients/webassembly-client.md)
536

6-
# Infrastructure
7-
8-
- [What is Nym?](infrastructure/nym.md)
9-
- [Nym vs Other Systems](infrastructure/nym-vs-others.md)
10-
- [Node Types](infrastructure/node-types.md)
11-
12-
# Quickstart
13-
14-
- [Overview](quickstart/overview.md)
15-
- [Chat demo (webapp)](quickstart/chat-demo.md)
16-
- [Coconut Credential Playground (webapp)](quickstart/cred-playground.md)
17-
- [SOCKS Proxy (CLI)](quickstart/socks-proxy.md)
18-
19-
# User Manuals
20-
21-
- [NymVPN alpha](nymvpn/intro.md)
22-
- [CLI](nymvpn/cli.md)
23-
24-
<!-- OUTDATED STUFF:
25-
- [NymConnect X Monero](tutorials/monero.md)
26-
- [NymConnect X Matrix](tutorials/matrix.md)
27-
- [NymConnect X Telegram](tutorials/telegram.md)
28-
- [NymConnect X Electrum](tutorials/electrum.md)
29-
- [NymConnect X Firo wallet](tutorials/firo.md)
30-
-->
37+
# Tutorials
38+
- [Stub: Updates Coming Soon!](./tutorials/coming-soon.md)
3139

3240
# Code Examples
33-
3441
- [Custom Service Providers](examples/custom-services.md)
3542
- [Apps Using Network Requesters](examples/using-nrs.md)
3643
- [Browser only](examples/browser-only.md)
3744
- [Monorepo examples](examples/monorepo-examples.md)
3845

3946
# Integrations
40-
4147
- [Integration Options](integrations/integration-options.md)
4248
[//]: # (- [Mixnet Integration]&#40;integrations/mixnet-integration.md&#41;)
4349
- [Payment Integration](integrations/payment-integration.md)
4450

45-
# Tutorials
46-
47-
- [Rust SDK](tutorials/rust-sdk.md)
48-
- [Blockchain Service pt1](tutorials/cosmos-service/intro.md)
49-
- [Tutorial Overview](tutorials/cosmos-service/overview.md)
50-
- [Preparing Your Environment](tutorials/cosmos-service/preparing-env.md)
51-
- [Preparing Your Lib](tutorials/cosmos-service/lib.md)
52-
- [Preparing Your Client](tutorials/cosmos-service/client.md)
53-
- [Preparing Your Client pt2](tutorials/cosmos-service/client-src.md)
54-
- [Preparing Your Service](tutorials/cosmos-service/service.md)
55-
- [Preparing Your Service pt2](tutorials/cosmos-service/service-src.md)
56-
- [Querying the Chain](tutorials/cosmos-service/querying.md)
57-
58-
- [Typescript](tutorials/typescript.md)
59-
- [Simple Service Provider](tutorials/simple-service-provider/simple-service-provider.md)
60-
- [Tutorial Overview](tutorials/simple-service-provider/overview.md)
61-
- [Preparing Your User Client Environment](tutorials/simple-service-provider/preparating-env.md)
62-
- [Building Your User Client](tutorials/simple-service-provider/user-client.md)
63-
- [Preparing Your Service Provider Environment](tutorials/simple-service-provider/preparating-env2.md)
64-
- [Building Your Service Provider](tutorials/simple-service-provider/service-provider.md)
65-
- [Sending a Message Through the Mixnet](tutorials/simple-service-provider/sending-message.md)
66-
67-
[//]: # (TODO make generic )
68-
[//]: # (# Shipyard Builders Hackathon 2023 )
69-
[//]: # (- [General Info & Resources]&#40;shipyard/general.md&#41;)
70-
[//]: # (- [Hackathon Challenges]&#40;shipyard/challenges-overview.md&#41;)
71-
[//]: # (- [A Note on Infrastructure]&#40;shipyard/infra.md&#41;)
72-
[//]: # (- [Submission Guidelines]&#40;shipyard/guidelines.md&#41;)
73-
74-
<!-- Commenting out as a lot of the stuff is deprecated, can be purged as a part of the large overhaul
75-
# Events
76-
77-
- [Web3Privacy Now](./events/web3-privacy.md)
78-
- [HCPP23-serinko](./events/hcpp23-serinko.md)
79-
- [HCPP23-max](./events/hcpp23-max.md)
80-
-->
81-
8251
# FAQ
83-
- [General](faq/general-faq.md)
8452
- [Integrations](faq/integrations-faq.md)
85-
- [Rewards & Token](faq/rewards-faq.md)
86-
87-
# Community Resources
8853

89-
- [Nym DevRel AMAs](community-resources/ama.md)
90-
- [Community Applications and Guides](community-resources/community-applications-and-guides.md)
91-
- [Change Service Grantee Information](info-request.md)
54+
# User Manuals
55+
- [NymVPN alpha](nymvpn/intro.md)
56+
- [CLI](nymvpn/cli.md)
9257

9358
---
9459
# Misc.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Building from Source
2+
3+
> Nym runs on Mac OS X, Linux, and Windows. All nodes **except the Desktop Wallet and NymConnect** on Windows should be considered experimental - it works fine if you're an app developer but isn't recommended for running nodes.
4+
5+
## Building Nym
6+
Nym has two main codebases:
7+
8+
- the [Nym platform](https://github.com/nymtech/nym), written in Rust. This contains all of our code _except_ for the validators.
9+
- the [Nym validators](https://github.com/nymtech/nyxd), written in Go.
10+
11+
> This page details how to build the main Nym platform code.
12+
13+
## Prerequisites
14+
- Debian/Ubuntu: `pkg-config`, `build-essential`, `libssl-dev`, `curl`, `jq`, `git`
15+
16+
```
17+
apt install pkg-config build-essential libssl-dev curl jq git
18+
```
19+
20+
- Arch/Manjaro: `base-devel`
21+
22+
```
23+
pacman -S base-devel
24+
```
25+
26+
- Mac OS X: `pkg-config` , `brew`, `openss1`, `protobuf`, `curl`, `git`
27+
Running the following the script installs Homebrew and the above dependencies:
28+
29+
```
30+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
31+
```
32+
33+
- `Rust & cargo >= {{minimum_rust_version}}`
34+
35+
We recommend using the [Rust shell script installer](https://www.rust-lang.org/tools/install). Installing cargo from your package manager (e.g. `apt`) is not recommended as the packaged versions are usually too old.
36+
37+
If you really don't want to use the shell script installer, the [Rust installation docs](https://forge.rust-lang.org/infra/other-installation-methods.html) contain instructions for many platforms.
38+
39+
## Download and build Nym binaries
40+
The following commands will compile binaries into the `nym/target/release` directory:
41+
42+
```sh
43+
rustup update
44+
git clone https://github.com/nymtech/nym.git
45+
cd nym
46+
47+
git reset --hard # in case you made any changes on your branch
48+
git pull # in case you've checked it out before
49+
50+
git checkout master # master branch has the latest release version: `develop` will most likely be incompatible with deployed public networks
51+
52+
cargo build --release # build your binaries with **mainnet** configuration
53+
```
54+
55+
Quite a bit of stuff gets built. The key working parts for devs are the Client binaries and the CLI tool:
56+
57+
* [websocket client](../clients/websocket-client.md): `nym-client`
58+
* [socks5 client](../clients/socks5-client.md): `nym-socks5-client`
59+
* [nym-cli tool](https://nymtech.net/docs/tools/nym-cli.md): `nym-cli`
60+
61+
> You cannot build from GitHub's .zip or .tar.gz archive files on the releases page - the Nym build scripts automatically include the current git commit hash in the built binary during compilation, so the build will fail if you use the archive code (which isn't a Git repository). Check the code out from github using `git clone` instead.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Pre-built Binaries
2+
3+
The [Github releases page](https://github.com/nymtech/nym/releases) has pre-built binaries which should work on Ubuntu 20.04 and other Debian-based systems, but at this stage cannot be guaranteed to work everywhere.
4+
5+
If the pre-built binaries don't work or are unavailable for your system, you will need to build the platform yourself.
6+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Clients Overview
2+
3+
A large proportion of the Nym mixnet's functionality is implemented client-side.
4+
5+
Clients perform the following actions on behalf of users:
6+
7+
* determine network topology - what mixnodes exist, what their keys are, etc.
8+
* register with a gateway
9+
* authenticate with a gateway
10+
* receive and decrypt messages from the gateway
11+
* create layer-encrypted Sphinx packets
12+
* send Sphinx packets with real messages
13+
* send Sphinx packet _cover traffic_ when no real messages are being sent
14+
* retransmit un-acknowledged packet sends - if a client sends 100 packets to a gateway, but only receives an acknowledgement ('ack') for 95 of them, it will resend those 5 packets to the gateway again, to make sure that all packets are received.
15+
16+
> As a developer, you'll want to use a Nym client to send your application network traffic through the mixnet; whether that is an RPC call, a TCP connection request, or treating it like a UDP pipe, you need to send whatever bytes your app needs to send through it. However, unlike (e.g.) a TCP Socket, Nym client communication is message-based, so you cannot (yet) simply plug-and-play using the mixnet as a seamless drop-in replacement. We are currently working on stream-like abstractions for ease of integration with the Rust SDK.
17+
18+
## Types of Nym clients
19+
At present, there are three Nym clients:
20+
21+
- the websocket (native) client
22+
- the SOCKS5 client
23+
- the wasm (webassembly) client
24+
25+
You need to choose which one you want incorporate into your app. Which one you use will depend largely on your preferred programming style and the purpose of your app.
26+
27+
### The websocket client
28+
Your first option is the native websocket client (`nym-client`). This is a compiled program that can run on Linux, Mac OS X, and Windows machines. It can be run as a persistent process on a desktop or server machine. You can connect to it with **any language that supports websockets**.
29+
30+
> Rust developers can import websocket client functionality into their code via the [Rust SDK](sdk/rust/rust.md).
31+
32+
### The webassembly client
33+
If you're working in JavaScript or Typescript in the browser, or building an [edge computing](https://en.wikipedia.org/wiki/Edge_computing) app, you'll likely want to choose the webassembly client.
34+
35+
It's packaged and [available on the npm registry](https://www.npmjs.com/package/@nymproject/nym-client-wasm), so you can `npm install` it into your JavaScript or TypeScript application.
36+
37+
> The webassembly client is most easily used via the [Typescript SDK](sdk/typescript.md). Typescript developers who wish to send API requests through the mixnet can can also check the [`mixfetch`]() package.
38+
39+
### The SOCKS5 client
40+
The `nym-socks5-client` is useful for allowing existing applications to use the Nym mixnet without any code changes. All that's necessary is that they can use one of the SOCKS5, SOCKS4a, or SOCKS4 proxy protocols (which many applications can - crypto wallets, browsers, chat applications etc).
41+
42+
When used as a standalone client, it's less flexible as a way of writing custom applications than the other clients, but able to be used to proxy application traffic through the mixnet without having to make any code changes.
43+
44+
> Rust developers can import socks client functionality into their code via the [Rust SDK](sdk/rust/rust.md).
45+
46+
## Commonalities between clients
47+
All Nym client packages present basically the same capabilities to the privacy application developer. They need to run as a persistent process in order to stay connected and ready to receive any incoming messages from their gateway nodes. They register and authenticate to gateways, and encrypt Sphinx packets.
48+
49+

documentation/docs/src/clients/overview.md renamed to documentation/dev-portal/src/clients/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ You need to choose which one you want incorporate into your app. Which one you u
2525
### The websocket client
2626
Your first option is the native websocket client (`nym-client`). This is a compiled program that can run on Linux, Mac OS X, and Windows machines. It can be run as a persistent process on a desktop or server machine. You can connect to it with **any language that supports websockets**.
2727

28-
_Rust developers can import websocket client functionality into their code via the [Rust SDK](../sdk/rust/rust.md)_.
28+
> Rust developers can import websocket client functionality into their code via the [Rust SDK](../sdk/rust/rust.md).
2929
3030
### The webassembly client
3131
If you're working in JavaScript or Typescript in the browser, or building an [edge computing](https://en.wikipedia.org/wiki/Edge_computing) app, you'll likely want to choose the webassembly client.
3232

3333
It's packaged and [available on the npm registry](https://www.npmjs.com/package/@nymproject/nym-client-wasm), so you can `npm install` it into your JavaScript or TypeScript application.
3434

35-
_The webassembly client is most easily used via the [Typescript SDK](../sdk/typescript.md)_.
35+
> The webassembly client is most easily used via the [Typescript SDK](../sdk/typescript.md). Typescript developers who wish to send API requests through the mixnet can can also check the [`mixfetch`]() package.
3636
3737
### The SOCKS5 client
3838
The `nym-socks5-client` is useful for allowing existing applications to use the Nym mixnet without any code changes. All that's necessary is that they can use one of the SOCKS5, SOCKS4a, or SOCKS4 proxy protocols (which many applications can - crypto wallets, browsers, chat applications etc).

documentation/docs/src/clients/socks5-client.md renamed to documentation/dev-portal/src/clients/socks5-client.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Socks5 Client
22

3-
> The Nym socks5 client was built in the [building nym](../binaries/building-nym.md) section. If you haven't yet built Nym and want to run the code on this page, go there first.
3+
> The Nym Socks5 Client was built in the [building nym](../binaries/building-nym.md) section. If you haven't yet built Nym and want to run the code on this page, go there first.
44
55
## Current version
66
```
@@ -60,7 +60,7 @@ There are 2 pieces of software that work together to send SOCKS traffic through
6060
The `nym-socks5-client` allows you to do the following from your local machine:
6161
* Take a TCP data stream from a application that can send traffic via SOCKS5.
6262
* Chop up the TCP stream into multiple Sphinx packets, assigning sequence numbers to them, while leaving the TCP connection open for more data
63-
* Send the Sphinx packets through the mixnet to a [network requester](../nodes/network-requester.md). Packets are shuffled and mixed as they transit the mixnet.
63+
* Send the Sphinx packets through the mixnet to a [network requester](https://nymtech.net/operators/nodes/network-requester.md). Packets are shuffled and mixed as they transit the mixnet.
6464

6565
The `nym-network-requester` 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!
6666

@@ -100,11 +100,11 @@ Before you can use the client, you need to initalise a new instance of it, which
100100

101101
The `--id` in the example above is a local identifier so that you can name your clients and keep track of them on your local system; it is **never** transmitted over the network.
102102

103-
The `--use-reply-surbs` field denotes whether you wish to send [SURBs](../architecture/traffic-flow.md#private-replies-using-surbs) along with your request. It defaults to `false`, we are explicitly setting it as `true`. It defaults to `false` for compatibility with older versions of the [Network Requester](../nodes/network-requester.md).
103+
The `--use-reply-surbs` field denotes whether you wish to send [SURBs](https://nymtech.net/docs/architecture/traffic-flow.md#private-replies-using-surbs) along with your request. It defaults to `false`, we are explicitly setting it as `true`. It defaults to `false` for compatibility with older versions of the [Network Requester](https://nymtech.net/nodes/network-requester.md).
104104

105-
The `--provider` field needs to be filled with the Nym address of a Network Requester that can make network requests on your behalf. If you don't want to [run your own](../nodes/network-requester.md) you can select one from the [mixnet explorer](https://explorer.nymtech.net/network-components/service-providers) by copying its `Client ID` and using this as the value of the `--provider` flag. Alternatively, you could use [this list](https://harbourmaster.nymtech.net/).
105+
The `--provider` field needs to be filled with the Nym address of a Network Requester that can make network requests on your behalf. If you don't want to [run your own](https://nymtech.net/operators/nodes/network-requester.md) you can select one from the [mixnet explorer](https://explorer.nymtech.net/network-components/service-providers) by copying its `Client ID` and using this as the value of the `--provider` flag. Alternatively, you could use [this list](https://harbourmaster.nymtech.net/).
106106

107-
Since the nodes on this list are the infrastructure for [Nymconnect](https://nymtech.net/developers/quickstart/nymconnect-gui.html) they will support all apps on the [default whitelist](../nodes/network-requester.md#network-requester-whitelist): Keybase, Telegram, Electrum, Blockstream Green, and Helios.
107+
Since the nodes on this list are the infrastructure for [Nymconnect](https://nymtech.net/developers/quickstart/nymconnect-gui.html) they will support all apps on the [default whitelist](https://nymtech.net/operators/nodes/network-requester.md#network-requester-whitelist): Keybase, Telegram, Electrum, Blockstream Green, and Helios.
108108

109109
#### Choosing a Gateway
110110
By default - as in the example above - your client will choose a random gateway to connect to.

documentation/dev-portal/src/quickstart/socks-proxy.md renamed to documentation/dev-portal/src/clients/socks5/setup.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SOCKS Proxy (CLI)
1+
# Setup
22

33
> `nym-socks5-client` now also supports SOCKS4 and SOCKS4A protocols as well as SOCKS5.
44
@@ -39,33 +39,4 @@ Now your client is initialised, start it with the following:
3939
./nym-socks5-client run --id <ID>
4040
```
4141

42-
## Proxying traffic
43-
After completing the steps above, your local `nym-socks5-client` will be listening on `localhost:1080` ready to proxy traffic to the Network Requester set as the `--provider` when initialising.
4442

45-
When trying to connect your app, generally the proxy settings are found in `settings->advanced` or `settings->connection`.
46-
47-
Here is an example of setting the proxy connecting in Blockstream Green:
48-
49-
![Blockstream Green settings](../images/blockstream-green.gif)
50-
51-
Most wallets and other applications will work basically the same way: find the network proxy settings, enter the proxy url (host: **localhost**, port: **1080**).
52-
53-
In some other applications, this might be written as **localhost:1080** if there's only one proxy entry field.
54-
55-
## Supported Applications
56-
57-
Any application which can be redirected over Socks5 proxy should work. Nym community has been successfully running over Nym Mixnet these applications:
58-
59-
- Bitcoin Electrum wallet
60-
- Monero wallet (GUI and CLI with monerod)
61-
- Telegram chat
62-
- Element/Matrix chat
63-
- Firo wallet
64-
- ircd chat
65-
- Blockstream Green
66-
67-
Keep in mind that Nym has been developing a new client **[NymVPN](https://nymvpn.com) (GUI and CLI) routing all users traffic through the Mixnet.**
68-
69-
## Further reading
70-
71-
If you want to dig more into the architecture and use of the socks5 client check out its documentation [here](https://nymtech.net/docs/clients/socks5-client.html).

0 commit comments

Comments
 (0)