Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 2.12.3 使用PROXY_URL部署后无法访问 #4795

Closed
1 of 3 tasks
DoctorReid opened this issue May 29, 2024 · 7 comments · Fixed by #4891
Closed
1 of 3 tasks

[Bug] 2.12.3 使用PROXY_URL部署后无法访问 #4795

DoctorReid opened this issue May 29, 2024 · 7 comments · Fixed by #4891
Labels
bug Something isn't working

Comments

@DoctorReid
Copy link

Bug Description

同样的docker-compose配置,使用 2.12.2版本可以正常运行,使用2.12.3就不行了。

使用2.12.3去掉PROXY_URL也能正常运行。

Steps to Reproduce

使用如下的 compose.yaml 部署,改版本号即可复现

services:
  clash:
    image: dreamacro/clash-premium
    volumes:
      - ./WgetCloud.yaml:/root/.config/clash/config.yaml
    restart: unless-stopped
    networks:
      net1:
        ipv4_address: 172.28.0.2
    expose:
      - "9990"
    ports:
      - 9990:9990
  chatgpt-next-web:
    image: yidadaa/chatgpt-next-web:v2.12.2
    environment:
      OPENAI_API_KEY: ${OPENAI_API_KEY}
      CODE: ${CHATGPT_NEXT_WEB_CODE}
      PROXY_URL: http://172.28.0.2:9990
    expose:
      - "3000"
    ports:
      - 9800:3000
    networks:
      net1:
        ipv4_address: 172.28.0.3

networks:
  net1:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.28.0.0/16
          gateway: 172.28.0.1

Expected Behavior

2.12.3可以使用PROXY_URL运行

Screenshots

No response

Deployment Method

  • Docker
  • Vercel
  • Server

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

@DoctorReid DoctorReid added the bug Something isn't working label May 29, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] 2.12.3 Unable to access after deployment using PROXY_URL

Bug Description

The same docker-compose configuration can run normally with version 2.12.2, but not with 2.12.3.

Using 2.12.3 to remove PROXY_URL can also run normally.

Steps to Reproduce

Use the following compose.yaml deployment and change the version number to reproduce

services:
  clash:
    image: dreamacro/clash-premium
    volumes:
      - ./WgetCloud.yaml:/root/.config/clash/config.yaml
    restart: unless-stopped
    networks:
      net1:
        ipv4_address: 172.28.0.2
    expose:
      - "9990"
    ports:
      - 9990:9990
  chatgpt-next-web:
    image: yidadaa/chatgpt-next-web:v2.12.2
    environment:
      OPENAI_API_KEY: ${OPENAI_API_KEY}
      CODE: ${CHATGPT_NEXT_WEB_CODE}
      PROXY_URL: http://172.28.0.2:9990
    expose:
      - "3000"
    ports:
      - 9800:3000
    networks:
      net1:
        ipv4_address: 172.28.0.3

networks:
  net1:
    driver:bridge
    ipam:
      driver:default
      config:
        - subnet: 172.28.0.0/16
          gateway: 172.28.0.1

Expected Behavior

2.12.3 Can be run using PROXY_URL

Screenshots

No response

Deployment Method

  • Docker
  • Vercel
  • Server

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

@UesugiErii
Copy link

#4747

@CoronaAustralis
Copy link

Replace the Dockerfile's last section to

CMD if [ -n "$PROXY_URL" ]; then \
   export HOSTNAME="0.0.0.0"; \
   protocol=$(echo $PROXY_URL | cut -d: -f1); \
   host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \
   port=$(echo $PROXY_URL | cut -d: -f3); \
   conf=/etc/proxychains.conf; \
   echo "strict_chain" > $conf; \
   echo "proxy_dns" >> $conf; \
   echo "remote_dns_subnet 224" >> $conf; \
   echo "tcp_read_time_out 15000" >> $conf; \
   echo "tcp_connect_time_out 8000" >> $conf; \
   echo "localnet 127.0.0.0/255.0.0.0" >> $conf; \
   echo "localnet ::1/128" >> $conf; \
   echo "[ProxyList]" >> $conf; \
   echo "$protocol $host $port" >> $conf; \
   cat /etc/proxychains.conf; \
   proxychains -f $conf node server.js; \
   else \
   node server.js; \
   fi

and build the image yourself. It could be resolved.

@f1161291
Copy link

f1161291 commented Jun 8, 2024

image

我用最新的也报错了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


image

I used the latest one and got an error.

@Icestab
Copy link

Icestab commented Jun 25, 2024

更新2.11.4后使用代理仍然无法访问,相同配置在2.11.2中是正常的

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


After updating to 2.11.4, the proxy is still inaccessible. The same configuration is normal in 2.11.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants