afwall icon indicating copy to clipboard operation
afwall copied to clipboard

LAN and Tor

Open abidal3 opened this issue 7 years ago • 23 comments

Please separate LAN/VPN and Tor control for apps. If LAN/VPN and Tor is allowed for app and Orbot is down then no access to devices over LAN/VPN.

abidal3 avatar Mar 09 '19 10:03 abidal3

This is intentional so Tor won't leak traffic from/to your local network. Every Tor application I've used denies access to your local network. Is there a use case where this should be changed?

Jookia avatar Mar 20 '19 06:03 Jookia

This is intentional so Tor won't leak traffic from/to your local network.

But the same can be said for VPN. But all remained still for VPN interface. Earlier the checkboxes for all network interfaces have been divided. Why invent other behavior?

abidal3 avatar Mar 26 '19 07:03 abidal3

It is inconsistent, yes. I did it this way is because I don't know much about Android GUI design and didn't want to over complicate the feature addition.

Jookia avatar Mar 26 '19 20:03 Jookia

It is inconsistent, yes

This behavior needs to change. Let each checkbox control its network interface separately.

abidal3 avatar Mar 27 '19 10:03 abidal3

How would the user indicate they want all traffic to be Torified?

Jookia avatar Mar 27 '19 10:03 Jookia

How would the user indicate they want all traffic to be Torified?

If only Tor checkbox is enabled then traffic goes only through Tor. Just like with VPN. If Tor and other chechboxes are enabled then traffic goes through Tor when Tor client is enabled or through other active enabled network interfaces when Tor client is disabled.

abidal3 avatar Mar 27 '19 10:03 abidal3

How do we tell if the Tor client is enabled or disabled?

Jookia avatar Mar 27 '19 10:03 Jookia

How do we tell if the Tor client is enabled or disabled?

Add the option to define Tor client address. By default 127.0.0.1:9040 or 127.0.0.1:9050.

abidal3 avatar Mar 27 '19 10:03 abidal3

Does Orbot give a notification?

Jookia avatar Mar 27 '19 10:03 Jookia

Does Orbot give a notification?

Why get attached to Orbot? Tor client may be a binary file tor. The main thing is a binding address of tor client.

abidal3 avatar Mar 27 '19 10:03 abidal3

AFWall has to get notified that Tor is up or down from somewhere.

Jookia avatar Mar 27 '19 10:03 Jookia

AFWall has to get notified that Tor is up or down from somewhere

By checking the binding address.

abidal3 avatar Mar 27 '19 10:03 abidal3

How often will it do this? Will it wake the device up?

Jookia avatar Mar 27 '19 10:03 Jookia

Also add option to define timeout in seconds.

abidal3 avatar Mar 27 '19 10:03 abidal3

But unless Orbot is checked for running status now?

abidal3 avatar Mar 27 '19 10:03 abidal3

I don't know enough Android programming to implement this feature.

Jookia avatar Mar 27 '19 11:03 Jookia

You don't have to add a new checking necessary. How is it checked now? For now you'll just separate checkboxes.

abidal3 avatar Mar 27 '19 11:03 abidal3

It's not checked.

Jookia avatar Mar 27 '19 11:03 Jookia

Then don't check anything :) If only Tor checkbox is enabled then traffic goes only through Tor.

abidal3 avatar Mar 27 '19 11:03 abidal3

But then won't that mean if you check LAN and Tor, traffic won't be redirected to Tor? That sounds dangerous if you expect the Tor checkbox to always redirect.

Ignoring the Tor checkbox, AFWall lists destinations that traffic can go. Destinations checked are allowed through, destinations unchecked are blocked. The Tor checkbox redirects the allowed traffic. So right now you would let an application go through WiFi and Tor to have it Tor traffic on WiFi and block everything else.

Changing this so that if Tor isn't running the application will mean people's firewalls will now open if Tor is disabled rather than block connections. Adding an option in the settings to let traffic through when Tor is down would work and preserve existing behavior.

For extra safety I'd like this to somehow be tied to how Orbot is configured- not just if Tor is down but whether it's disabled or enabled. That way if a bad guy somehow kills Tor connections it won't bypass while Orbot is reconnecting.

@ukanth: Any thoughts? I could be up for implementing this.

Jookia avatar Mar 27 '19 11:03 Jookia

But then won't that mean if you check LAN and Tor, traffic won't be redirected to Tor?

Well. If Tor checkbox is enabled then traffic is redirected to Tor always. Until you can add the necessary checks.

abidal3 avatar Mar 27 '19 11:03 abidal3

Now we have to check a few checkboxes for Tor. And if Tor checkbox was disabled then we can forget to remove other checkboxes and traffic redirects through other network interfaces. This is dangerous too.

abidal3 avatar Mar 27 '19 11:03 abidal3

That way if a bad guy somehow kills Tor connections it won't bypass while Orbot is reconnecting.

The same can be said about VPN too. But if VPN is reconnecting and other network interfaces are enabled for app then app traffic would be redirected to other enabled network interfaces.

abidal3 avatar Mar 27 '19 12:03 abidal3