alik0211 / mtproto-core

Telegram API JS (MTProto) client library for Node.js and browser
https://mtproto-core.js.org
GNU General Public License v3.0
630 stars 113 forks source link

Add socks proxy #234

Open wind-hx opened 2 years ago

wind-hx commented 2 years ago

Test passed

wind-hx commented 2 years ago

demo

let proxyOptions = {
        host: '127.0.0.1',
        port: 7890,
        type: 5        // 5: socks5
}
let mtProto = new MTProto({
        api_id: apiId,
        api_hash: apiHash,
        storageOptions: {
            instance: storage
        },
        proxy: proxyOptions
    })