adding RELAY_MAX_MEM

master
jarlave 7 years ago committed by GitHub
parent d4d1987b07
commit 60fbce3aa3

@ -10,6 +10,7 @@ ENV RELAY_DIRPORT 9030
ENV RELAY_CTRLPORT 9051 ENV RELAY_CTRLPORT 9051
ENV RELAY_ACCOUNTING_MAX 1 GBytes ENV RELAY_ACCOUNTING_MAX 1 GBytes
ENV RELAY_ACCOUNTING_START day 00:00 ENV RELAY_ACCOUNTING_START day 00:00
ENV RELAY_MAX_MEM 512 MB
# add group/user tor with ID # add group/user tor with ID
RUN addgroup -g 1000 -S tor && \ RUN addgroup -g 1000 -S tor && \

@ -8,7 +8,7 @@ Docker image to setup a Tor relay with [nyx](https://nyx.torproject.org/) monito
```bash ```bash
docker run -d \ docker run -d \
--restart always \ --restart always \
-v tor-relay-data:/var/lib/tor:rw -v tor-relay-data:/home/tor/data:rw
-v /etc/localtime:/etc/localtime:ro \ -v /etc/localtime:/etc/localtime:ro \
-p 9001:9001 \ -p 9001:9001 \
-e RELAY_NICKNAME='ChangeMe' \ -e RELAY_NICKNAME='ChangeMe' \
@ -23,7 +23,7 @@ docker run -d \
```bash ```bash
docker run -d \ docker run -d \
--restart always \ --restart always \
-v tor-relay-data:/var/lib/tor:rw -v tor-relay-data:/home/tor/data:rw
-v /etc/localtime:/etc/localtime:ro \ -v /etc/localtime:/etc/localtime:ro \
-p 9001:9001 \ -p 9001:9001 \
-e RELAY_TYPE='bridge' \ -e RELAY_TYPE='bridge' \
@ -38,7 +38,7 @@ docker run -d \
```bash ```bash
docker run -d \ docker run -d \
--restart always \ --restart always \
-v tor-relay-data:/var/lib/tor:rw -v tor-relay-data:/home/tor/data:rw
-v /etc/localtime:/etc/localtime:ro \ -v /etc/localtime:/etc/localtime:ro \
-p 9001:9001 \ -p 9001:9001 \
-e RELAY_TYPE='exit' \ -e RELAY_TYPE='exit' \
@ -64,9 +64,10 @@ docker run -d \
| **RELAY_CTRLPORT** | Default port used for control interface (ControlPort) | 9051 | | **RELAY_CTRLPORT** | Default port used for control interface (ControlPort) | 9051 |
| **RELAY_ACCOUNTING_MAX** | Default threshold for sent and recieve (AccountingMax) | 1 GBytes | | **RELAY_ACCOUNTING_MAX** | Default threshold for sent and recieve (AccountingMax) | 1 GBytes |
| **RELAY_ACCOUNTING_START** | threshold rest (AccountingStart) | day 00:00 | | **RELAY_ACCOUNTING_START** | threshold rest (AccountingStart) | day 00:00 |
| **RELAY_MAX_MEM** | threshold above which Tor will stop queueing data (MaxMemInQueues) | 512 MB |
### Open nyx ### Open nyx
```bash ```bash
docker exec -it tor-relay nyx docker exec -it tor-relay nyx
``` ```

@ -16,6 +16,7 @@ for relaytype in bridge middle exit; do
sed -i "s/RELAY_CTRLPORT/${RELAY_CTRLPORT}/g" "$file" sed -i "s/RELAY_CTRLPORT/${RELAY_CTRLPORT}/g" "$file"
sed -i "s/RELAY_ACCOUNTING_MAX/${RELAY_ACCOUNTING_MAX}/g" "$file" sed -i "s/RELAY_ACCOUNTING_MAX/${RELAY_ACCOUNTING_MAX}/g" "$file"
sed -i "s/RELAY_ACCOUNTING_START/${RELAY_ACCOUNTING_START}/g" "$file" sed -i "s/RELAY_ACCOUNTING_START/${RELAY_ACCOUNTING_START}/g" "$file"
sed -i "s/RELAY_MAX_MEM/${RELAY_MAX_MEM}/g" "$file"
done done
exec tor -f "/etc/tor/torrc.${RELAY_TYPE}" exec tor -f "/etc/tor/torrc.${RELAY_TYPE}"

@ -191,4 +191,6 @@ BridgeRelay 1
## mechanisms like https://bridges.torproject.org/. If you want to run ## mechanisms like https://bridges.torproject.org/. If you want to run
## a private bridge, for example because you'll give out your bridge ## a private bridge, for example because you'll give out your bridge
## address manually to your friends, uncomment this line: ## address manually to your friends, uncomment this line:
#PublishServerDescriptor 0 #PublishServerDescriptor 0
MaxMemInQueues RELAY_MAX_MEM

@ -263,4 +263,6 @@ ExitPolicy reject *:*
## mechanisms like https://bridges.torproject.org/. If you want to run ## mechanisms like https://bridges.torproject.org/. If you want to run
## a private bridge, for example because you'll give out your bridge ## a private bridge, for example because you'll give out your bridge
## address manually to your friends, uncomment this line: ## address manually to your friends, uncomment this line:
#PublishServerDescriptor 0 #PublishServerDescriptor 0
MaxMemInQueues RELAY_MAX_MEM

@ -191,4 +191,6 @@ ExitPolicy reject *:* # no exits allowed
## mechanisms like https://bridges.torproject.org/. If you want to run ## mechanisms like https://bridges.torproject.org/. If you want to run
## a private bridge, for example because you'll give out your bridge ## a private bridge, for example because you'll give out your bridge
## address manually to your friends, uncomment this line: ## address manually to your friends, uncomment this line:
#PublishServerDescriptor 0 #PublishServerDescriptor 0
MaxMemInQueues RELAY_MAX_MEM
Loading…
Cancel
Save