Spaces:
Configuration error
Configuration error
Download src/utils/telegramAgent.js from sdsdsd55415/pcstore: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/spaces/sdsdsd55415/pcstore/resolve/main/src/utils/telegramAgent.js
- Command line
-
hf download hf://spaces/sdsdsd55415/pcstore/src/utils/telegramAgent.js
-
curl -L -o telegramAgent.js https://huggingface.co/spaces/sdsdsd55415/pcstore/resolve/main/src/utils/telegramAgent.js
565 Bytes
| const https = require('https'); | |
| const dns = require('dns'); | |
| // Custom Agent with IP hardcoded to bypass DNS issues on Hugging Face | |
| const telegramAgent = new https.Agent({ | |
| keepAlive: true, | |
| family: 4, | |
| lookup: (hostname, options, callback) => { | |
| if (hostname === 'api.telegram.org') { | |
| console.log('⚡ Agent using hardcoded IP for Telegram: 149.154.166.110'); | |
| return callback(null, '149.154.166.110', 4); | |
| } | |
| dns.lookup(hostname, options, callback); | |
| } | |
| }); | |
| module.exports = telegramAgent; | |