Page 1 of 1

Huge amount of customized routes break the VPN client pro

Posted: Mon Sep 23, 2019 8:12 am
by haohaolee
Hi,

I need set up customized routes to achieved split tunneling, but it seems the number of my routes is too large.
The problematic routes file is attached.

By the way, an approach to clean all the routes is needed much as well, it is nearly impossible for me to delete thousands of routes one by one

Best regards,
Hao

Re: Huge amount of customized routes break the VPN client pro

Posted: Mon Sep 23, 2019 4:10 pm
by admin
Hi,

unfortunately Android VPNService doesn't support the exclusion of the routes, so the app implement this feature with a recursive algorithm that must calculate the whole subnets except the excluded one.
This workaround must done a lot of work for each excluded route and so can be used only for a limited number of routes (the limit is related to the speed of the processor).
Your file conatins about 8500 exluded routes, and so the algorithm take a very long time to calculate the result.

Anyway I will think to a new option to delete all routes.

Re: Huge amount of customized routes break the VPN client pro

Posted: Tue Sep 24, 2019 7:46 am
by haohaolee
How about the other way around, use include routes but choose default gateway not VPN gateway?

Is that doable?

Re: Huge amount of customized routes break the VPN client pro

Posted: Tue Sep 24, 2019 5:31 pm
by admin
The gateway workaround could work only with OpenVPN TAP configuration.

Re: Huge amount of customized routes break the VPN client pro

Posted: Wed Sep 25, 2019 2:17 pm
by haohaolee
Could I get the algorithm to calculate the whole subnet excepts the excluded ones so I can preprocess the excluded routes into included ones?
or maybe worth processing that once and cache the result for next time connection

Re: Huge amount of customized routes break the VPN client pro

Posted: Fri Sep 27, 2019 5:18 pm
by admin
I made some tests about it...
The resulting routing table contains more than 10500 routes, but the app is not designed to handle this huge number of routes.
Moreover, this amount of routes would slow down the VPN considerably.