mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-15 09:26:38 +00:00
deploy: 5a890b5f90d877fa45c2a5b0f33a5b3b777da831
This commit is contained in:
parent
2875ada113
commit
6bdd28cecd
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# libtool - Provide generalized library-building support services.
|
# libtool - Provide generalized library-building support services.
|
||||||
# Generated automatically by config.status (libbacktrace) version-unused
|
# Generated automatically by config.status (libbacktrace) version-unused
|
||||||
# Libtool was configured on host fv-az129-413:
|
# Libtool was configured on host fv-az272-316:
|
||||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||||
#
|
#
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||||
|
@ -134,23 +134,40 @@ You can change this to `wakunode2`, the Waku v2 node like this:
|
|||||||
make docker-image MAKE_TARGET=wakunode2
|
make docker-image MAKE_TARGET=wakunode2
|
||||||
docker run --rm -it statusteam/nim-waku:latest --help
|
docker run --rm -it statusteam/nim-waku:latest --help
|
||||||
```
|
```
|
||||||
## Using Websocket and secure Websockets
|
## Enabling Websocket
|
||||||
|
|
||||||
Websocket support is hidden under a feature flag and must be explicitly enabled in order to get Websockets support. The default port is 8000.
|
Websocket is currently the only Waku transport supported by browser nodes that uses [js-waku](https://github.com/status-im/js-waku).
|
||||||
|
Setting up websocket enables your node to directly serve browser peers.
|
||||||
|
|
||||||
```
|
A valid certificate is necessary to serve browser nodes,
|
||||||
# Run unsecure Websockets (doesn't require a certificate)
|
you can use [`letsencrypt`](https://letsencrypt.org/):
|
||||||
./build/wakunode2 --websocket-support=true
|
|
||||||
|
```shell
|
||||||
|
sudo letsencrypt -d <your.domain.name>
|
||||||
```
|
```
|
||||||
|
|
||||||
Running a secure websocket requires an ssl certificate. We can create a self signed websocket. However, it requires the `openssl` utility. It can be achieved with:
|
You will need the `privkey.pem` and `fullchain.pem` files.
|
||||||
|
|
||||||
|
To enable secure websocket, pass the generated files to `wakunode2`:
|
||||||
|
Note, the default port for websocket is 8000.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wakunode2 --websocket-secure-support=true --websocket-secure-key-path="<letsencrypt cert dir>/privkey.pem" --websocket-secure-cert-path="<letsencrypt cert dir>/fullchain.pem"
|
||||||
```
|
```
|
||||||
mkdir -p ../ssl_dir/
|
|
||||||
|
|
||||||
openssl req -x509 -newkey rsa:4096 -keyout ../ssl_dir/key.pem -out ../ssl_dir/cert.pem -sha256 -nodes
|
### Self-signed certificates
|
||||||
|
|
||||||
./build/wakunode2 --websocket-secure-support=true --websocket-secure-key-path="../ssl_dir/key.pem" --websocket-secure-cert-path="../ssl_dir/cert.pem"
|
Self-signed certificates are not recommended for production setups because:
|
||||||
|
|
||||||
|
- Browsers do not accept self-signed certificates
|
||||||
|
- Browsers do not display an error when rejecting a certificate for websocket.
|
||||||
|
|
||||||
|
However, they can be used for local testing purposes:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mkdir -p ./ssl_dir/
|
||||||
|
openssl req -x509 -newkey rsa:4096 -keyout ./ssl_dir/key.pem -out ./ssl_dir/cert.pem -sha256 -nodes
|
||||||
|
wakunode2 --websocket-secure-support=true --websocket-secure-key-path="./ssl_dir/key.pem" --websocket-secure-cert-path="./ssl_dir/cert.pem"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user