Commit Graph

9 Commits

Author SHA1 Message Date
Stan Grishin 70039d4e52 pbr: bugfix: create IPv6 routes
* add missing space in str_contains
* unquote variable to make sure IPv6 rotues are added
* add IPv6 routes display to status output in nft mode

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 643e501c8d)
2023-05-11 23:09:38 +00:00
Stan Grishin 9a87df7dd1 pbr: ipv6 & migration bugfixes
* suppress RTNETLINK errors when inserting ipv6 routes
* only display global scope IPv6 gateways in status/WebUI
* stop and disable vpn-policy-routing when migrating

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit c2739705b9)
2023-05-05 01:52:18 +00:00
Stan Grishin 3492a48b02 pbr: update to 1.1.1-1
*** MAKEFILE ***
* remove libubus dependency as it was causing issues
  https://forum.openwrt.org/t/policy-based-routing-pbr-package-discussion/140639/318
* move firewall hotplug directory/file creation out of default section into
  pbr and pbr-iptables packages sections in preparation for dropping it from pbr
* fix no new line after output when uninstalling packages

*** UCI-DEFAULTS ***
* only add firewall include to firewall config if the include file exists
* add shellcheck exception to netifd uci-defaults file

*** SCRIPTS ***
* more informative logging for firewall and iface hotplug scripts
* more informative logging for firewall include script

*** SERVICE ***
* introduce lock-file to prevent package starting on external events if it hasn't
  been auto- or manually started before
* use the `ip`, not `ip-full` command to prevent errors on OpenWrt 21.02
* parse firewall WAN zone to append list of interfaces
* append error and warning "arrays" with new messages
* used shared memory to store the service output/logging messages
* improve is_ovpn function to filter out false positives when interface names started
  with `tun`
* introduce is_valid_ovpn to find OpenVPN tunnels where the device name in OpenVPN config
  matches the device name in network config
* introduce opkg_get_version to compare versions of principal and luci packages
* better code to obtain AdGuardHome version with betas installed
* optimize code and add better logging for errors when inserting policies with iptables
* optimize code and add better logging for errors when inserting policies with nft
* bugfix: insert policies in all specified protocols
* bugfix: support using physical devices in policies in nft mode
* bugfix: use iptPrefix, not nftPrefix in iptables commands
* implement Tor support in nft mode
* bugfix: fix spelling for User File Syntax error
* restart service fully (instead of quick reload) for OpenVPN interface events, as
  the order/number of supported interfaces
* more verbose output (showing handles) of status in nft mode
* improve `icmp_interface`, `ignored_interface`, `supported_interface` validation
  regexes
* improve `interface`, validation regex

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit cdfff4a693)
2023-05-01 01:16:41 +00:00
Stan Grishin 0804660644 pbr: bugfix: fix is_domain()
* fixes https://github.com/openwrt/packages/issues/20352

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit e7e4a013be)
2023-01-22 23:15:34 +00:00
Stan Grishin 9e9eb82405 pbr: update to 1.0.1-14
* improve install/uninstall messages
* fix ips add command
* add boot() to init file

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit f4f899f6f9)
2023-01-17 00:50:49 +00:00
Stan Grishin 1478867e58 pbr: bugfix: Makefile, rt_tables fix
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit edbcb97b78)
2022-12-22 21:31:47 +00:00
Stan Grishin 8e9b85daf0 pbr: update to 1.0.1-1
* add more error/warning messages
* better return statements from ips/nftset functions
* better error/warning handling when inserting policies
* comment out unnecessary nft set/ipst clean ups
* shellchecked status functions

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 5bec4a2541)
2022-12-19 19:20:04 +00:00
Stan Grishin c6ac63b5c0 pbr: detect missing iptables
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit a86985879f)
2022-12-12 02:54:53 +00:00
Stan Grishin b90c80aae4 pbr: initial commit
* The makefile produces the nft and iptables capable `pbr` package
  and the `pbr-iptables` package for legacy setups
* This replaces `vpnbypass` and `vpn-policy-routing` packages
* I'm soliciting feedback on this package and my intention is to
  update the version to 1.0.0 before this is merged, but I need the
  feedback on this and luci-app-pbr before then.

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 47eca64cb8)
2022-12-03 02:38:02 +00:00