tdl icon indicating copy to clipboard operation
tdl copied to clipboard

[BUG] Can't login, Log file attached

Open gaoyike opened this issue 3 years ago • 8 comments

Describe the bug I can not login

To Reproduce Use the command listed in the front page

Expected behavior Login

Screenshots

Version: 0.7.2

Log

2023-03-13 14:52:20 INFO login.td telegram/connect.go:75 Restarting connection {"v": "v0.69.1", "error": "start: dial failed: socks connect tcp localhost:1080->149.154.167.50:443: dial tcp [::1]:1080: connectex: No connection could be made because the target machine actively refused it.; socks connect tcp localhost:1080->[2001:67c:4e8:f002::a]:443: dial tcp [::1]:1080: connectex: No connection could be made because the target machine actively refused it.; socks connect tcp localhost:1080->149.154.167.51:443: dial tcp [::1]:1080: connectex: No connection could be made because the target machine actively refused it.", "errorVerbose": "start:\n github.com/gotd/td/internal/mtproto.(*Conn).Run\n github.com/gotd/[email protected]/internal/mtproto/conn.go:201\n - dial failed:\n github.com/gotd/td/internal/mtproto.(*Conn).connect\n github.com/gotd/[email protected]/internal/mtproto/connect.go:21\n - the following errors occurred:\n - socks connect tcp localhost:1080->149.154.167.50:443: dial tcp [::1]:1080: connectex: No connection could be made because the target machine actively refused it.\n - socks connect tcp localhost:1080->[2001:67c:4e8:f002::a]:443: dial tcp [::1]:1080: connectex: No connection could be made because the target machine actively refused it.\n - socks connect tcp localhost:1080->149.154.167.51:443: dial tcp [::1]:1080: connectex: No connection could be made because the target machine actively refused it.", "backoff": "2.966060525s"}

gaoyike avatar Mar 13 '23 20:03 gaoyike

Please paste your command

iyear avatar Mar 14 '23 05:03 iyear

tdl dl -n iyear -u https://t.me/telegram/193

gaoyike avatar Mar 14 '23 14:03 gaoyike

Sorry, the title is wrong. I can log in by tdl login -n iyear -d 'C:\Users\xxx\AppData\Roaming\Telegram Desktop' However, I can not download anything, I did some research, and I think my firewall is blocking the socket5. but I don't know how to fix it

gaoyike avatar Mar 14 '23 14:03 gaoyike

tdl don't use your http(s)_proxy automatically, so you should set proxy manually.

Try tdl dl -n iyear -u https://t.me/telegram/193 --proxy socks5://localhost:YOUR_PORT

or set env https://github.com/iyear/tdl#env

iyear avatar Mar 14 '23 14:03 iyear

tdl don't use your http(s)_proxy automatically, so you should set proxy manually.

Try tdl dl -n iyear -u https://t.me/telegram/193 --proxy socks5://localhost:YOUR_PORT

or set env https://github.com/iyear/tdl#env

Thanks for the quick response. I have a question, why do we need a socks5 proxy?

gaoyike avatar Mar 14 '23 14:03 gaoyike

I guess your network environment is not able to connect to Telegram Server, so we need to use socks5 proxy (tdl currently only supports socks5 protocol) to connect.

iyear avatar Mar 14 '23 14:03 iyear

I guess your network environment is not able to connect to Telegram Server, so we need to use socks5 proxy (tdl currently only supports socks5 protocol) to connect.

Uhm.. I am using telegram without proxy. I think I have no issues to direct connect to Telegram Server without using proxy

gaoyike avatar Mar 14 '23 14:03 gaoyike

Sorry, I looked at the logs. It shows it connected local socks proxy?

No connection could be made because the target machine actively refused it.; socks connect tcp localhost:1080149.154.167.51:443

iyear avatar Mar 15 '23 08:03 iyear