Skip to content

Conversation

@21pages
Copy link
Contributor

@21pages 21pages commented Oct 29, 2025

  • mobile wss/reqwest/https proxy use the same ClientConfig with the fallback verifier.
  • linux https proxy uses verifier with the roots of rustls-native-certs and webpki.

related pr: seanmonstar/reqwest#2849

@21pages 21pages force-pushed the mobile_platform_verifier_fallback branch from 6e69a7a to 8745e3c Compare October 30, 2025 00:45
@rustdesk rustdesk requested a review from Copilot October 30, 2025 02:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors TLS certificate verification by introducing a unified verifier module that consolidates certificate verification logic across the codebase. The changes replace platform-specific rustls_platform_verifier usage with a custom fallback verifier that tries webpki verification first and falls back to platform verification on mobile platforms.

Key changes:

  • Introduced a new verifier module with a FallbackPlatformVerifier that uses webpki roots with platform verifier as fallback
  • Simplified WebSocket connection logic by removing the select-based multi-future approach in favor of direct connection attempts
  • Updated dependency configuration to make rustls-platform-verifier mobile-only and added rustls-native-certs and webpki-roots for all non-macOS/Windows platforms

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/verifier.rs New module implementing certificate verification with webpki primary verifier and platform fallback for Android/iOS
src/websocket.rs Simplified WebSocket TLS connection logic to use unified verifier module, removing complex multi-future selection code
src/proxy.rs Updated HTTPS proxy connection to use unified verifier module instead of direct platform verifier
src/lib.rs Added verifier module declaration for non-macOS/Windows platforms and adjusted rustls_platform_verifier re-export
Cargo.toml Reorganized dependencies to make rustls-platform-verifier mobile-only and added webpki-roots and rustls-native-certs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@21pages 21pages force-pushed the mobile_platform_verifier_fallback branch 2 times, most recently from efd695c to 92fe2c8 Compare October 30, 2025 02:47
@21pages 21pages requested a review from Copilot October 30, 2025 02:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@21pages 21pages force-pushed the mobile_platform_verifier_fallback branch from 92fe2c8 to 4e9337b Compare October 30, 2025 02:53
@21pages 21pages requested a review from Copilot October 30, 2025 02:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@21pages 21pages requested a review from Copilot October 30, 2025 03:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rustdesk rustdesk requested a review from Copilot October 30, 2025 04:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@21pages 21pages force-pushed the mobile_platform_verifier_fallback branch from 4e9337b to b22d819 Compare October 30, 2025 05:03
@21pages 21pages requested a review from Copilot October 30, 2025 05:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@21pages 21pages force-pushed the mobile_platform_verifier_fallback branch from b22d819 to bbc8e2f Compare October 30, 2025 05:13
@21pages 21pages requested a review from Copilot October 30, 2025 05:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rustdesk rustdesk merged commit 1d5975e into rustdesk:main Oct 30, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants