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

Not compatible with Raspberry Pi #8

Open
Laserlicht opened this issue Oct 10, 2018 · 15 comments
Open

Not compatible with Raspberry Pi #8

Laserlicht opened this issue Oct 10, 2018 · 15 comments

Comments

@Laserlicht
Copy link

sudo docker logs tor_socks_proxy
returns
standard_init_linux.go:190: exec user process caused "exec format error"

@PeterDaveHello PeterDaveHello self-assigned this Oct 25, 2018
@PeterDaveHello
Copy link
Owner

Docker Hub haven't support arm arch for automated builds, currently, so we'll need to have a separated Docker Hub Repository for that, and build the image with other platforms, I'm not sure how many Raspberry Pi users need the arm build of this repository, +1 on this issue if you're a Raspberry Pi or other arm platform users need this.

@PeterDaveHello PeterDaveHello removed their assignment Oct 25, 2018
@PeterDaveHello
Copy link
Owner

PeterDaveHello commented Jul 28, 2019

Looks like currently not so many Raspberry Pi users here, so I may not manually build images for it and manually upload to Docker Hub, but keep waiting for more convenient or official ways.

If you'd like to use it on Raspberry Pi currently, I suggest you to build it locally, just need a very tiny patch of the Dockerfile. Assume you are using Raspberry Pi 2+, add arm32v7/ prefix to the FROM command, like this:

-FROM alpine:3.10
+FROM arm32v7/alpine:3.10

Now you can build it as normal, for example:

docker build -t tor-socks-proxy:local-arm32v7 .

You should replace arm32v7 with arm32v6 if you're using Raspberry Pi 1, or replace it with arm64v8 if you're running an ARM64 operating system on Raspberry Pi 3+, it should work.

@hacker-h
Copy link

hacker-h commented Feb 3, 2020

As docker/hub-feedback#1261 has been fixed it is now possible to do automatically build for ARM on Docker Hub.

@PeterDaveHello
Copy link
Owner

@hacker-h thanks! I'll take a look.

@b1oki
Copy link

b1oki commented Feb 16, 2020

replace it with arm64v8 if you're running an ARM64 operating system on Raspberry Pi 3+, it should work

For me works only arm32v7, but I write alpine:latest
Awesome, works with two commands, execute on Pi:

docker build https://github.com/b1oki/tor-socks-proxy.git#master -t tor-socks-proxy:local-arm32v7
docker run -d --restart=always --name tor-socks-proxy -p 127.0.0.1:9150:9150 tor-socks-proxy:local-arm32v7

@b1oki
Copy link

b1oki commented Oct 23, 2020

After upgrade Raspbian

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 10 (buster)
Release:	10
Codename:	buster
$ uname -a
Linux raspberrypi 5.4.72-v7+ armv7l GNU/Linux

$ docker build --no-cache https://github.com/b1oki/tor-socks-proxy.git#arm -t tor-socks-proxy:local-arm32v7

Step 10/14 : RUN tor --version
 ---> Running in 8d09cdebcc32
Error relocating /usr/bin/tor: __localtime64_r: symbol not found
Error relocating /usr/bin/tor: __mktime64: symbol not found
Error relocating /usr/bin/tor: __stat_time64: symbol not found
Error relocating /usr/bin/tor: __fstat_time64: symbol not found
Error relocating /usr/bin/tor: __gettimeofday_time64: symbol not found
Error relocating /usr/bin/tor: __utime64: symbol not found
Error relocating /usr/bin/tor: __clock_gettime64: symbol not found
Error relocating /usr/bin/tor: __gmtime64_r: symbol not found
Error relocating /usr/bin/tor: __time64: symbol not found
Error relocating /usr/bin/tor: __pthread_cond_timedwait_time64: symbol not found
The command '/bin/sh -c tor --version' returned a non-zero code: 127

Problem with tor@edge, so I remove edge.

@PeterDaveHello
Copy link
Owner

@b1oki Thanks for sharing

@PeterDaveHello
Copy link
Owner

Hi @Laserlicht @hacker-h @b1oki,

I forgot to update some news here, would you like to use this image and see if it works for you: peterdavehello/tor-socks-proxy:test? Thanks.

@hacker-h
Copy link

hacker-h commented Jul 21, 2021

pi@raspberrypi:~ $ docker run -it peterdavehello/tor-socks-proxy:test
pi@raspberrypi:~ $ 

doesn't work for me on Pi4:
Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux

manual run with a shell within the container:

$ /usr/bin/tor -f /etc/tor/torrc
Aborted

@PeterDaveHello
Copy link
Owner

@hacker-h okay, thanks, I'll arrange some free time to take a look.

@b1oki
Copy link

b1oki commented Aug 6, 2021

@PeterDaveHello

pi@raspberrypi:~ $ docker run -d --restart=always --name tor-socks-proxy-test -p 0.0.0.0:9100:9150 -it peterdavehello/tor-socks-proxy:test

Statuses:
Restarting (132) 2 seconds ago
Up Less than a second (health: starting)
Restarting (132) 25 seconds ago

pi@raspberrypi:~ $ docker run --name tor-socks-proxy-test --entrypoint=sh -p 0.0.0.0:9100:9150 -it peterdavehello/tor-socks-proxy:test
/ $ /usr/bin/tor -f /etc/tor/torrc
Aborted
/ $ echo $?
134
/ $ /usr/bin/tor
Aborted
/ $ echo $?
134

Custom branch tor-socks-proxy:local-arm32v7 is worked okey.

@b1oki
Copy link

b1oki commented Nov 23, 2022

After upgrade OS to Raspbian GNU/Linux 11 (bullseye) and 5.15.79-v7+ kernel successful run with arm32v7/alpine:3.17

@PeterDaveHello
Copy link
Owner

Just pushed some updates here: https://hub.docker.com/r/peterdavehello/tor-socks-proxy/tags

image

For the latest tag, it's for linux/amd64 and linux/arm/v7 only right now, as you can see in #34, the obfs4proxy package is not available for Alpine Linux armhf/aarch64 architect.

So, I manually build another image without the obfs4proxy package here, tagged with test, for these platforms:

  • linux/arm/v6
  • linux/arm/v7
  • linux/arm64

Please feel free to give it a try and share some feedback, thanks!

@b1oki
Copy link

b1oki commented Jul 27, 2023

Thank you!

pi@raspberrypi:~ $ docker container stop tor-socks-proxy && docker container rm tor-socks-proxy

pi@raspberrypi:~ $ docker run -d --restart=always --name tor-socks-proxy -p 0.0.0.0:9100:9150/tcp peterdavehello/tor-socks-proxy:latest
Unable to find image 'peterdavehello/tor-socks-proxy:latest' locally
latest: Pulling from peterdavehello/tor-socks-proxy
31e352740f53: Pull complete 
812d47cf69da: Pull complete 
c15e9ad74a07: Pull complete 
Digest: sha256:607562b7863dc8f42b961b6e7d253d8365f6688bc58cabd32c2afc6e05dc7163
Status: Downloaded newer image for peterdavehello/tor-socks-proxy:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
186a5a9fb95526344c48b809ba1cbf0fbdff29a329c94b83c8f6feeecf34cbcc

pi@raspberrypi:~ $ docker container stop tor-socks-proxy && docker container rm tor-socks-proxy
tor-socks-proxy
tor-socks-proxy

pi@raspberrypi:~ $ docker run -d --restart=always --name tor-socks-proxy -p 0.0.0.0:9100:9150/tcp peterdavehello/tor-socks-proxy:test
7a508c5ea843bda38657c452239a4a5310f964b831bebb3a5cbb26d03079b309

pi@raspberrypi:~ $ docker ps --all
CONTAINER ID   IMAGE                                 COMMAND                  CREATED         STATUS                            PORTS                              NAMES
7a508c5ea843   peterdavehello/tor-socks-proxy:test   "/usr/bin/tor -f /et…"   7 seconds ago   Up 4 seconds (health: starting)   8853/udp, 0.0.0.0:9100->9150/tcp   tor-socks-proxy

pi@raspberrypi:~ $ docker logs tor-socks-proxy -f
Jul 27 13:47:02.540 [notice] Tor 0.4.7.13 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.1.0, Zlib 1.2.13, Liblzma 5.4.3, Libzstd 1.5.5 and Unknown N/A as libc.
Jul 27 13:47:02.540 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
Jul 27 13:47:02.541 [notice] Read configuration file "/etc/tor/torrc".
Jul 27 13:47:02.556 [warn] You specified a public address '0.0.0.0:8853' for DNSPort. Other people on the Internet might find your computer and use it as an open proxy. Please don't allow this unless you have a good reason.
Jul 27 13:47:02.569 [warn] You specified a public address '0.0.0.0:9150' for SocksPort. Other people on the Internet might find your computer and use it as an open proxy. Please don't allow this unless you have a good reason.
Jul 27 13:47:02.569 [warn] You specified a public address '0.0.0.0:8853' for DNSPort. Other people on the Internet might find your computer and use it as an open proxy. Please don't allow this unless you have a good reason.
Jul 27 13:47:02.570 [notice] Opening Socks listener on 0.0.0.0:9150
Jul 27 13:47:02.570 [notice] Opened Socks listener connection (ready) on 0.0.0.0:9150
Jul 27 13:47:02.571 [notice] Opening DNS listener on 0.0.0.0:8853
Jul 27 13:47:02.571 [notice] Opened DNS listener connection (ready) on 0.0.0.0:8853
Jul 27 13:47:02.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Jul 27 13:47:03.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Jul 27 13:47:06.000 [notice] Bootstrapped 0% (starting): Starting
Jul 27 13:47:06.000 [notice] Starting with guard context "default"
Jul 27 13:47:07.000 [notice] Bootstrapped 5% (conn): Connecting to a relay

pi@raspberrypi:~ $ docker ps --all
CONTAINER ID   IMAGE                                 COMMAND                  CREATED         STATUS                            PORTS                              NAMES
7a508c5ea843   peterdavehello/tor-socks-proxy:test   "/usr/bin/tor -f /et…"   2 minutes ago   Up 2 minutes (health: starting)   8853/udp, 0.0.0.0:9100->9150/tcp   tor-socks-proxy

@niccokunzmann
Copy link

See also #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants