Allow overriding tunnel server protocol/domain for caBLE #295
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a
cable-override-tunnel
feature.This allows the library to override which caBLE tunnel server protocol and domain it connects to, rather than the actual tunnel server. This is useful for testing #291 (caBLE tunnel server implementation), so one can run a tunnel server locally without needing to set up DNS and certificates.
Example
To act as an initiator overriding the tunnel server to be at
ws://localhost:8080
:To act as an authenticator in the same way:
cargo run \ --example cable_tunnel \ --features cable,cable-override-tunnel \ -- \ --serial-port /dev/tty.usbmodem \ --softtoken-path /tmp/softtoken.dat \ --qr-image ~/Desktop/screenshot.png \ --tunnel-uri ws://localhost:8080
Changes
Related fixing (which blocked this change):
doctest
for features that are enabledPublic API changes:
share_cable_authenticator()
's parameters changed:options: ShareCableAuthenticatorOptions
parametertunnel_server_id
argument moved toShareCableAuthenticatorOptions
close_after_one_command
argument inverted tostay_open_after_one_command
, and moved toShareCableAuthenticatorOptions
tunnel_uri
field toShareCableAuthenticatorOptions
Added
connect_cable_authenticator_with_tunnel_uri
method for new feature.This will probably be changed to use a
ConnectCableAuthenticatorOptions
struct likeShareCableAuthenticatorOptions
once there's something else to put in there.Internal API changes:
Eid::get_domain
replaced withEid::get_domain_builder
Eid::get_connect_uri
now (internally) publicEid::build_connect_uri
(internally public)Discovery::build_new_tunnel_uri
(internally public)Discovery::get_connect_uri
removed (useEid::get_connect_uri
instead)uri
parameter toTunnel::connect_authenticator