Hi-Ray / lcu-connector-extra

A JavaScript package which allows easy access to the League of Legends clients API's.
1 stars 0 forks source link

ws error self signed certificate #1

Open Yomisana opened 2 years ago

Yomisana commented 2 years ago

Hello there I have issue about lcu-connector-extra/Websocket

const { Websocket } = require('lcu-connector-extra');
// wss
const ws = new 
Websocket(`wss://riot:${client_lockfile.passwd}@127.0.0.1:${client_lockfile.port}/`); // will error self signed certificate
// wss i try add ignore self signed certificate issue
const ws = new 
Websocket(`wss://riot:${client_lockfile.passwd}@127.0.0.1:${client_lockfile.port}/`, { rejectUnauthorized: false }); // still not working
// ws
const ws = new Websocket(`ws://riot:${client_lockfile.passwd}@127.0.0.1:${client_lockfile.port}/`); // it working but mot have data this we don't want use this request method(not secure).

Am I requesting the module in the wrong way?

Hi-Ray commented 2 years ago

I believe it is rejectUnauthorized: true

Yomisana commented 2 years ago

I believe it is rejectUnauthorized: true

I had try it's same still not working. const ws = new Websocket(`wss://riot:${client_lockfile.passwd}@127.0.0.1:${client_lockfile.port}/`, { rejectUnauthorized: true });

I saw ws there issues have same issue is resolved but in here module not working... websockets/ws | Error: self signed certificate trying to connect to vis WSS using vscode extension

If I am using the module for ws directly and use same code I can get it to working const ws = new Websocket(`wss://riot:${client_lockfile.passwd}@127.0.0.1:${client_lockfile.port}/`, { rejectUnauthorized: false });