Skip to content

Conversation

@kingofnull
Copy link

On https pages connector switches to WSS but for TLS validation on browsers wss url domain most match certificate domain. I just apply it.

On https pages connector switches to WSS but for TLS validation on browsers wss url domain most match certificate domain. I just apply it.
@painor
Copy link
Member

painor commented Nov 14, 2021

I don't think this is the correct fix for it. In browsers, it should pickup vesta.web.telegram.org as the default URL.
For Node it should be an IP not a URL.

@kingofnull
Copy link
Author

But it doesn't and setting it manually fix the connectivity problem:

    client.session.setDC(4, 'kws4.web.telegram.org', 443);

and I found it from https://web.telegram.org/k/ and it return exact IP as current IP in gramjs config.

I want to help to improve library. Please test library on https web page and if it worked you just ignore this commit.

I built browser build and loaded it to this page (its a https one) you can test connection on it yourself:

https://kingofnull.github.io/gramjs-browser-build/

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

Successfully merging this pull request may close these issues.

2 participants