Add an app selector for per-app proxy; Add Simplified Chinese translation#2
Add an app selector for per-app proxy; Add Simplified Chinese translation#2SwimmingTiger wants to merge 4 commits intobndeff:masterfrom
Conversation
* The selected application will appear in the front. * If multiple apps have the same name, add the package name as a suffix. * Compatible with Android 5.0.
|
@bndeff Please add this feature. |
|
@bndeff Can we merge this? |
|
I haven't found the implementation part of accepting the data returned by the proxy server. i just find the "send" in SocksVPNService.start(). This function calls the system library,but it only calls send,without recv .Where do you realize receiving data. I am a rookie. i know this question is very naive, but if you can answer it, I will be very grateful to you。 |
|
I just found the alternative call the Sagaranet |
|
Dear developers, why app-selector is not implemented in an app available from the Google play store even after more than a year? It's very annoying to search package names so this would be very helpful. Thank you. |
834f7b4 to
1a36c15
Compare
@baichuan51141 The code that actually handles the VPN data is not in the Android part, it's in a separate executable. It's named Its startup command is spliced here. It will then be launched from the command line and remain running in the background. Then, the Android part sends the file descriptor of the VPN virtual network adapter ( As for Then inside Arch has a nice man page describing what it does: https://man.archlinux.org/man/community/badvpn/badvpn-tun2socks.8.en
Of all the code in |
|
@SwimmingTiger Hello, thank you for your job. I want also use okhttp in app. How I can redirect my okhttp traffic during tun2socks ? okhttp designed in self package which is bypassed and disabled by android route. Does it possible? Thanks. |
|
i cant open the github now
so i suggest you by email that you can use the VPNservice class which is supported by Android8+.
just google it.
…---Original---
From: "Evgeny ***@***.***>
Date: Wed, Mar 1, 2023 22:26 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [bndeff/socksdroid] Add an app selector for per-app proxy; AddSimplified Chinese translation (#2)
@SwimmingTiger Hello, thank you for your job. I want also use okhttp in app. How I can redirect my okhttp traffic during tun2socks ? okhttp designed in self package which is bypassed and disabled by android route. Does it possible? Thanks.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Now that service use to setup communication with tunc2socks. But I must disable self app traffic via |
|
it has another function addAllowAp….
just like:
for (String appPackage: appPackages) {
try {
packageManager.getPackageInfo(appPackage, 0);
builder.addAllowedApplication(appPackage);
} catch (PackageManager.NameNotFoundException e) {
// The app isn't installed.
}
}
…---Original---
From: "Evgeny ***@***.***>
Date: Wed, Mar 1, 2023 22:47 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [bndeff/socksdroid] Add an app selector for per-app proxy; AddSimplified Chinese translation (#2)
i cant open the github now so i suggest you by email that you can use the VPNservice class which is supported by Android8+. just google it.
…
---Original--- From: "Evgeny @.> Date: Wed, Mar 1, 2023 22:26 PM To: @.>; Cc: @.@.>; Subject: Re: [bndeff/socksdroid] Add an app selector for per-app proxy; AddSimplified Chinese translation (#2) @SwimmingTiger Hello, thank you for your job. I want also use okhttp in app. How I can redirect my okhttp traffic during tun2socks ? okhttp designed in self package which is bypassed and disabled by android route. Does it possible? Thanks. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Now that service use to setup communication with tunc2socks. But I must disable self app traffic via builder.addDisallowedApplication(packageName). So the main question how to setup okhttp in self app to communicate with network via socks5 tunel during tune2socks ?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Yep I was tried it. but in that case any app doesn't have connection. So still no luck. |
|
@evgenybozhko2 This fork shows how to get a VPN working without proxying the app itself. https://github.com/SwimmingTiger/CSNetDroid/tree/csnet libcsnet.so is a binary that provides local socks5 entry, it has uncertain network exit, so it cannot be excluded by routing rules. So the only option is to avoid proxying the app itself. But a side effect of not proxying the app itself is that DNS no longer works. I solved the problem by running a DNS over HTTPS relay. I still need libpdnsd.so to send correct DNS responses to Note 1: All of the above Note 2: |
Cool, now for me works all apps proxy and self app my IP traffic. But is there any way to proxy self-traffic as well? Thanks. |

Change 1
Added an app selector for the per-app proxy, no need to manually enter the package name.
Features:
The application will not crash when upgrading from the old version, but the package name manually filled in by the user cannot be retained.
If you choose some apps, when you open the selector next time, the selected app will automatically appear at the top of the list, making it easy to uncheck.
When multiple applications have the same name, automatically add the package name as a suffix.
The change is compatible with Android 5.0 (tested in the Android emulator) and Android 11 (tested in my Xiaomi mi 10pro).