From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH] proxy: Skip VPNs that route everything for proxy.pac
Date: Fri, 24 Mar 2023 15:49:22 +0000 [thread overview]
Message-ID: <20230324154922.276520-1-michael.tremer@ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]
The function tries to figure out which networks are connected locally,
but VPN tunnels that use 0.0.0.0 and GRE/VTI interfaces will be
considered local and the proxy is being disabled for everyone.
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
html/cgi-bin/proxy.cgi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi
index a718d5771..71be315f6 100644
--- a/html/cgi-bin/proxy.cgi
+++ b/html/cgi-bin/proxy.cgi
@@ -2986,6 +2986,7 @@ END
foreach my $network (@networks) {
my ($vpnip, $vpnsub) = split("/", $network);
$vpnsub = &Network::convert_prefix2netmask($vpnsub) || $vpnsub;
+ next if ($vpnip eq "0.0.0.0" || $vpnsub eq "0.0.0.0");
print FILE " (isInNet(host, \"$vpnip\", \"$vpnsub\")) ||\n";
}
}
@@ -2996,6 +2997,8 @@ END
my @networks = split(/\|/, $ovpnconfig{$key}[11]);
foreach my $network (@networks) {
my ($vpnip, $vpnsub) = split("/", $network);
+ $vpnsub = &Network::convert_prefix2netmask($vpnsub) || $vpnsub;
+ next if ($vpnip eq "0.0.0.0" || $vpnsub eq "0.0.0.0");
print FILE " (isInNet(host, \"$vpnip\", \"$vpnsub\")) ||\n";
}
}
--
2.30.2
reply other threads:[~2023-03-24 15:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230324154922.276520-1-michael.tremer@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox