Foundation-Devices / tor

Tor plugin for Flutter
https://pub.dev/packages/tor
GNU General Public License v3.0
15 stars 6 forks source link

Progress messages #38

Open xAffan opened 2 months ago

xAffan commented 2 months ago

Is there any way to display progress messages while tor is being started? At present, the user has no way of knowing if tor is actually making progress in being started or not. Any solution would be appreciated

icota commented 2 months ago

@xAffan looks like this is possible https://gitlab.torproject.org/tpo/core/arti/-/blob/main/crates/arti-client/src/client.rs#L159

My current thinking is to expose the events themselves on the Dart side (as a stream?) and have the users make what they want of it, eg. a progress bar

That work for you?

xAffan commented 2 months ago

@xAffan looks like this is possible https://gitlab.torproject.org/tpo/core/arti/-/blob/main/crates/arti-client/src/client.rs#L159

My current thinking is to expose the events themselves on the Dart side (as a stream?) and have the users make what they want of it, eg. a progress bar

That work for you?

Yep works for me. I want to display a progress bar as well as log the messages so this would work perfectly

nns52k commented 1 month ago

@xAffan Are you able to access onion servers through this package now? I've tried your code example posted on https://github.com/LacticWhale/socks_dart/issues/4#issuecomment-2078199161 it does work but it looks like it uses an external Tor instead of libtor.so that this Tor package provides. When trying to access onion servers through this Tor package, I always get runtime error. Do you know how to access onion servers through this Tor package now?

xAffan commented 1 month ago

@xAffan Are you able to access onion servers through this package now? I've tried your code example posted on https://github.com/LacticWhale/socks_dart/issues/4#issuecomment-2078199161 it does work but it looks like it uses an external Tor instead of libtor.so that this Tor package provides. When trying to access onion servers through this Tor package, I always get runtime error. Do you know how to access onion servers through this Tor package now?

I didn't test this tor package. I tested using an external tor proxy. If this package doesn't work, it's most likely that they have disabled .onion support? Not sure.

nns52k commented 1 month ago

@xAffan

I didn't test this tor package. I tested using an external tor proxy. If this package doesn't work, it's most likely that they have disabled .onion support? Not sure.

Thanks for the reply. In case you might want to know, utopic_tor_onion_proxy | Flutter package works but it only supports Android and no other platforms.

I have a self-hosted Supabase that provides onion service. Though finally found the right Flutter package to access it, the Realtime feature of the Supabase is malfunction, no auto-updates sent to clients. Do you happen to know how to configure the Tor proxy to support WebSocket protocol?

According to Copilot, the Realtime feature of Supabase is based on WebSocket, and it also said that Tor proxy supports WebSocket. However, when I tested the Realtime feature, it didn't work. No auto-updates happen if the connection goes through Tor proxy.

xAffan commented 1 month ago

@xAffan

I didn't test this tor package. I tested using an external tor proxy. If this package doesn't work, it's most likely that they have disabled .onion support? Not sure.

Thanks for the reply. In case you might want to know, utopic_tor_onion_proxy | Flutter package works but it only supports Android and no other platforms.

I have a self-hosted Supabase that provides onion service. Though finally found the right Flutter package to access it, the Realtime feature of the Supabase is malfunction, no auto-updates sent to clients. Do you happen to know how to configure the Tor proxy to support WebSocket protocol?

According to Copilot, the Realtime feature of Supabase is based on WebSocket, and it also said that Tor proxy supports WebSocket. However, when I tested the Realtime feature, it didn't work. No auto-updates happen if the connection goes through Tor proxy.

Can you run this package and try something like python to access .onion to see if it works?

nns52k commented 1 month ago

@xAffan

Can you run this package and try something like python to access .onion to see if it works?

I'm not good at Python. sorry. I have only written some simple Python scripts, slightly more complicated than hello_world.

I've tried built a Flutter project to a GTK application, and the same bug appears. https://github.com/Foundation-Devices/tor/issues/42