epicenter icon indicating copy to clipboard operation
epicenter copied to clipboard

Tauri Blocks localhost:8000 for faster-whisper-server – Only Allows Port 80

Open tutorempire opened this issue 10 months ago • 2 comments

This is a follow-up to my previous issue report (#425), as I believe I've narrowed down the cause.

Issue Summary: On Windows, the Tauri framework appears to restrict outgoing API calls to certain ports. Specifically, attempting to connect to localhost:8000 fails with the error:

"url not allowed on the configured scope"

However, if I run the server on port 80 and set the server URL to either http://127.0.0.1 or http://localhost, the connection works successfully.

Likely Cause: This seems to be due to a missing configuration in the Tauri allowlist.http.scope field in tauri.conf.json. By default, it appears only port 80 is permitted for outgoing connections.

Suggested Fix: To address this issue, consider:

  1. Adding an explicit allow for all ports on localhost in the allowlist.http.scope configuration. or
  2. Dynamically adjusting the scope based on the port specified in the faster-whisper-server URL provided by the user.

Environment Details:

  • OS: Windows 11
  • Version: Whispering 6.0.0

tutorempire avatar Jan 29 '25 02:01 tutorempire

I'm quite new to servers and running docker. I'm running the faster whisper server in docker and I'm having the same issues you have. How would I modify the command to run the server on port 80?

Explosivekoala avatar Jan 31 '25 18:01 Explosivekoala

You would change --publish 8000:8000 to --publish 80:8000

This assumes nothing else is running on port 80 on your computer.

tutorempire avatar Feb 01 '25 03:02 tutorempire

Hi @tutorempire,

Sorry for the delay in responding - I've been away but I'm back now (see discussion #503).

You nailed the diagnosis! This has been fixed in Whispering v7.0.0.

The issue was indeed in the Tauri configuration - it's a known Tauri limitation documented in tauri-apps/plugins-workspace#2131. We've updated the capabilities/default.json file to allow connections to any port:

{
  "identifier": "http:default",
  "allow": [
    { "url": "http://*" },
    { "url": "https://*" },
    { "url": "http://*:*" },    // Added in v7.0.0
    { "url": "https://*:*" }     // Added in v7.0.0
  ]
}

This fix was implemented in commit 39a5611.

Additionally, we've migrated from faster-whisper-server to Speaches (its new name). To use it in v7.0.0:

  1. Download Whispering v7.0.0: https://github.com/braden-w/whispering/releases/tag/v7.0.0
  2. Install Speaches: https://speaches.ai/installation/
  3. Select Speaches in Settings → Transcription

Speaches Configuration in Whispering v7.0.0

You can now use port 8000, 5000, or any other port without restrictions.

Thanks for the excellent diagnosis - it helped us implement the right fix!

braden-w avatar Jul 07 '25 15:07 braden-w

Closing as this has been fixed in v7.0.0.

braden-w avatar Jul 07 '25 15:07 braden-w