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

Implement getrelays using mullvad api #7852

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rablador
Copy link
Contributor

@rablador rablador commented Mar 20, 2025

Why this needs to be done

getRelays call should use the mullvad-api client, without replacing existing implementation.

What needs to be done

The API proxy should be implemented using mullvad-api, allowing us to move to the new implementation without removing the old code. For fetching the relay list, the swift side needs to obtain an etag and then also pass the etag to rust again, so that the etag can be used when requesting a new relay list.

Duplicate methods in the APIQuerying interface should also be removed.

Acceptance criteria

There is an APIProxy implementation that uses mullvad-api.


This change is Reviewable

@rablador rablador added the iOS Issues related to iOS label Mar 20, 2025
@rablador rablador self-assigned this Mar 20, 2025
Copy link

linear bot commented Mar 20, 2025

Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test, replace:

REST.APIProxy(configuration: configuration)

with:

MullvadAPIProxy(
    transportProvider: configuration.apiTransportProvider,
    dispatchQueue: DispatchQueue(label: "MullvadAPIProxy.dispatchQueue"),
    responseDecoder: Coding.makeJSONDecoder()
)

in ProxyFactory.createAPIProxy().

Reviewable status: 0 of 18 files reviewed, all discussions resolved

@rablador rablador force-pushed the implement-getrelays-using-mullvad-api-ios-1133 branch 6 times, most recently from 683ae84 to 6d4e6c7 Compare March 20, 2025 14:42
@rablador rablador force-pushed the implement-getrelays-using-mullvad-api-ios-1133 branch from 6d4e6c7 to 0cc6197 Compare March 20, 2025 14:55
@rablador rablador force-pushed the implement-getrelays-using-mullvad-api-ios-1133 branch from 0cc6197 to 7b5d435 Compare March 20, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issues related to iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant