sochix / TLSharp

Telegram client library implemented in C#
1k stars 380 forks source link

cannot connect to [2001:b28:f23f:f005::a]:443 - ipV4 and ipv6 problem #950

Open anthonychoi01 opened 4 years ago

anthonychoi01 commented 4 years ago

Been using the windows version of the Bot, and when connect through API, it shows

`

Problem when trying to connect to [2001:b28:f23f:f005::a]:443; either there's no internet connection or the IP address version is not compatible (if the latter, consider using DataCenterIPVersion enum)

`

My internet was ipV4 only and I would like to know how to solve it? Is that related to the .ddl mistakes? How can I modify it as I am not familiar with coding Thanks.

knocte commented 4 years ago

It says how to solve this problem in the error message, use the DataCenterIPVersion enum.

anthonychoi01 commented 4 years ago

Thanks for the help. As I am using the telegram bot in Windows, where and how should I modify the file or the code? Sorry I am just not familiar with this. Thanks again

bretbas commented 4 years ago

I have the same error. Problem when trying to connect to 149.154.175.100:443; either there's no internet connection or the IP address version is not compatible (if the latter, consider using DataCenterIPVersion enum)

I tried all possible DataCenterIPVersion enum values, but the issue dot't resolve.

in my api configuration i have the following Available MTProto servers: Test configuration: 149.154.167.40:443 Production configuration: 149.154.167.50:443 May be this is the reason?

SambathM commented 3 years ago

IPv6 is not supported, so : new TelegramClient(api_id, api_hash, dcIpVersion: DataCenterIPVersion.OnlyIPv4); DataCenterIPVersion enum => set OnlyIPv4 as above.

Hope this help.

ralphwald0 commented 3 years ago

Fix this please!!!! Nothing works