tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Are proxy settings supported for Apple Watch? #2693

Closed vincentneo closed 11 months ago

vincentneo commented 11 months ago

It seems like having any proxy configs active results in crash, seems to be around TransparentProxy::start_up.

Personally believe it's not a supported use case, as per usual with watchOS limits on networking (and it looks to be calling socket-related code?), but would like to confirm.

Or, are proxyTypeHttp supported? (tested SOCKS5 only)

Final few lines of log:

[14][t 4][1700735031.459249019][ActorInfo.h:175][&actor]    Start run actor: Socks5:0x600002c49b00:0x108230818
[14][t 4][1700735031.459251165][Scheduler.cpp:267][#1][!Socks5][&actor] Socks5:0x600002c49b00:0x108230818 Event::Start
[ 4][t 4][1700735031.459254026][TransparentProxy.cpp:55][#1][!Socks5][&proxy]   Begin to connect to proxy
[ 0][t 4][1700735031.459256172][SocketFd.cpp:687][#1][!Socks5]  Check `!empty()` failed
[14][t 3][1700735031.459273099][Scheduler.cpp:332][#1][!FileLoadManager][&actor]    Send to FileManager:0x600002c41580:0x108230818 on scheduler 0: Event::Custom
[14][t 3][1700735031.459276199][ActorInfo.h:182][#1][!FileLoadManager][&actor]  Stop run actor: FileLoadManager:0x600002c41600:0x108230818
[14][t 3][1700735031.459284067][Scheduler.cpp:95][!ServiceActor][&actor]    Receive Event::Custom
[14][t 3][1700735031.459287166][ActorInfo.h:175][!ServiceActor][&actor] Start run actor: FileLoadManager:0x600002c41600:0x108230818
[14][t 3][1700735031.459289312][Scheduler.cpp:267][#1][!FileLoadManager][&actor]    FileLoadManager:0x600002c41600:0x108230818 Event::Custom
levlam commented 11 months ago

Yes, proxy isn't supported for environments, where TDLib isn't allowed to handle network connections itself, like watchOS or browsers. The crash should be fixed though and an error for addProxy to be returned instead.

vincentneo commented 11 months ago

Alright, thanks for the confirmation and explanation!