txthinking / txthinking/brook

远程计算机拒绝网络连接 或 http://127.0.0.1:59789 页面无法访问

Open
#1,155 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Go
Stars
15.2k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

根本原因其实是端口 59789 被占用了,因为我 Hyper-V 的保留端口调整为 50000 ~ 65539 的。
没想到 brook 会用这么大的端口,不行我就再调大一点吧。
以下方案同样适用于Client: 127.0.0.1:1080 already in use但是netstat -ano|findstr 1080没找到端口占用的情况。

# 查看端口占用范围
$ netsh int ipv4 show dynamicport tcp
# 查看端口排除范围
$ netsh interface ipv4 show excludedportrange protocol=tcp
# 关闭 Hyper-V,可以不重启
$ dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
# 修改动态端口范围,num=65535-start
$ netsh int ipv4 set dynamicport tcp start=60000 num=5535
$ netsh int ipv4 set dynamicport udp start=60000 num=5535
# 开启 Hyper-V 并重启(注销不行)
$ dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report provides Windows commands for inspecting dynamic and excluded TCP ports, but names no repository file or test. Start by reproducing the 59789 connection failure with Hyper-V enabled and compare the behavior around the documented local proxy port; done would require a confirmed project change or a clearly scoped documentation update and validation steps.

Written by the indexing model from the issue text.

Assessment

Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.