From caea3c0188e474ba93825c6f240b951c98ee6656 Mon Sep 17 00:00:00 2001 From: Christophe Mehay Date: Sun, 12 May 2019 14:43:33 +0200 Subject: [PATCH] Update documentation for sockets --- Makefile | 13 +++++++++---- README.md | 8 ++++++-- docker-compose.v2.socket.yml | 4 ++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 0039c5e..0425904 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,9 @@ test: tag: git tag v$(TOR_VERSION) -f +release: test tag + git push origin --tags + check: pre-commit run --all-files @@ -19,10 +22,12 @@ rebuild: docker-compose -f docker-compose.build.yml build --no-cache run: build - docker-compose -f docker-compose-v1.yml up - + docker-compose -f docker-compose-v1.yml up --force-recreate run-v2: build - docker-compose -f docker-compose.v2.yml up + docker-compose -f docker-compose.v2.yml up --force-recreate + +run-v2-socket: build + docker-compose -f docker-compose.v2.socket.yml up --force-recreate run-v3: build - docker-compose -f docker-compose.v3.yml up + docker-compose -f docker-compose.v3.yml up --force-recreate diff --git a/README.md b/README.md index 9ed6a0d..5f22304 100644 --- a/README.md +++ b/README.md @@ -73,10 +73,14 @@ hello: 5azvyr7dvvr4cldn.onion:80, 5azvyr7dvvr4cldn.onion:800, 5azvyr7dvvr4cldn.o The config patern for this variable is: `{exposed_port}:{hostname}:{port}}` -For example `80:hello:8080` will expose a onion service on port 80 to the port 8080 of hello hostname. +For example `80:hello:8080` will expose an onion service on port 80 to the port 8080 of hello hostname. + +Unix sockets are supported too, `80:unix://path/to/socket.sock` will expose an onion service on port 80 to the socket `/path/to/socket.sock`. See `docker-compose.v2.socket.yml` for an example. You can concatenate services using comas. +> **WARNING**: Using sockets and ports in the same service group can lead to issues + ##### `{SERVICE}_TOR_SERVICE_VERSION` Can be `2` or `3`. Set the tor address type. @@ -154,7 +158,7 @@ This containner uses [`pytor`](https://github.com/cmehay/pytor) to mannages tor # Legacy deprecated doc -ALL THE DOC BELLOW IS LEGACY, IT'S STILL WORKING BUT IT'S NOT RECOMMENDED ANYMORE AND COULD BE DROPPED IN FUTURE RELEASES. +> **WARNING**: ALL THE DOC BELLOW IS LEGACY, IT'S STILL WORKING BUT IT'S NOT RECOMMENDED ANYMORE AND COULD BE DROPPED IN FUTURE RELEASES. ### Create a tor hidden service with a link diff --git a/docker-compose.v2.socket.yml b/docker-compose.v2.socket.yml index d3c4400..28f54ba 100644 --- a/docker-compose.v2.socket.yml +++ b/docker-compose.v2.socket.yml @@ -9,8 +9,8 @@ services: links: - world environment: - # Set mapping port to unix socket - WORLD_PORTS: 80:unix:/var/run/nginx.sock + # Set service hosts to unix socket + WORLD_TOR_SERVICE_HOSTS: 80:unix://var/run/nginx.sock # Mount socket directory from world container volumes_from: