Created
October 27, 2024 01:38
-
-
Save magicstone1412/85e5d6ed5a237fce926876bce7ed65e2 to your computer and use it in GitHub Desktop.
Tor proxy using Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set the latest version of Alpine Linux as the base image | |
FROM alpine:latest | |
# Updates the package list in the Alpine package manager and installs the Tor package. | |
RUN apk update && apk add tor | |
# Instructs Tor to send log notices to the standard output | |
RUN echo "Log notice stdout" >> /etc/torrc | |
# Configures Tor to listen for SOCKS connections on all network interfaces (0.0.0.0) on port 9050 | |
RUN echo "SocksPort 0.0.0.0:9050" >> /etc/torrc | |
# expose port | |
EXPOSE 9050 | |
# Set the default container command, Starts the Tor service using the specified configuration file | |
CMD ["tor", "-f", "/etc/torrc"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build
Run
Check
Compose