Skip to content

Make supported connection types configurable #1543

@mfornos

Description

@mfornos

Right now the supported connection types of the client are hard coded:

forbidTcp: true, // In order to avoid confusing inconsistencies between browsers and NodeJS, TCP connections are always disabled.
forbidNonLocalWs: true, // Prevents browsers from emitting warnings if smoldot tried to establish non-secure WebSocket connections

Whilst they could be good defaults, to avoid issues stated in the comments, it would be great if the users of the library can
override them.

As a suggestion, all the connection type options that smoldot provides should be configurable:

forbidTcp: false,
forbidWs: false,
forbidNonLocalWs: false,
forbidWss: false,

The options can be added to the existing configuration interface:

/**
* Configuration that can be passed to {createScClient}.
*/
export interface Config {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions