[GH-ISSUE #1228] [FEAT]: Add network proxy settings to route all network requests through the proxy. #767

Closed
opened 2026-02-22 18:21:15 -05:00 by yindo · 12 comments
Owner

Originally created by @coldsmirk on GitHub (Apr 29, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1228

What would you like to see?

As is well known, there are some restrictions on the internet in certain countries, which lead to the inability to directly access some well-known websites such as Github, Google and so on. Accessing these sites requires the use of a proxy. I wonder if this app can add network proxy configuration options to meet this need?

Originally created by @coldsmirk on GitHub (Apr 29, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1228 ### What would you like to see? As is well known, there are some restrictions on the internet in certain countries, which lead to the inability to directly access some well-known websites such as Github, Google and so on. Accessing these sites requires the use of a proxy. I wonder if this app can add network proxy configuration options to meet this need?
yindo added the enhancementfeature request labels 2026-02-22 18:21:15 -05:00
yindo closed this issue 2026-02-22 18:21:15 -05:00
Author
Owner

@timothycarambat commented on GitHub (Apr 29, 2024):

Proxy for which features in particular?

@timothycarambat commented on GitHub (Apr 29, 2024): Proxy for which features in particular?
Author
Owner

@ilxqx commented on GitHub (Apr 29, 2024):

Thank you for your reply.

image image And access to the LLM providers server... In short, whenever there is a need to send network requests in the application, there should be an opportunity to proxy them.
@ilxqx commented on GitHub (Apr 29, 2024): Thank you for your reply. <img width="597" alt="image" src="https://github.com/Mintplex-Labs/anything-llm/assets/18739624/dbb934b3-290c-4f07-8324-78f5b9d6ba57"> <img width="1013" alt="image" src="https://github.com/Mintplex-Labs/anything-llm/assets/18739624/f4fa5ebd-1b44-4dce-a4e0-4aaedaa63122"> And access to the LLM providers server... In short, whenever there is a need to send network requests in the application, there should be an opportunity to proxy them.
Author
Owner

@lineg-it commented on GitHub (May 10, 2024):

+1

I also have the following errors in log when trying to start AnythingLLM behind a proxy:

npm ERR! code ECONNRESET
npm ERR! network Client network socket disconnected before secure TLS connection was established
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! A complete log of this run can be found in: /app/.npm/_logs/2024-05-10T11_50_06_115Z-debug-0.log

Working without a proxy, I'm trying to get it to work by using the same, following docker config:

networks:
  llm-network:
    external: true

services:
  anything-llm:
    container_name: anything-llm
    image: mintplexlabs/anythingllm:latest
    restart: unless-stopped
    #user: "${UID:-1000}:${GID:-1000}"
    cap_add:
      - SYS_ADMIN
    environment:
      - SERVER_PORT
      - STORAGE_DIR
      - GENERATE_SOURCEMAP
      - VITE_API_BASE
      - LLM_PROVIDER
      - OLLAMA_BASE_PATH
      - OLLAMA_MODEL_PREF
      - OLLAMA_MODEL_TOKEN_LIMIT
      - VECTOR_DB
      - CHROMA_ENDPOINT
      - DISABLE_TELEMETRY
      - PASSWORDMINCHAR
      - PASSWORDMAXCHAR
      - PASSWORDLOWERCASE
      - PASSWORDUPPERCASE
      - PASSWORDNUMERIC
      - PASSWORDSYMBOL
      - PASSWORDREQUIREMENTS
      #- NODE_TLS_REJECT_UNAUTHORIZED
      - HTTPS_PROXY
      - HTTP_PROXY
      - https_proxy
      - http_proxy
    volumes:
      - /srv/docker/anything-llm/storage:/app/server/storage
      - /srv/docker/anything-llm/.env:/app/server/.env
      - /srv/certs/LINEG-Fullchain.pem:/etc/ssl/certs/LINEG-Fullchain.pem
    labels:
      - "com.centurylinklabs.watchtower.enable=true"
      - "com.centurylinklabs.watchtower.monitor-only=true"
    networks:
      - llm-network
    #ports:
    #  - 127.0.0.1:1337:${SERVER_PORT-3000}
    extra_hosts:
      - host.docker.internal:host-gateway
    healthcheck:
      test: [ "CMD", "curl", "-f", "http://localhost:3000/api/ping" ]
      interval: 10s
      timeout: 10s
      retries: 10
      start_period: 5s
  chromadb:
    image: chromadb/chroma:latest
    container_name: chromadb
    volumes:
      - /srv/docker/chromadb:/chroma/chroma
    environment:
      - IS_PERSISTENT=TRUE
      - ANONYMIZED_TELEMETRY=False
    restart: unless-stopped
    ports:
      - 8000:${CHROMA_PORT}
    networks:
      - llm-network
    extra_hosts:
      - host.docker.internal:host-gateway
    # healthcheck not working for chromadb...
    #healthcheck:
    #  # Adjust below to match your container port
    #  test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/heartbeat" ]
    #  interval: 30s
    #  timeout: 10s
    #  retries: 3

I would love to have a setting within AnythingLLM to make npm use the proxy for its traffic towards the internet ..
Otherwise, what can we do to properly setup a proxy for AnythingLLM to use successfully?

@lineg-it commented on GitHub (May 10, 2024): +1 I also have the following errors in log when trying to **start** AnythingLLM behind a proxy: ``` npm ERR! code ECONNRESET npm ERR! network Client network socket disconnected before secure TLS connection was established npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm ERR! A complete log of this run can be found in: /app/.npm/_logs/2024-05-10T11_50_06_115Z-debug-0.log ``` Working without a proxy, I'm trying to get it to work by using the same, following docker config: ``` networks: llm-network: external: true services: anything-llm: container_name: anything-llm image: mintplexlabs/anythingllm:latest restart: unless-stopped #user: "${UID:-1000}:${GID:-1000}" cap_add: - SYS_ADMIN environment: - SERVER_PORT - STORAGE_DIR - GENERATE_SOURCEMAP - VITE_API_BASE - LLM_PROVIDER - OLLAMA_BASE_PATH - OLLAMA_MODEL_PREF - OLLAMA_MODEL_TOKEN_LIMIT - VECTOR_DB - CHROMA_ENDPOINT - DISABLE_TELEMETRY - PASSWORDMINCHAR - PASSWORDMAXCHAR - PASSWORDLOWERCASE - PASSWORDUPPERCASE - PASSWORDNUMERIC - PASSWORDSYMBOL - PASSWORDREQUIREMENTS #- NODE_TLS_REJECT_UNAUTHORIZED - HTTPS_PROXY - HTTP_PROXY - https_proxy - http_proxy volumes: - /srv/docker/anything-llm/storage:/app/server/storage - /srv/docker/anything-llm/.env:/app/server/.env - /srv/certs/LINEG-Fullchain.pem:/etc/ssl/certs/LINEG-Fullchain.pem labels: - "com.centurylinklabs.watchtower.enable=true" - "com.centurylinklabs.watchtower.monitor-only=true" networks: - llm-network #ports: # - 127.0.0.1:1337:${SERVER_PORT-3000} extra_hosts: - host.docker.internal:host-gateway healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:3000/api/ping" ] interval: 10s timeout: 10s retries: 10 start_period: 5s chromadb: image: chromadb/chroma:latest container_name: chromadb volumes: - /srv/docker/chromadb:/chroma/chroma environment: - IS_PERSISTENT=TRUE - ANONYMIZED_TELEMETRY=False restart: unless-stopped ports: - 8000:${CHROMA_PORT} networks: - llm-network extra_hosts: - host.docker.internal:host-gateway # healthcheck not working for chromadb... #healthcheck: # # Adjust below to match your container port # test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/heartbeat" ] # interval: 30s # timeout: 10s # retries: 3 ``` I would love to have a setting within AnythingLLM to make npm use the proxy for its traffic towards the internet .. Otherwise, what can we do to properly setup a proxy for AnythingLLM to use successfully?
Author
Owner

@chapterv commented on GitHub (May 21, 2024):

+1 and a check whether the agent is working using search or scrape webpage. mine doesn't work, thinking maybe network problem

@chapterv commented on GitHub (May 21, 2024): +1 and a check whether the agent is working using search or scrape webpage. mine doesn't work, thinking maybe network problem
Author
Owner

@timothycarambat commented on GitHub (May 21, 2024):

@chapterv That is unrelated to this issue. Also the agent says what tool it is calling so it is not a mystery. it will explicitly say if it is using web-scraping or web-browsing

@timothycarambat commented on GitHub (May 21, 2024): @chapterv That is unrelated to this issue. Also the agent says what tool it is calling so it is not a mystery. it will explicitly say if it is using `web-scraping` or `web-browsing`
Author
Owner

@jorgeorchilles commented on GitHub (Jun 12, 2024):

+1 can't test AnythingLLM in an environment that has outbound network proxy I need to configure in the app.

@jorgeorchilles commented on GitHub (Jun 12, 2024): +1 can't test AnythingLLM in an environment that has outbound network proxy I need to configure in the app.
Author
Owner

@jorgelloret commented on GitHub (Jul 19, 2024):

+1 any news about this?

@jorgelloret commented on GitHub (Jul 19, 2024): +1 any news about this?
Author
Owner

@zen010101 commented on GitHub (Sep 14, 2024):

+1 any news about this?

@zen010101 commented on GitHub (Sep 14, 2024): +1 any news about this?
Author
Owner

@zhefox commented on GitHub (Nov 1, 2024):

I currently solve it by using a global VPN via the TUN method, but this is not very friendly. I still hope there can be an option for software proxy.

@zhefox commented on GitHub (Nov 1, 2024): I currently solve it by using a global VPN via the TUN method, but this is not very friendly. I still hope there can be an option for software proxy.
Author
Owner

@bgorath commented on GitHub (Jan 17, 2025):

+1

@bgorath commented on GitHub (Jan 17, 2025): +1
Author
Owner

@timothycarambat commented on GitHub (Jan 17, 2025):

While I understand the need for proxy support in regions with internet restrictions, building proxy infrastructure falls outside AnythingLLM's scope. It would introduce complexity to maintain forever for something that isn't the app's core function or value proposition.

As an aside, when we have plugin data connectors you could then easily make your own proxy-enabled connectors that we would not have to maintain but would work for any specific networking case.

Outside of our app, you can wrap its requests in an outgoing request middleware or

  • Configure system-level proxy settings through your OS
  • Set up Docker container proxy settings if using containerized deployment
  • Use your own VPN/proxy infrastructure
  • Configure proxy settings in your reverse proxy (nginx, Apache, etc.)
@timothycarambat commented on GitHub (Jan 17, 2025): While I understand the need for proxy support in regions with internet restrictions, building proxy infrastructure falls outside AnythingLLM's scope. It would introduce complexity to maintain forever for something that isn't the app's core function or value proposition. As an aside, when we have plugin data connectors you could then easily make your own proxy-enabled connectors that we would not have to maintain but would work for any specific networking case. Outside of our app, you can wrap its requests in an outgoing request middleware or - Configure system-level proxy settings through your OS - Set up Docker container proxy settings if using containerized deployment - Use your own VPN/proxy infrastructure - Configure proxy settings in your reverse proxy (nginx, Apache, etc.)
yindo changed title from [FEAT]: Add network proxy settings to route all network requests through the proxy. to [GH-ISSUE #1228] [FEAT]: Add network proxy settings to route all network requests through the proxy. 2026-06-05 14:37:05 -04:00
Author
Owner

@coldsmirk commented on GitHub (Apr 29, 2024):

Thank you for your reply.

image image And access to the LLM providers server... In short, whenever there is a need to send network requests in the application, there should be an opportunity to proxy them.
<!-- gh-comment-id:2084161411 --> @coldsmirk commented on GitHub (Apr 29, 2024): Thank you for your reply. <img width="597" alt="image" src="https://github.com/Mintplex-Labs/anything-llm/assets/18739624/dbb934b3-290c-4f07-8324-78f5b9d6ba57"> <img width="1013" alt="image" src="https://github.com/Mintplex-Labs/anything-llm/assets/18739624/f4fa5ebd-1b44-4dce-a4e0-4aaedaa63122"> And access to the LLM providers server... In short, whenever there is a need to send network requests in the application, there should be an opportunity to proxy them.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#767