openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
3.88k stars 3.4k forks source link

vpnbypass read config ip from file #12278

Open muhammad-naderi opened 4 years ago

muhammad-naderi commented 4 years ago

Hello,

Great job here, thanks!

Just wanted to know is there a way to pass a list of ip/ranges to /etc/config/vpnbypass to get bypassed from another file. reason is I need to bypass like 11M IP addresses (local country ips, downloaded from https://www.nirsoft.net/countryip/ir.html) and leave all my international ips to go through vpn

thanks in advance

jamesmacwhite commented 4 years ago

Potentially you would be looking at something like ipset to do this, you'd need to be able to ingest the IP addresses (probably best as ranges) and then load them into an ipset chain as hash:net which you can then use to conditionally route. However you'd have to be careful with the memory for the amount of ranges.