Skip to content

Conversation

@PopcornDev1
Copy link

Summary

Adds per-context audio fingerprint and screen dimension spoofing patches. Disables WebRTC IP spoofing patch until further testing. Removes superseded screen-hijacker patch.

Changes

audio-fingerprint-manager.patch (new)

  • Creates AudioFingerprintManager.h/cpp for per-context audio fingerprint seed storage via RoverfoxStorageManager
  • Adds window.setAudioFingerprintSeed(seed) WebIDL binding
  • Hooks all 6 audio fingerprinting API methods for comprehensive protection:
    • AudioBuffer.getChannelData() - hooked in RestoreJSChannelData()
    • AudioBuffer.copyFromChannel() - hooked after copy operation
    • AnalyserNode.getFloatFrequencyData() - hooked in ProcessData lambda
    • AnalyserNode.getByteFrequencyData() - hooked via underlying buffer
    • AnalyserNode.getFloatTimeDomainData() - hooked in ProcessData lambda
    • AnalyserNode.getByteTimeDomainData() - hooked before byte conversion
  • Transformation uses 0.8% variance with non-linear polynomial component:
    • Linear base: 0.996 + normalized * 0.008
    • Polynomial twist: (normalized^2 - 0.5) * 0.002
    • Deterministic per seed, imperceptible to human hearing
  • Uses SOURCES instead of UNIFIED_SOURCES in moz.build to avoid namespace pollution (file starts with 'A', comes before BarProps.cpp in unified compilation)
  • Adds LOCAL_INCLUDES += ["/dom/base"] to dom/media/webaudio/moz.build for cross-directory header access

screen-spoofing.patch (new, replaces screen-hijacker.patch)

  • Creates ScreenDimensionManager.h/cpp for per-context screen dimension storage
  • Adds window.setScreenDimensions(width, height) and window.setScreenColorDepth(depth) WebIDL bindings
  • Hooks nsScreen::GetRect() with fallback chain:
    1. Per-context ScreenDimensionManager lookup (new)
    2. Global MaskConfig screen.width/height (carried over from screen-hijacker)
    3. Vanilla Firefox behavior
  • Hooks nsDeviceContext::GetDeviceSurfaceDimensions() for global MaskConfig override
  • Removes RDM device size check in nsMediaFeatures.cpp (prevents interference)
  • Complete superset of screen-hijacker.patch functionality

webrtc-ip-spoofing.patch.disabled (renamed)

  • Disabled until it is fully tested and stable, currently detected.

screen-hijacker.patch (deleted)

  • All functionality is now included in screen-spoofing.patch
  • No longer needed

- audio-fingerprint-manager.patch: per-context audio fingerprinting (all 6 API methods)
- screen-spoofing.patch: per-context screen dimensions with global MaskConfig fallback
- Disable webrtc-ip-spoofing.patch (will re-enable after fixing)
- Remove screen-hijacker.patch (superseded by screen-spoofing.patch)
@PopcornDev1 PopcornDev1 requested a review from icepaq February 3, 2026 07:08
@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch audio-screen-spoofing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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