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

feat(mobile): query DNS SVCB/HTTPS records #15029

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

Conversation

Jackie264
Copy link

@Jackie264 Jackie264 commented Jan 2, 2025

Use Dart-Basic-Utils for SRV record lookup
This PR replaces the manual DNS query implementation with the Dart-Basic-Utils library.
Key reasons for the change:
• Avoids maintaining a custom DNS query logic.
• Leverages a reliable third-party library that supports various DNS record types (e.g., SRV).
• Simplifies the codebase and improves maintainability.

Closes #14938

Resolves the server endpoint and sets the base path for the API client.

If DNS resolution fails, it falls back to the original server URL.
Logs the resolution process for debugging.
This PR replaces the manual DNS query implementation with the Dart-Basic-Utils library.
Key reasons for the change:
	•	Avoids maintaining a custom DNS query logic.
	•	Leverages a reliable third-party library that supports various DNS record types (e.g., SRV).
	•	Simplifies the codebase and improves maintainability.
import dns_query_service.dart;
Create DnsQueryService instance;
Resolve and set the API endpoint, with SRV record lookup based on domain
@mmomjian
Copy link
Contributor

mmomjian commented Jan 2, 2025

Hello,

Can you please describe how this PR has been tested? The majority of our users use a "normal" public facing domain with a reverse proxy on port 443, how will the SRV implementation affect that? Has it been tested with this standard setup? I see a lot of WARNING and SEVERE logs that seem like they might trigger for people who are not using this relatively niche feature. Thanks for your PR!

@alextran1502 alextran1502 changed the title fix-14938 feat(mobile): query DNS SVCB/HTTPS records Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants