From 838a186ab26d945d74f7f2bdc07edee2b62ee209 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 9 Feb 2025 18:51:22 +0100 Subject: Add PKP (and, thus, SOCKS proxy) support --- lib/Travelynx/Controller/Account.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/Travelynx/Controller/Account.pm') diff --git a/lib/Travelynx/Controller/Account.pm b/lib/Travelynx/Controller/Account.pm index 8a21ffa..1c54aec 100644 --- a/lib/Travelynx/Controller/Account.pm +++ b/lib/Travelynx/Controller/Account.pm @@ -1079,6 +1079,17 @@ sub backend_form { { $type = undef; } + + # PKP is behind a GeoIP filter. Only list it if travelynx.conf + # indicates that our IP is allowed or provides a proxy. + elsif ( + $backend->{name} eq 'PKP' + and not( $self->app->config->{hafas}{PKP}{geoip_ok} + or $self->app->config->{hafas}{PKP}{proxy} ) + ) + { + $type = undef; + } elsif ( my $s = $self->hafas->get_service( $backend->{name} ) ) { $type = 'HAFAS'; $backend->{longname} = $s->{name}; -- cgit v1.2.3