DomiStyle / docker-tor-browser

Tor Browser (in a browser)
https://hub.docker.com/r/domistyle/tor-browser
MIT License
80 stars 23 forks source link

Synology Docker - Cannot connect to Tor #28

Closed Pureball closed 1 year ago

Pureball commented 2 years ago

Hello,

I installed this on my Mac with no issues and also on my Synology where it unfortunately cannot connect to the Tor Network. All settings so far are identical - yet I cannot figure out why one is working and the other one is not...

Here are two screenshots - the first how it looks like on Mac:

Tor Browser on Mac

The other one how it looks like on Synology: Tor Browser on Synology

I noticed the buttons "Tor Network Settings" and "Connect" completely missing from the Synology instance.

Any idea what could be the issue here?

Cheers and ty!

lawndoc commented 2 years ago

Are you running the container with the same options and environment variables on both systems? The browser window's resolution looks different between the two images.

Also can you post the output of docker logs <container name> on the Synology? Maybe there is an error or warning in the logs that might help us figure it out.

One last thing you could try is to close the tab and let the Tor Browser relaunch itself and see if it's a first-run type of issue. (Though that's still something we would want to investigate)

lawndoc commented 2 years ago

Another thing to try is to right-click the Tor Browser launch page and inspect the HTML to see if the code for the button is there or if its being hidden by some CSS issue or similar.

Pureball commented 2 years ago

Are you running the container with the same options and environment variables on both systems? The browser window's resolution looks different between the two images.

Yes - I only changed the resolution. I also changed it back to default resolution but result is the same... Other than that no variable changes whatsoever. Container received a r/w directory and the host port is different - other than that no changes.

One last thing you could try is to close the tab and let the Tor Browser relaunch itself and see if it's a first-run type of issue.

I tried closing the tabs - when I close the last tab the window is empty and I believe the container crashes (browser goes black and vnc shows it got disconnected)

Another thing to try is to right-click the Tor Browser launch page and inspect the HTML to see if the code for the button is there or if its being hidden by some CSS issue or similar.

I also thought of that one but the buttons are completely missing the div is empty.

I noticed every time something crashes the log records "got closure reason 1001".

Here are the logs: TorBrowser.html.csv remove the .csv as I exported it in html but cannot upload due to github restricitons.

One last thing - when I search for something I very briefly see this screen:

Screenshot 2022-07-08 222855

Don't know if this is of any help but many thanks for looking into it!

lawndoc commented 2 years ago

The screen you get when you search for something makes sense, because if you aren't connected to Tor then the browser shouldn't be able to do anything.

Do you have a reverse proxy like Nginx in front of the Synology container or are you just connecting directly to the Tor browser's published port? I've run into an issue before where my Nginx config didn't properly proxy the websocket functionality, and I ran into problems when trying to view the Tor browser.

Pureball commented 2 years ago

No reverse proxy installed - I'm connecting directly to the published port. Now that you say "websocket" I believe I once had a similar issue when I was installing Watchtower via GUI it wouldn't work (as I could not map var/run/docker.sock via GUI). Instead I had to install Watchtower via script. Then it worked. Could this be related to my problem? I don't see a setting where TorBrowser needs a sort of Websocket functionality though...

Besides could it maybe have anything to do with the User ID? Does it have to be root User?

lawndoc commented 2 years ago

No reverse proxy installed - I'm connecting directly to the published port.

Proxy config isn't the issue then. I asked about WebSocket because your error message got closure reason 1001 is a WebSocket error message. I believe the VNC over HTTP client uses WebSocket functionality. Now that I'm reading the docs, it looks like it would log that when the server side closes the connection (probably when you close all tabs and get the VNC disconnect).

Nothing else stands out in the container logs? Could you paste a full log in here?

Besides could it maybe have anything to do with the User ID? Does it have to be root User?

You shouldn't need elevated permissions to deploy the container.

Pureball commented 2 years ago

I'm currently away on leave and will provide the logs asap - many thanks!

lawndoc commented 2 years ago

Any errors in the Tor Browser's console messages would be helpful too

lawndoc commented 1 year ago

@Pureball any updates on this issue from your end? I still haven't been able to reproduce on my end.

We have made some updates to the base image, so please update to the latest image before testing again. I don't think those changes would be related to your issue, but a newer Tor Browser version may fix things. In your screenshot it looks like you were using 11.0.5; we are on Tor Browser 11.5.7 now.

Pureball commented 1 year ago

Hi and apologies for not coming back to you sooner - I will gladly check if this solves the issue haven't tried in a while now will let you know asap.

Pureball commented 1 year ago

Hey there somehow the new Image did the trick it's finally working! Thank you for the reminder - we can go ahead and close the issue.