File tree Expand file tree Collapse file tree 6 files changed +53
-0
lines changed Expand file tree Collapse file tree 6 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ * .temp
2
+ tor /
Original file line number Diff line number Diff line change
1
+ FROM nginx:1.20-alpine
2
+
3
+ # Metadata about the docker image
4
+ LABEL name="tor-nginx-proxy"
5
+ LABEL version="1.0.0-beta-1.0"
6
+ LABEL maintainer="Harshit Budhraja (https://github.com/harshit-budhraja)"
7
+
8
+ # Update packages and install tor
9
+ RUN apk --update --allow-untrusted --repository http://dl-4.alpinelinux.org/alpine/edge/community/ add \
10
+ tor && rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
11
+
12
+ # Copy nginx and tor configurations
13
+ COPY default.conf.template /etc/nginx/templates/default.conf.template
14
+ COPY torrc /etc/tor/torrc
15
+
16
+ # Add script to start tor
17
+ COPY start-tor.sh /docker-entrypoint.d/40-start-tor.sh
18
+ RUN chmod +x /docker-entrypoint.d/40-start-tor.sh
Original file line number Diff line number Diff line change
1
+ server {
2
+ listen ${NGINX_PORT};
3
+
4
+ location / {
5
+ proxy_pass ${NGINX_PROXY_URL};
6
+ proxy_set_header Host $host:$server_port;
7
+ proxy_set_header X-Forwarded-For $remote_addr;
8
+ proxy_set_header Upgrade $http_upgrade;
9
+ proxy_set_header Connection upgrade;
10
+ proxy_set_header Accept-Encoding gzip;
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ ---
2
+ version : ' 3'
3
+
4
+ services :
5
+ tor-nginx-proxy :
6
+ container_name : tor-nginx-proxy
7
+ image : harshitbudhraja/tor-nginx-proxy:latest
8
+ restart : unless-stopped
9
+ environment :
10
+ - NGINX_PORT=80
11
+ - NGINX_PROXY_URL=<YOUR_APP_URL>
12
+ ports :
13
+ - 3000:80
14
+ volumes :
15
+ - ./tor:/var/lib/tor/
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ tor -f /etc/tor/torrc
Original file line number Diff line number Diff line change
1
+ HiddenServiceDir /var/lib/tor/hidden_service/
2
+ HiddenServicePort 80 127.0.0.1 :80
3
+ Log notice stdout
4
+ RunAsDaemon 1
You can’t perform that action at this time.
0 commit comments