Opened 5 months ago

Last modified 4 months ago

#33461 new enhancement

Multiarch docker obfs4 bridge

Reported by: thymbahutymba Owned by:
Priority: Medium Milestone:
Component: Circumvention/Obfs4 Version:
Severity: Normal Keywords: docker, obfs4, multiarch
Cc: phw, cohosh Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Having more images enables the bridge operators to directly pull an image instead of modifying the Dockerfile and consequently building that image. For example, the supported architectures can be x86_64, aarch64 and arm.
In order to do so we can have multiple Dockerfile.arch where is used in order to build such image.

For example in the Dockerfile.arm file the content should be something like:

# Base docker image
FROM multiarch/qemu-user-static:x86_64-arm as qemu
FROM arm32v7/debian:buster-slim
COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin

# Install remaining dependencies.
RUN apt-get update && apt-get install -y \
    tor                 \
    tor-geoipdb \
    obfs4proxy  \
    libcap2-bin \

# Allow obfs4proxy to bind to ports < 1024.
RUN setcap cap_net_bind_service=+ep /usr/bin/obfs4proxy
RUN setcap cap_net_bind_service=+ep /usr/bin/tor

# Our torrc is generated at run-time by the script
RUN rm /etc/tor/torrc
RUN chown debian-tor:debian-tor /etc/tor
RUN chown debian-tor:debian-tor /var/log/tor

COPY /usr/local/bin
RUN chmod 0755 /usr/local/bin/

COPY get-bridge-line /usr/local/bin
RUN chmod 0755 /usr/local/bin/get-bridge-line

USER debian-tor

CMD [ "/usr/local/bin/" ]

Child Tickets

Attachments (2)

Dockerfile.arm (1.4 KB) - added by thymbahutymba 4 months ago.
Dockerfile for build arm image
Dockerfile.arm64 (1.4 KB) - added by thymbahutymba 4 months ago.
Dockerfile for build arm64 image

Download all attachments as: .zip

Change History (3)

Changed 4 months ago by thymbahutymba

Attachment: Dockerfile.arm added

Dockerfile for build arm image

Changed 4 months ago by thymbahutymba

Attachment: Dockerfile.arm64 added

Dockerfile for build arm64 image

comment:1 Changed 4 months ago by thymbahutymba

I took the Dokerfile from phw repository and make the few modifications required in order to build obfs4-bridge image for different architectures. I had some problem with curl so I changed it with wget.

First of all the images are built:

docker build . -f Dockerfile -t thymbahutymba/obfs4-bridge:x86_64
docker build . -f Dockerfile.arm64 -t thymbahutymba/obfs4-bridge:arm64
docker build . -f Dockerfile.arm -t thymbahutymba/obfs4-bridge:arm

Which are pushed:

docker push thymbahutymba/obfs4-bridge:x86_64
docker push thymbahutymba/obfs4-bridge:arm64
docker push thymbahutymba/obfs4-bridge:arm

Finally there is the creation and pushing of the manifest:

docker manifest create thymbahutymba/obfs4-bridge:latest thymbahutymba/obfs4-bridge:x86_64 thymbahutymba/obfs4-bridge:arm64 thymbahutymba/obfs4-bridge:arm
docker manifest push thymbahutymba/obfs4-bridge:latest

What's result can be seen at which I created for demostration purpose.

Note: See TracTickets for help on using tickets.