alibaba / alibaba/anyproxy

作为node模块,用pm2启动时,如果是cluster模式,即使只有一个进程,也无法代理https请求

Open
#196 1 comment 0 reactions 0 assignees View on GitHub
needs feedback
Dominant language
JavaScript
Stars
7.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

#### Which platform are you running AnyProxy

linux
#### The version of the AnyProxy

3.10.3
#### Your expected behavior of AnyProxy

https代理可以正常使用
#### The actual behavior of AnyProxy

https代理无法正常使用,访问两下就会出错
#### The log of the error

1|wechat-c | received https CONNECT request mp.weixin.qq.com
1|wechat-c | ==>will forward to local https server
1|wechat-c | err when connect to + mp.weixin.qq.com , Error: connect ECONNREFUSED 127.0.0.1:40002

netstat -antp可以看到:
tcp6 0 0 :::40001 :::* LISTEN 2932/.pm2)
tcp6 0 0 :::8001 :::* LISTEN 2932/.pm2)
tcp6 0 0 :::40002 :::* LISTEN 2932/.pm2)
tcp6 0 0 :::8002 :::* LISTEN 2932/.pm2)

http代理没有问题。如果把pm2的启动模式指定为fork模式,也没有问题

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce AnyProxy 3.10.3 on Linux under PM2 cluster mode with an HTTPS CONNECT request, then compare it with fork mode. Start from the HTTPS CONNECT handling and local forwarding path, using the provided logs and netstat output to trace why 127.0.0.1:40002 is refused. Done means repeated HTTPS proxy requests work in cluster mode without ECONNREFUSED.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.