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

UDP []: Operation not permitted if app is not unrestricted (battery) #1657

Open
Zocker1999NET opened this issue Oct 19, 2023 · 0 comments
Open

Comments

@Zocker1999NET
Copy link

General information

  1. Android Version: 13
  2. Custom ROM: LineageOS with microG
  3. Device: Fairphone 4
  4. Version of the app (version number/play store version/self-built): 0.7.49, F-Droid

Description of the issue

TL;DR: #472 (comment)

OpenVPN for Android was not able to connect to the OpenVPN server of my university after an upgrade of LineageOS with microG (from 20-20230908-microG-FP4 to 20-20231008-microG-FP4). The issue was similar to the one in the referenced issue. So I did the following steps to (try to) mitigate it:

  • App info: kill the app
  • retry VPN -> fails again
  • kill app again
  • App info -> App battery usage: set to “unrestricted” (was “optimized” before, which worked without any issue)
  • retry VPN -> now works 🎉
  • (reproducing for logs) kill app again
  • App battery usage: set back to ”optimized”
  • retry VPN -> now works as well 🤔

This happened for me in work mode. As I couldn’t reproduce the issue, I didn’t tried in “non-work” mode.

Proposed Workaround

It took some time for me to debug this issue. To mitigate this for others in the future as well, maybe introduce a single-time warning for this specific issue that changing the App battery usage could help.

(If there is already one in general, I would still add a second one for when this issue arises. Mostly because it worked for me for the past 8 months with at least 8 similar upgrades without any issue.)

Maybe this is an issue of AOSP as the app was registered & allowed as a VPN service with always-on enabled. However, I’m not that into Android APIs to evaluate that.

Log (if applicable)

(couldn’t reproduce the issue)

Configuration file

config file
# Config for OpenVPN 2.x
# Enables connection to GUI
management /data/user/10/de.blinkt.openvpn/cache/mgmtsocket unix
management-client
management-query-passwords
management-hold

setenv IV_GUI_VER "de.blinkt.openvpn 0.7.49" 
setenv IV_SSO openurl,webauth,crtext
setenv IV_PLAT_VER "33 13 arm64-v8a Fairphone FP4 FP4"
setenv IV_HWADDR <censored>
tls-cert-profile preferred
machine-readable-output
allow-recursive-routing
ifconfig-nowarn
client
verb 4
connect-retry 3 300
resolv-retry 60
dev tun
remote 2a00:1398:0:4::7:6 1194 udp
remote 141.52.226.101 1194 udp
remote 2a00:1398:0:4::7:8 443 tcp-client
remote 141.52.226.103 443 tcp-client
auth-user-pass
<ca>
-----BEGIN CERTIFICATE-----
MIIFmDCCA4CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJERTEq
MCgGA1UECgwhS2FybHNydWhlIEluc3RpdHV0ZSBvZiBUZWNobm9sb2d5MSIwIAYD
VQQDDBlLSVQgU0NDIEluZnJhc3RydWN0dXJlIENBMB4XDTIyMDQyNzEyMTQxOFoX
DTQyMDQyMjEyMTQxOFowXTELMAkGA1UEBhMCREUxKjAoBgNVBAoMIUthcmxzcnVo
ZSBJbnN0aXR1dGUgb2YgVGVjaG5vbG9neTEiMCAGA1UEAwwZS0lUIFNDQyBJbmZy
YXN0cnVjdHVyZSBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANhZ
pGNUERpGZQ8QjpiYCxWFOwkobOlhNHIBBJI4ppJSuztHbr1zEZs/ckBcDJZYekGU
hVZRJTuSSgOr33hCDE3W91wgTr9DPGj0pYpoCQNq7302vqBiZG+0B4YwlBkdQOSA
NbbAQi93uiNJB3yWEWBuyOi6KCkcDHGbxUMN2zlYItAZnNbAQXhCBO0ZOu850SZW
BW3R0whU1oBxmjHJX++KSd6BctaUF51/+YhUkdrvHS/2BltR7v6WkZWLHeVLhma9
vYLvkUpGFO7j2AfySZkP2K9mg1iivVE0DGD7uF4zmE6qveWjk0u0mN4vLIIXD/dn
7Xf5ik+xJquiboAFotKiKtryq8Ikzwe7BRcbuPzxOsflvRlXlbWZ+vGnsSCw49E/
Ia72UrdHYlRwzQRhwxaWAEECqpKgosohc/AnVEHX+i18W+RKt4uu6/qt39CTQBT4
Dr7HCPY6HedWheVyNfGZ+9lgJ2WcgPzooBLggsxeLXEfAQF5g0MYP0MNuQQfC7RD
QB6HYbYh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0.0.0.0 vpn_gateway
nobind
verify-x509-name ovpn.scc.kit.edu name
persist-tun
# persist-tun also enables pre resolving to avoid DNS resolve problem
preresolve
# Use system proxy setting
management-query-proxy
# Custom configuration options
# You are on your on own here :)
# These options found in the config file do not map to config settings:
server-poll-timeout 5 
tls-version-min 1.3 

(original source is here)

PS

Thanks for making this app ❤️. It helps me to implement my “always-VPN lifestyle”.

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

No branches or pull requests

1 participant