Has snowflake reached orbot yet? I’ve got a 65mbps connection to loan if so
1 Like
ukmr
December 24, 2021, 12:25pm
2
Hi @Nameless
Orbot 16.5.2-RC-4 tor.0.4.6.9 was released 20 hours ago including a Snowflake update
3 Likes
arma
December 26, 2021, 7:23am
5
Wait, these are two different questions. Or at least, I think @ukmr is answering a different question than @Nameless asked.
Nameless is wanting to volunteer as a Snowflake, i.e. be one of the people who bridges traffic for censored users into the Tor network.
The update in Orbot is for the Snowflake client , i.e. the thing that censored users can use to reach the Tor network.
I know that the Guardian Project folks have been working on an app that can let you volunteer your phone as a Snowflake, and it tries to do it in a friendly way e.g. only offering it when you’re plugged in at night. We had a GSoC intern working on an app like that too. I don’t know what the current status is though. Maybe somebody here does?
2 Likes
ukmr
December 26, 2021, 11:47am
6
@arma Thanks for clarifying this. I was unaware of the app development by the Guardian Project, as you’ve described. This link provides an overview of the current status,
opened 04:20AM - 10 Dec 21 UTC
snowflake
By default there is a setting for using your device as a snowflake that's enable… d called "Snowflake Proxy Limits". It reads "Only when device is plugged in and on wifi".
In `OrbotService`:
```java
public static boolean isChargingAndWifi(Context context) {
Intent intent = context.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
int plugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
boolean isCharging = plugged == BatteryManager.BATTERY_PLUGGED_AC || plugged == BatteryManager.BATTERY_PLUGGED_USB || plugged == BatteryManager.BATTERY_PLUGGED_WIRELESS;
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
boolean isUnmetered = cm.getActiveNetworkInfo() != null
&& cm.getActiveNetworkInfo().isConnected()
&& (!cm.isActiveNetworkMetered());
return isCharging && isUnmetered;
}
```
There are several things wrong with this appraoch:
- Firstly `isChargingAndWifi(Context)` is called just when tor starts. If you lose power or lose wifi over night Orbot will continue to be a Snowflake proxy. While you're less likely to suddenly lose power, people with limited data plans could get hurt here if their wifi goes out... `OrbotService` needs to listen for events and turn off Snowflake if the user has this set
- This method doesn't actually check if the device is on WiFi. **Limited cellular data plans can appear as unmetered. Users can be hurt here since they would assume Snowflake would not be running.**
- WiFi networks *can* be metered so there are scenarios where the user is on WiFi and plugged in but Snowflake won't start. There are probably other scenarios where Android treats a WiFi network as "metered", but one is that [Access Points can apparently *hint* to their clients that their connection is metered](https://stackoverflow.com/questions/23877476/android-why-connectivitymanager-isactivenetworkmetered-always-returning-true). Basically if the "Vendor Info" of a DHCP lease (code 43) contains the text `"ANDROID_METERED"` the system will treat the wifi connection as metered. Android does this with mobile hotspots.
What probably needs to happen:
- The limiting feature should check to see if the device is plugged in, if the device is actually on wifi, and ensure that the wifi connection is unmetered
- If any of these things go away Snowflake should definitely stop.
- If these things return should snowflake start back up???
1 Like