#Rust code for bypassing url origin in Windows for videos

17 messages · Page 1 of 1 (latest)

brave hill
#

Well, so I got this huge error (file 1) with the code below (file 2) when trying to change my origin to watch 3rd sources videos without having the localhost classic error.

Thread: https://github.com/tauri-apps/tauri/discussions/4912

GitHub

How do I set in the Tauri app a Origin for a window? I tried this, but still origin is my local address and not my set address. And it needs to set Origin to connect to an external WebSocket via Re...

#

Tauri info:

[✔] Environment
    - OS: Windows 10.0.26100 x86_64 (X64)
    ✔ WebView2: 137.0.3296.68
    ✔ MSVC:
        - Visual Studio Build Tools 2017
        - Visual Studio Build Tools 2022
    ✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
    ✔ cargo: 1.87.0 (99624be96 2025-05-06)
    ✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 22.13.1
    - yarn: 1.22.22
    - npm: 10.9.2
    - bun: 1.2.14

[-] Packages
    - tauri :crab:: 2.5.1
    - tauri-build :crab:: 2.2.0
    - wry :crab:: 0.51.2
    - tao :crab:: 0.33.0
    - @tauri-apps/api : 2.5.0
    - @tauri-apps/cli : 2.5.0

[-] Plugins
    - tauri-plugin-process :crab:: 2.2.1
    - @tauri-apps/plugin-process : 2.2.1
    - tauri-plugin-store :crab:: 2.2.0
    - @tauri-apps/plugin-store : 2.1.0 (outdated, latest: 2.2.0)
    - tauri-plugin-window-state :crab:: 2.2.2
    - @tauri-apps/plugin-window-state : 2.2.2
    - tauri-plugin-single-instance :crab:: 2.2.4
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-os :crab:: 2.2.1
    - @tauri-apps/plugin-os : 2.2.1
    - tauri-plugin-http :crab:: 2.4.4
    - @tauri-apps/plugin-http : 2.4.3 
``` 1/2
#
(outdated, latest: 2.4.4)
    - tauri-plugin-autostart :crab:: 2.3.0
    - @tauri-apps/plugin-autostart : 2.3.0
    - tauri-plugin-sql :crab:: 2.2.0
    - @tauri-apps/plugin-sql : 2.2.0
    - tauri-plugin-dialog :crab:: 2.2.2
    - @tauri-apps/plugin-dialog : 2.2.1 (outdated, latest: 2.2.2)
    - tauri-plugin-global-shortcut :crab:: 2.2.1
    - @tauri-apps/plugin-global-shortcut : 2.2.0 (outdated, latest: 2.2.1)
    - tauri-plugin-notification :crab:: 2.2.2
    - @tauri-apps/plugin-notification : 2.0.0 (outdated, latest: 2.2.2)
    - tauri-plugin-fs :crab:: 2.3.0
    - @tauri-apps/plugin-fs : 2.2.1 (outdated, latest: 2.3.0)
    - tauri-plugin-log :crab:: 2.4.0
    - @tauri-apps/plugin-log : 2.0.2 (outdated, latest: 2.4.0)
    - tauri-plugin-shell :crab:: 2.2.1
    - @tauri-apps/plugin-shell : 2.2.1
    - tauri-plugin-cli :crab:: 2.2.0
    - @tauri-apps/plugin-cli : 2.2.0
    - tauri-plugin-updater :crab:: 2.7.1
    - @tauri-apps/plugin-updater : 2.7.1

[-] App
    - build-type: bundle
    - CSP: http://asset.localhost
    - frontendDist: ../build
    - devUrl: http://localhost:5174/
    - framework: Svelte
    - bundler: Vite
``` 2/2
#

@karmic tendon sorry to bother but i was trying what u indicated and I'm too young to make this work :/

tired pelican
polar anvil
#

It's just what I do, not sure if there's another way.

brave hill
karmic tendon
#

most of the errors there are a version mismatchi think. your windows and webview2-com crate versions must match what's used in tauri.
for tauri 2.5.1 that's windows 0.61 and webview2-com 0.37

brave hill
#

currently code with updated libs (not working but it builds lol)

brave hill
karmic tendon
#

or well, i guess you could try to change the example to pull the required bytes from the server

#

so that the custom protocol is basically a proxy