searxng / searxng-docker

The docker-compose files for setting up a SearXNG instance with docker.
GNU Affero General Public License v3.0
1.22k stars 293 forks source link

Unable to start due to filtron error #4

Closed Zackptg5 closed 2 years ago

Zackptg5 commented 2 years ago

OS: Debian 11 (bullseye)

Attempted to install the searxng-docker (searx-docker has same issue here btw), unable to start due to filtron error:

filtron    | 2021/11/09 20:49:33 Cannot parse rules: Cannot parse selector 'Header:X-Forwarded-For=nslookup(check.searx.space)': invalid expression
filtron exited with code 1

Looks like this issue was already opened before in the filtron repo here but nothing has been done about it. I've used searx before without issue until now so I'm not sure what changed but I seemingly fixed it by changing line 4 of rules.json from: this: "filters": ["Header:X-Forwarded-For=nslookup(check.searx.space)"], to this: "filters": ["Header:X-Forwarded-For=nslookup check.searx.space"],

Is this the proper solution?

dalf commented 2 years ago

With "filters": ["Header:X-Forwarded-For=nslookup check.searx.space"], the rule becomes check the X-Forwarded-For header for the value nslookup check.searx.space ; which must probably not what you want.

Can you add a dns entry to the docker-compose.yml file ?

  filtron:
    container_name: filtron
    image: dalf/filtron
    restart: always
    ports:
      - "127.0.0.1:4040:4040"
      - "127.0.0.1:4041:4041"
    networks:
      - searxng
    dns:
      - 1.1.1.1     
    command: -listen 0.0.0.0:4040 -api 0.0.0.0:4041 -target searxng:8080
    volumes:
      - ./rules.json:/etc/filtron/rules.json:rw
    read_only: true
    cap_drop:
      - ALL

For reference: https://docs.docker.com/compose/compose-file/compose-file-v3/#dns

Zackptg5 commented 2 years ago

That fixed it! The vps I have this one one runs through pihole and dnscrypt-proxy so I'm guessing something got blocked on the way.

Edit: blocked by dnscrypt-proxy, not sure why but I'll just keep the dns settings