|
|
|
@ -136,7 +136,7 @@ open class IPNService : VpnService(), libtailscale.IPNService {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
b.addAllowedApplication(name)
|
|
|
|
b.addAllowedApplication(name)
|
|
|
|
} catch (e: PackageManager.NameNotFoundException) {
|
|
|
|
} catch (e: PackageManager.NameNotFoundException) {
|
|
|
|
TSLog.d(TAG, "Failed to add allowed application: $e")
|
|
|
|
TSLog.e(TAG, "Failed to add allowed application: $e")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -144,7 +144,7 @@ open class IPNService : VpnService(), libtailscale.IPNService {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
b.addDisallowedApplication(name)
|
|
|
|
b.addDisallowedApplication(name)
|
|
|
|
} catch (e: PackageManager.NameNotFoundException) {
|
|
|
|
} catch (e: PackageManager.NameNotFoundException) {
|
|
|
|
TSLog.d(TAG, "Failed to add disallowed application: $e")
|
|
|
|
TSLog.e(TAG, "Failed to add disallowed application: $e")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -189,7 +189,7 @@ open class IPNService : VpnService(), libtailscale.IPNService {
|
|
|
|
if (allowPackages) {
|
|
|
|
if (allowPackages) {
|
|
|
|
// There always needs to be at least one allowed application for the VPN service to filter the
|
|
|
|
// There always needs to be at least one allowed application for the VPN service to filter the
|
|
|
|
// traffic so add our own application by default to fulfill that requirement
|
|
|
|
// traffic so add our own application by default to fulfill that requirement
|
|
|
|
packagesList += "com.tailscale.ipn"
|
|
|
|
packagesList += BuildConfig.APPLICATION_ID
|
|
|
|
|
|
|
|
|
|
|
|
for (packageName in packagesList) {
|
|
|
|
for (packageName in packagesList) {
|
|
|
|
TSLog.d(TAG, "Including app: $packageName")
|
|
|
|
TSLog.d(TAG, "Including app: $packageName")
|
|
|
|
|