mirror of https://github.com/status-im/go-waku.git
chore: add tls/ws to address factory
This commit is contained in:
parent
8783cd2f45
commit
be982d8617
|
@ -190,8 +190,11 @@ func WithDns4Domain(dns4Domain string) WakuNodeOption {
|
||||||
|
|
||||||
if params.enableWS || params.enableWSS {
|
if params.enableWS || params.enableWSS {
|
||||||
if params.enableWSS {
|
if params.enableWSS {
|
||||||
|
// WSS is deprecated in https://github.com/multiformats/multiaddr/pull/109
|
||||||
wss, _ := multiaddr.NewMultiaddr(fmt.Sprintf("/tcp/%d/wss", params.wssPort))
|
wss, _ := multiaddr.NewMultiaddr(fmt.Sprintf("/tcp/%d/wss", params.wssPort))
|
||||||
addresses = append(addresses, hostAddrMA.Encapsulate(wss))
|
addresses = append(addresses, hostAddrMA.Encapsulate(wss))
|
||||||
|
tlsws, _ := multiaddr.NewMultiaddr(fmt.Sprintf("/tcp/%d/tls/ws", params.wssPort))
|
||||||
|
addresses = append(addresses, hostAddrMA.Encapsulate(tlsws))
|
||||||
} else {
|
} else {
|
||||||
ws, _ := multiaddr.NewMultiaddr(fmt.Sprintf("/tcp/%d/ws", params.wsPort))
|
ws, _ := multiaddr.NewMultiaddr(fmt.Sprintf("/tcp/%d/ws", params.wsPort))
|
||||||
addresses = append(addresses, hostAddrMA.Encapsulate(ws))
|
addresses = append(addresses, hostAddrMA.Encapsulate(ws))
|
||||||
|
|
Loading…
Reference in New Issue