diff --git a/td/telegram/net/ConnectionCreator.cpp b/td/telegram/net/ConnectionCreator.cpp index 297b2112..66c281ae 100644 --- a/td/telegram/net/ConnectionCreator.cpp +++ b/td/telegram/net/ConnectionCreator.cpp @@ -1285,6 +1285,19 @@ DcOptions ConnectionCreator::get_default_dc_options(bool is_test) { } }; vector ports = {443, 80, 5222}; +#if TD_EMSCRIPTEN + if (is_test) { + add_ip_ports(1, {"pluto.web.telegram.org/apiws_test"}, {443}, HostType::Url); + add_ip_ports(2, {"venus.web.telegram.org/apiws_test"}, {443}, HostType::Url); + add_ip_ports(3, {"aurora.web.telegram.org/apiws_test"}, {443}, HostType::Url); + } else { + add_ip_ports(1, {"pluto.web.telegram.org/apiws"}, {443}, HostType::Url); + add_ip_ports(2, {"venus.web.telegram.org/apiws"}, {443}, HostType::Url); + add_ip_ports(3, {"aurora.web.telegram.org/apiws"}, {443}, HostType::Url); + add_ip_ports(4, {"vesta.web.telegram.org/apiws"}, {443}, HostType::Url); + add_ip_ports(5, {"flora.web.telegram.org/apiws"}, {443}, HostType::Url); + } +#else if (is_test) { add_ip_ports(1, {"149.154.175.10"}, ports); add_ip_ports(2, {"149.154.167.40"}, ports); @@ -1306,6 +1319,7 @@ DcOptions ConnectionCreator::get_default_dc_options(bool is_test) { add_ip_ports(4, {"2001:67c:4e8:f004::a"}, ports, HostType::IPv6); add_ip_ports(5, {"2001:b28:f23f:f005::a"}, ports, HostType::IPv6); } +#endif return res; } diff --git a/test/mtproto.cpp b/test/mtproto.cpp index 87a770fd..f759ea43 100644 --- a/test/mtproto.cpp +++ b/test/mtproto.cpp @@ -126,7 +126,11 @@ class TestPingActor : public Actor { static IPAddress get_default_ip_address() { IPAddress ip_address; +#if TD_EMSCRIPTEN + ip_address.init_host_port("venus.web.telegram.org/apiws", 443).ensure(); +#else ip_address.init_ipv4_port("149.154.167.40", 80).ensure(); +#endif return ip_address; }