Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection confirm dialog - feature proposal #269

Closed
smarek opened this issue Apr 6, 2014 · 7 comments
Closed

Connection confirm dialog - feature proposal #269

smarek opened this issue Apr 6, 2014 · 7 comments
Labels

Comments

@smarek
Copy link

smarek commented Apr 6, 2014

Hi,

thanks for great project.
Anyway, I'd be willing to implement this, just wanted to start wider discussion.

I really like Little Snitch user-flow feature, which creates rules per application (by it's path), user id (by process identifier) and per connection (each time application requests to open connection, it will lookup in white/black-list, and without rule applicable to current situation, will throw user dialog to confirm what to do.

To illustrate the situation, i include few screenshots of LS3

Standard dialog
Time based rules
Domain / Port based rules

It would be really handy to get confirmation dialog on each connection, where rules are made per application uid/guid

Rules (per app)

  • URL + PORT
  • DOMAIN + PORT
  • PORT (any url/domain)
  • URL (any port)
  • DOMAIN (any port)
  • Anything (any domain/url/port, the app is fully trusted then)

Time based

  • Once
  • Time interval (5,10,15,30,60 minutes)
  • Until process is killed (if possible)
  • Until device is restarted
  • Forever

Application should then provide permanent service notification, where the user could quickly access list of allowed/denied connections (eg. over last 15 minutes) and rules editor, where you could review and debug requests made by application (some short backlog) and see what rules are denying those requests, to easily fix wrongly set rules.

Possibly could be extended by accepting URL patterns similar to AdAway/AdBlock,
white/black-listing allowed underlying network type (cellular,wireless,tethered,vpn,...) and (which is really crazy detailed option) for HTTP requests types (such as GET,PUT,POST,DELETE,UPDATE,...)

So if you please could discuss over this proposal, what would fit your idea, as I said, I'm willing to implement this in open-source, because it would be really good privacy feature, which could possibly replace various adblock solutions and if divided into profiles (home,work,traveling) and user account specific (for multi-user android devices), make really solid user-friendly firewalling solution.

@ukanth ukanth added the Feature label Apr 8, 2014
@ukanth
Copy link
Owner

ukanth commented Apr 8, 2014

Thanks for the detail description. I saw your post on stackexchange. Have a look at our log service code which will give the reference of uid in real time which is blocked by afwall. From there we need to have a activity/dialog which ask user with a prompt and perform accordingly.

in Log service, everything is driven by klogripper which reads the kernel log. Just have a look as a starting point.

@smarek
Copy link
Author

smarek commented May 7, 2014

@ukanth thanks for the info, however i'm afraid that iptables are not capable of what we are talking about, i'd have to redirect all traffic into some kind of proxy in iptables, and then on proxy block/allow connections on per-rule basis.

I'm thinking about either kernel module which would block creating socket (both incoming and outgoing) or using squid proxy or similar to apply the rules on traffic.

As I said rules consist of host, port (local/remote), app process id and time-interval defining the rule.

@smarek
Copy link
Author

smarek commented Jul 12, 2014

@ukanth i'm looking into this topic again, what you do have is after-the-fact working with nflog, do i understand that correctly? If so, that would mean every connection would fail at first, and after being set by user, it would be allowed or disallowed per decision.

I've also thought about using netlink-firewall to get callbacks from kernel about attempted connections, but it doesn't seem to be available widely in android linux kernel builds.

Thanks

@rancidfrog
Copy link

It would be great to have a prompt for only a certain white-listed apps, (I do not think it necessary to have it per-connection, though), to temporarily enable internet access for X amount of time.

Are you still planning to implement this feature?

@ukanth
Copy link
Owner

ukanth commented Aug 3, 2016

Duplicate of #10

@ukanth ukanth closed this as completed Aug 3, 2016
@vzool
Copy link
Contributor

vzool commented Jan 21, 2017

Maybe it looks like it's so long list of requirements, but I feel differently.

With root we become gods.

I think that if we just start with a simple dialog of confirmation derived from LogService as @ukanth suggested, and the dialog offer these options:

  • Block.
  • Allow once.
  • Allow forever.

After that we can enhance it and expand it with and while Android been developing and involve closer to proposal bone, I guess that we are not so far. I prefer xPrivacy way of dialog, it may serve us well.
It behaves so closely and even better to what SuperSu offer.

Thanks

alt tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants
@ukanth @smarek @vzool @rancidfrog and others