zerodytrash / TikTok-Live-Connector

Node.js library to receive live stream events (comments, gifts, etc.) in realtime from TikTok LIVE.
https://discord.gg/2c6kX6g3Pa
MIT License
1.28k stars 275 forks source link

I set up the proxy to connect, but an error was reported #112

Open itxiaoxian opened 1 year ago

itxiaoxian commented 1 year ago

Here's how I set it up:

const ProxyAgent = require('proxy-agent');
let tiktokLiveConnection = new WebcastPushConnection('xxxxx', {
    requestOptions: {
        httpsAgent: new ProxyAgent('https://root:U#9iRjLH*yGPCCCC@13.180.193.10:34511'),
        timeout: 100000 // 10 seconds
    },
    websocketOptions: {
        agent: new ProxyAgent('https://root:U#9iRjLH*yGPCCCC@13.180.193.10:34511'),
        timeout: 100000 // 10 seconds
    }
});

This is the error message:

Failed to connect Error: Failed to retrieve room_id from page source. getaddrinfo ENOTFOUND root at WebcastPushConnection._retrieveRoomId2 (C:\Users\HelloWorld\Desktop\delete\node_modules\tiktok-live-connector\dist\index.js:509:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async WebcastPushConnection.connect (C:\Users\HelloWorld\Desktop\delete\node_modules\tiktok-live-connector\dist\index.js:265:9)

I am looking forward to your reply. Thank you.

itxiaoxian commented 1 year ago

const { WebcastPushConnection } = require('tiktok-live-connector'); const ProxyAgent = require('proxy-agent');

let tiktokLiveConnection = new WebcastPushConnection('@username', { requestOptions: { httpsAgent: new ProxyAgent('https://username:password@host:port'), timeout: 10000 // 10 seconds }, websocketOptions: { agent: new ProxyAgent('https://username:password@host:port'), timeout: 10000 // 10 seconds } });

What do username and password stand for?

Pulse-Git commented 1 year ago

dont know if its so smart to show your ip and credentials here lol

itxiaoxian commented 1 year ago

I purchased the server through vultr, and tiktok can be accessed normally via v2ray set proxy. But I don't know what username and password stand for in your example.Thank you.