Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64744078 authored by Nicolas Gelot's avatar Nicolas Gelot
Browse files

Use tor to proxy search engine requests

parent 1dfce431
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -97,7 +97,7 @@ deploy:spot.test.cloud.global:
    COMPOSE_FILE: docker-compose.yml:docker-compose-build.yml
    COMPOSE_FILE: docker-compose.yml:docker-compose-build.yml
    SSH_PRIVATE_KEY: ${SSH_PRIVATE_KEY_TEST}
    SSH_PRIVATE_KEY: ${SSH_PRIVATE_KEY_TEST}
  script:
  script:
    - docker-compose up -d --build
    - docker-compose up -d --build --scale tor=5


deploy:spot.cloud.global:
deploy:spot.cloud.global:
  extends: .deploy:template
  extends: .deploy:template
@@ -119,4 +119,4 @@ deploy:spot.cloud.global:
    SSH_PRIVATE_KEY: ${SSH_PRIVATE_KEY_PROD}
    SSH_PRIVATE_KEY: ${SSH_PRIVATE_KEY_PROD}
  script:
  script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
    - docker-compose up -d
    - docker-compose up -d --scale tor=5
+5 −1
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ Spot was forked from searx: read [documentation](https://asciimoo.github.io/sear
* [morty](https://github.com/asciimoo/morty) as proxy to serve thumbnails.
* [morty](https://github.com/asciimoo/morty) as proxy to serve thumbnails.
* [nginx](https://www.nginx.com/) as http server to serve static files.
* [nginx](https://www.nginx.com/) as http server to serve static files.
* Spot the meta search engine.
* Spot the meta search engine.
* [tor](https://www.torproject.org) as open network that helps you defend against traffic analysis.




```mermaid
```mermaid
@@ -31,6 +32,9 @@ graph TD
  B --> D(nginx)
  B --> D(nginx)
  D --> |static file| D
  D --> |static file| D
  D --> |API| E(spot)
  D --> |API| E(spot)
  E --> H(tor1)
  E --> I(tor2)
  E --> J(torN)
```
```


## Getting Started
## Getting Started
@@ -45,7 +49,7 @@ below to run spot for production or local environment.
```
```
COMPOSE_FILE=docker-compose.yml:docker-compose-build.yml docker-compose up --build morty
COMPOSE_FILE=docker-compose.yml:docker-compose-build.yml docker-compose up --build morty
SPOT_MORTY_URL=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my-spot_morty_1)
SPOT_MORTY_URL=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my-spot_morty_1)
COMPOSE_FILE=docker-compose.yml:docker-compose-build.yml docker-compose up --build spot nginx filtron
COMPOSE_FILE=docker-compose.yml:docker-compose-build.yml docker-compose up --build spot nginx filtron tor
```
```


* Getting the ip of the filtron service and go to `http://<ip>`, below the docker way to get the IP of the filtron container
* Getting the ip of the filtron service and go to `http://<ip>`, below the docker way to get the IP of the filtron container
+5 −0
Original line number Original line Diff line number Diff line
@@ -71,5 +71,10 @@ services:
      - "letsencrypt:/letsencrypt"
      - "letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"


  tor:
    image: osminogin/tor-simple
    logging: *default-logging
    restart: unless-stopped

volumes:
volumes:
  letsencrypt:
  letsencrypt:
+4 −4
Original line number Original line Diff line number Diff line
@@ -33,7 +33,7 @@ ui:
#    key : !!binary "your_morty_proxy_key"
#    key : !!binary "your_morty_proxy_key"


outgoing: # communication with search engines
outgoing: # communication with search engines
    request_timeout : 2.0 # default timeout in seconds, can be override by engine
    request_timeout : 3.0 # default timeout in seconds, can be override by engine
    # max_request_timeout: 10.0 # the maximum timeout in seconds
    # max_request_timeout: 10.0 # the maximum timeout in seconds
    useragent_suffix : "" # suffix of searx_useragent, could contain informations like an email address to the administrator
    useragent_suffix : "" # suffix of searx_useragent, could contain informations like an email address to the administrator
    pool_connections : 100 # Number of different hosts
    pool_connections : 100 # Number of different hosts
@@ -41,9 +41,9 @@ outgoing: # communication with search engines
# uncomment below section if you want to use a proxy
# uncomment below section if you want to use a proxy
# see http://docs.python-requests.org/en/latest/user/advanced/#proxies
# see http://docs.python-requests.org/en/latest/user/advanced/#proxies
# SOCKS proxies are also supported: see http://docs.python-requests.org/en/master/user/advanced/#socks
# SOCKS proxies are also supported: see http://docs.python-requests.org/en/master/user/advanced/#socks
#    proxies :
    proxies:
#        http : http://127.0.0.1:8080
      http: socks5://tor:9050
#        https: http://127.0.0.1:8080
      https:  socks5://tor:9050
# uncomment below section only if you have more than one network interface
# uncomment below section only if you have more than one network interface
# which can be the source of outgoing search requests
# which can be the source of outgoing search requests
#    source_ips:
#    source_ips: