From: Oliver Fuhrer <oliver.fuhrer@bluewin.ch>
To: development@lists.ipfire.org
Subject: RE: [PATCH v2] BUG 11696: VPN Subnets missing from wpad.dat
Date: Mon, 20 May 2019 17:31:02 +0200 [thread overview]
Message-ID: <000801d50f21$09225500$1b66ff00$@bluewin.ch> (raw)
In-Reply-To: <27AEAAD6-4514-4857-AFC1-EF174793ABFC@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 2592 bytes --]
Hi Michael,
You're welcome.
I have been poking around in vpnmain.cgi and ovpnmain.cgi to automatically update the wpad.dat file upon tunnel add/delete/enable/disable.
Should I send this one as feature?
Regards
Oliver
>
> Hi,
>
> Thank you for rebasing this patch. It applies and is merged!
>
> -Michael
>
> > On 19 May 2019, at 14:30, Oliver Fuhrer <oliver.fuhrer(a)bluewin.ch> wrote:
> >
> > This patch fixes the behavior in 11696 and adds IPSEC and OpenVPN n2n
> subnets to wpad.dat so they don't pass through the proxy.
> > ---
> > Hi List,
> > New version of the patch, this one has been created against next branch
> and successfully tested on a fresh build.
> >
> > Regards
> > Oliver
> >
> > html/cgi-bin/proxy.cgi | 25 +++++++++++++++++++++++++
> > 1 file changed, 25 insertions(+)
> >
> > diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi
> > index 91e4fce..b639640 100644
> > --- a/html/cgi-bin/proxy.cgi
> > +++ b/html/cgi-bin/proxy.cgi
> > @@ -2848,6 +2848,10 @@ sub write_acls
> >
> > sub writepacfile
> > {
> > + my %vpnconfig=();
> > + my %ovpnconfig=();
> > + &General::readhasharray("${General::swroot}/vpn/config",
> \%vpnconfig);
> > + &General::readhasharray("${General::swroot}/ovpn/ovpnconfig",
> \%ovpnconfig);
> > open(FILE, ">/srv/web/ipfire/html/proxy.pac");
> > flock(FILE, 2);
> > print FILE "function FindProxyForURL(url, host)\n";
> > @@ -2910,6 +2914,27 @@ END
> > }
> > }
> >
> > + foreach my $key (sort { uc($vpnconfig{$a}[1]) cmp
> uc($vpnconfig{$b}[1]) } keys %vpnconfig) {
> > + if ($vpnconfig{$key}[0] eq 'on' && $vpnconfig{$key}[3] ne
> 'host') {
> > + my @networks = split(/\|/, $vpnconfig{$key}[11]);
> > + foreach my $network (@networks) {
> > + my ($vpnip, $vpnsub) = split("/", $network);
> > + $vpnsub =
> &Network::convert_prefix2netmask($vpnsub) || $vpnsub;
> > + print FILE " (isInNet(host, \"$vpnip\",
> \"$vpnsub\")) ||\n";
> > + }
> > + }
> > + }
> > +
> > + foreach my $key (sort { uc($ovpnconfig{$a}[1]) cmp
> uc($ovpnconfig{$b}[1]) } keys %ovpnconfig) {
> > + if ($ovpnconfig{$key}[0] eq 'on' && $ovpnconfig{$key}[3] ne
> 'host') {
> > + my @networks = split(/\|/, $ovpnconfig{$key}[11]);
> > + foreach my $network (@networks) {
> > + my ($vpnip, $vpnsub) = split("/", $network);
> > + print FILE " (isInNet(host, \"$vpnip\",
> \"$vpnsub\")) ||\n";
> > + }
> > + }
> > + }
> > +
> > print FILE <<END
> > (isInNet(host, "169.254.0.0", "255.255.0.0"))
> > )
> > --
> > 1.8.3.1
> >
next prev parent reply other threads:[~2019-05-20 15:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-19 13:30 Oliver Fuhrer
2019-05-20 9:41 ` Michael Tremer
2019-05-20 15:31 ` Oliver Fuhrer [this message]
2019-05-20 21:48 ` Michael Tremer
2019-05-22 19:52 ` Oliver Fuhrer
2019-05-23 8:27 ` Michael Tremer
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='000801d50f21$09225500$1b66ff00$@bluewin.ch' \
--to=oliver.fuhrer@bluewin.ch \
--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