Currently we implement provider selection through the URL only. However this has the downside that for some providers that restrict some endpoints (like SNCF), we can't stop a request before executing it.
The solution
One way we could do this is move the providers info from URLs to a proper Struct, with information about which endpoints are allowed/disallowed, which will be integrated in Session via a map[string]bool (has O(1) complexity) allowing us not to waste bandwidth.
This may also allow us to have the SSL fingerprints public in those structs, though that's a question for another issue.
The problem
Currently we implement provider selection through the URL only. However this has the downside that for some providers that restrict some endpoints (like SNCF), we can't stop a request before executing it.
The solution
One way we could do this is move the providers info from URLs to a proper Struct, with information about which endpoints are allowed/disallowed, which will be integrated in
Session
via amap[string]bool
(has O(1) complexity) allowing us not to waste bandwidth.This may also allow us to have the SSL fingerprints public in those structs, though that's a question for another issue.
As always, I'm open to suggestions.