Closed Samuron closed 4 years ago
Hi! Thank you very much for your work.
Is it possible to connect to scorebot via proxy? The loadPage seems to only affect loading and parsing the url for the scorebot to connect to.
loadPage
If not, can you conider an API change to accept agent as part of HLTVConfig? It then can be used in defaultLoadPage
agent
HLTVConfig
defaultLoadPage
const defaultLoadPage = (url) => { return new Promise(resolve => { request.get(url, { gzip: true, agent: proxy }, (_, __, body) => resolve(body)) }) }
and in connectToScorebot
connectToScorebot
const socket = io.connect(url, {agent: proxy});
I can try to come up with a PR to help you with it.
I haven't worked with http.Agents so I would appreciate your help. My only request is to name the property in the config httpAgent so that it's more descriptive than just agent.
httpAgent
Hi! Thank you very much for your work.
Is it possible to connect to scorebot via proxy? The
loadPage
seems to only affect loading and parsing the url for the scorebot to connect to.If not, can you conider an API change to accept
agent
as part ofHLTVConfig
? It then can be used indefaultLoadPage
and in
connectToScorebot
I can try to come up with a PR to help you with it.