Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make supported connection types configurable #1543

Open
mfornos opened this issue Sep 13, 2023 · 0 comments
Open

Make supported connection types configurable #1543

mfornos opened this issue Sep 13, 2023 · 0 comments

Comments

@mfornos
Copy link

mfornos commented Sep 13, 2023

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 {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant