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

建议增加禁止联网功能 #2087

Open
mwacgi opened this issue Jan 23, 2019 · 8 comments
Open

建议增加禁止联网功能 #2087

mwacgi opened this issue Jan 23, 2019 · 8 comments

Comments

@mwacgi
Copy link

mwacgi commented Jan 23, 2019

Android VPN 只能建立一个,目前绝大多数 Android 防火墙都是基于 VPN 连接的,一开 Shadowsocks 防火墙就退出了,防火墙用来阻止某些 APP 联网,所以希望增加这个功能。

@madeye
Copy link
Contributor

madeye commented Jan 23, 2019

Most of popular firewalls added shadowsocks support already. Try AFWall+ or NetPatch.

@madeye madeye added the question Use https://discourse.shadowsocks.org/c/implementations/shadowsocks-android instead. label Jan 23, 2019
@Mygod
Copy link
Contributor

Mygod commented Jan 23, 2019

I guess this might be possible with SO_PEERCRED. Contributions are welcome.

@mwacgi
Copy link
Author

mwacgi commented Jan 24, 2019

@madeye 根据您的提示,我测试过了 AFWall+NetPatch, 前者需要 root 权限,后者只支持 shadowsocks 的一部分加密方法,新的加密方法不支持,而且很多功能需要专业版。

对于 Shadowsocks Android 分应用代理,我的理解是把 APP 的流量重定向到 direct 和 proxy 两个通道,再增加一个 block 通道即可达到部分 APP 走 proxy, 部分 APP 使用原有网络,部分 APP 阻止联网的目的。后续您是否会考虑增加这个功能?

谢谢。

@Mygod Mygod added not following template and removed question Use https://discourse.shadowsocks.org/c/implementations/shadowsocks-android instead. labels Jan 24, 2019
@Mygod
Copy link
Contributor

Mygod commented Jan 24, 2019

You should check out ndc firewall. Using VpnService for firewall is kind of hacky. Complain to Android if you do not have root.

@Mygod Mygod closed this as completed Jan 24, 2019
@Mygod Mygod added the wontfix label Jan 24, 2019
@leafleave
Copy link

这个还是不错的,像ios的shadowrocket就支持direct proxy reject三种,还支持自定义host。对于你这种问题,目前只能在服务端host改成127.0.0.1处理了。

@Mygod
Copy link
Contributor

Mygod commented Sep 4, 2019

Might be able to do this with this new API, which uses NETLINK_SOCK_DIAG under the hood. Related:

Implementation wise, we could send uid as auxiliary info from tun2socks to ss-local so it can handle each connection differently based on UID.

@Mygod Mygod removed the wontfix label Sep 4, 2019
@Mygod
Copy link
Contributor

Mygod commented Feb 20, 2020

Reopening this for visibility.

@TPLC

This comment has been minimized.

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

No branches or pull requests

6 participants
@madeye @Mygod @leafleave @mwacgi @TPLC and others