Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starts a Tor hidden service regardless of flags or Config options. #370

Closed
Jay4242 opened this issue Apr 16, 2023 · 6 comments · Fixed by #372
Closed

Starts a Tor hidden service regardless of flags or Config options. #370

Jay4242 opened this issue Apr 16, 2023 · 6 comments · Fixed by #372
Labels
enhancement New feature or request go Pull requests that update Go code

Comments

@Jay4242
Copy link

Jay4242 commented Apr 16, 2023

Bug Report

Current Behavior
wayback -d web is starting a tor hidden service regardless of the tor settings in the config or flags when running the program.

starting and registering onion service, please wait a bit

Expected behavior/code
To not start the tor hidden service when WAYBACK_USE_TOR=false is set, or --tor isn't used on the command.

Environment

  • Wayback version(s): v0.19.1
  • Golang version: go1.20.3
  • OS: Ubuntu 22.04.2

Possible Solution

Additional context/Screenshots

While tor is great, I don't necessarily want to run this as a hidden service.

I think I only didn't notice this with the snap version (tried go install version and then the .deb version) because snaps are snaps and probably couldn't see my tor install.

@waybackarchiver
Copy link
Contributor

There was a misunderstanding earlier. To specify whether to route wayback traffic through Tor, use WAYBACK_USE_TOR or --tor. Unfortunately, there is currently no solution to disable the Tor service, but we may consider adding support for it in the future.

@waybackarchiver waybackarchiver added enhancement New feature or request go Pull requests that update Go code labels Apr 16, 2023
@Jay4242
Copy link
Author

Jay4242 commented Apr 16, 2023

Ah, okay. That makes sense, going through tor is a neat option.

I think changing https://github.com/wabarc/wayback/blob/main/service/httpd/tor.go#L94 to false gives me the desired results on my end then.

Would there be any plans to support other proxies/ports?

Thanks.

@waybackarchiver
Copy link
Contributor

Of course, there will be an option here to disable the Tor hidden service.

@waybackarchiver
Copy link
Contributor

waybackarchiver commented Apr 17, 2023

@Jay4242 To disable the onion service, just set the WAYBACK_ONION_DISABLED=true environment variable.

@Flightkick
Copy link

@waybackarchiver This doesn't seem to work in Docker webarc/wayback:latest sha256:9bc0d0ff7e1726ba6f2b924aaa864b824cd4b2b36d6648c09409e667e534cbd3.

Exec into the container to check the variable value:

docker-compose exec wayback /bin/sh
/wayback # echo $WAYBACK_ONION_DISABLED
true

Checking the logs:

wayback-wayback-1  | [2023-07-05TXX:XX:XX] [INFO] [httpd.go:63:Serve] starting and registering onion service, please wait a bit...
wayback-wayback-1  | [2023-07-05TXX:XX:XX] [INFO] [httpd.go:75:Serve] start a tor hidden server
wayback-wayback-1  | [2023-07-05TXX:XX:XX] [INFO] [tor.go:32:startTorServer] important to keep the private key: XXXXX

@ghost
Copy link

ghost commented Jul 20, 2023

The latest tag does not seem to contain the changes, you should use edge instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants