summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Account.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-02-09 18:51:22 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-02-09 18:51:22 +0100
commit838a186ab26d945d74f7f2bdc07edee2b62ee209 (patch)
treebf4a9149aca959df2596828c3f64a632b9486afe /lib/Travelynx/Controller/Account.pm
parent99cb6a7e22b3ee2de4551355ed24efb1a0b5b01a (diff)
Add PKP (and, thus, SOCKS proxy) support
Diffstat (limited to 'lib/Travelynx/Controller/Account.pm')
-rw-r--r--lib/Travelynx/Controller/Account.pm11
1 files changed, 11 insertions, 0 deletions
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};