Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VRS: fix nearby stations #30

Closed
alexander-albers opened this issue Jul 29, 2021 · 1 comment
Closed

VRS: fix nearby stations #30

alexander-albers opened this issue Jul 29, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@alexander-albers
Copy link
Owner

alexander-albers commented Jul 29, 2021

It seems like the departures query is broken. The VRS server merely returns an error response, see the following sample query:

http://android.vrsinfo.de/index.php?eID=tx_vrsinfo_ass2_timetable&r=50.946398,6.956496&s=10

{
    "error": "Keine gültige ID"
}

The iOS app uses the eID=tx_ekap_here instead, so I am planning to switch to this endpoint instead.

@alexander-albers alexander-albers added the bug Something isn't working label Jul 29, 2021
@alexander-albers alexander-albers self-assigned this Aug 1, 2021
@alexander-albers alexander-albers changed the title VRS: fix nearby departures VRS: fix departures Sep 9, 2021
@alexander-albers
Copy link
Owner Author

alexander-albers commented Sep 9, 2021

I think I finally figured this one out. The following only applies to the https endpoint. However this does not fix the underlying issue where the tx_vrsinfo_ass2_timetable path cannot be used anymore for coord requests.

The iOS app accesses ekapapp.vrsinfo.de instead of android.vrsinfo.de. The app also makes requests to tx_vrsinfo_ass2_timetable, so this endpoint should be still active. The interesting part is that a http request to tx_vrsinfo_ass2_timetable does not work and returns "no valid id" (see original comment). So we have to use https, which brings us to another problem: ERR_BAD_SSL_CLIENT_AUTH_CERT .

https requests to ekapapp.vrsinfo.de require a client certificate. I found the certificate in the latest android app under assets/ekap-android-v2.vrs.de.pfx. But not so fast - the certificate requires a password. Thankfully, de.sidebysite.auskunftlibrary.util.EkapApiService#getSSLContext tells us where exactly we can find it - AndroidManifest.xml. Decoding the manifest using eg. apktool, we can finally extract the passcode, use it to import the cert and use the cert for the https requests and tada 🎉 - the endpoint works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant