nondanee/Nroxy

不支持 Android 10

Open

#7 ouverte le 22 mars 2020

Voir sur GitHub
 (13 commentaires) (0 réactions) (0 assignés)C (9 forks)github user discovery
help wanted

Métriques du dépôt

Stars
 (43 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

https://developer.android.com/about/versions/10/privacy/changes#proc-net-filesystem

/proc/net 文件系统的访问权限实施了限制

https://github.com/nondanee/Nroxy/blob/7933f070216b2e2e30d36e92e390e9564107089b/app/src/main/cpp/tun2http/ip.c#L321-L333

导致 get_uid 出错

type=1400 audit(0.0:13003): avc: denied { read } for name="tcp" dev="proc" ino=4026532086 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:proc_net_tcp_udp:s0 tclass=file permissive=0

需使用 getConnectionOwnerUid(Called from C code)

https://developer.android.com/reference/android/net/ConnectivityManager.html#getConnectionOwnerUid(int,%20java.net.InetSocketAddress,%20java.net.InetSocketAddress)

参考 https://stackoverflow.com/questions/58497492/acccess-to-proc-net-tcp-in-android-q

Guide contributeur