A Tor Hidden Service Proxy for any application. Used e.g. by [searx.sp-codes.de](https://searx.sp-codes.de) at [searxbi3f73mmdeb.onion](http://searxbi3f73mmdeb.onion/)
## Usage
To run your app as a hidden service you need to provide the private key in the `PRIVATE_KEY` and the host which should be proxied in the `REDIRECT` environment variables. For example:
```
version: '3.4'
services:
myservice:
image: nginx
networks:
- mynet
tor:
image: spcodes/hidden-service
networks:
- mynet
depends_on:
- myservice
environment:
REDIRECT: "myservice:80"
PRIVATE_KEY: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
networks:
mynet:
driver: 'bridge'
```
To generate the private key you can use [strm/tor-hiddenservice-nginx](https://github.com/opsxcq/docker-tor-hiddenservice-nginx) like this:
```
docker run -it --rm -v $(pwd)/web:/web \
strm/tor-hiddenservice-nginx generate <pattern>
```
As pattern, you can provide a regex to generate the name of your hidden service. For more details see https://github.com/opsxcq/docker-tor-hiddenservice-nginx