0

I'm trying to stream audio over Tor and the browser doesn't seem to download any bytes from the request. The request doesn't fail or anything, it just stays at 0B downloaded.

media request doesn't progress

This is my setup:

  • VLC (on Windows) streams audio on :8081;
  • A React.js frontend (on WSL Ubuntu) is active at :3000;
  • A Tor client (on WSL Ubuntu) treats both :8081 and :3000 as hidden services, with diferent onion URLs;
  • A Tor browser (on Windows) accesses the frontend service and the frontend tries to access the streaming service using its Onion Address (it fails).

Running locally, without Tor, it works just fine:

  • VLC (on Windows) streams audio on :8081;
  • A React.js frontend (on WSL Ubuntu) is active at :3000;
  • A web browser (on Windows) accesses the frontend service and the frontend tries to access the streaming service using its localhost address (it succeeds).

Is this a routing problem or a Tor limitation? If it's a routing problem, are there any tips on how to setup Tor with WSL and Windows? If it's a Tor limitation, is there any workaround for that?

Thanks.

Update

I have been able to stream bytes by using Windows nameserver in WSL (this guide helped me to understand it better) as the IP of the streaming hidden service variable HiddenServicePort. However, now there's a codec-related problem:

codec error

I tried using multiple file formats but it didn't work. Any suggestions?

2 Answers 2

1

It was apparently a bug with VLC, which writes Content-Type: application/octet-stream in the response regardless of the file type. It worked fine on Chrome because (in contrast with Tor) it has some sort of content type auto-detection, recognizing the file as audio, even when receiving a application/octet-stream mime. I had to "enforce" audio/mp3 as the response mime in VLC settings.

0

Well, it's quite a common situation - Tor does not provide UDP transport, and many tools do rely on the fact that an external SOCKS v4 or v5 does. There're multiple options to solve not just this particular trouble - I've figured them out and used successfully:

  • Encapsulate it - and one of the best ways is HTTP 1.1 or 2. It works literally out of the box
  • Enforce TCP - some protocols do support to state at the very negotiation phase which is made over TCP - to enforce using TCP only
  • Make a port ranges - like an active FTP that is a way better than a passive one - on the server side you can specify a strict range instead of a random ephemeral one, so do this and specify the ports inside Tor config also. It helps with zero-touching provisioning on the client side

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.