Powershell 中启动报错, CMD中启动正常
- Dominant language
- JavaScript
- Stars
- 7.9k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Plese fill the template when you reporting a new issue, thanks!
#### Which platform are you running AnyProxy
Win11
#### The version of the AnyProxy
> anyproxy -V
4.1.3
#### Your expected behavior of AnyProxy
Powershell 能够证书安装后 正常启动
#### The actual behavior of AnyProxy
#### The log of the error
# 现象
root证书已经安装到了windows的证书管理器中并信任了root证书.
windows的owershell中启动 anyproxy -i
> anyproxy -i
Get-ChildItem : Cannot find drive. A drive with the name 'cert' does not exist.
At line:1 char:1
+ Get-ChildItem -path cert:\CurrentUser\Root
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (cert:String) [Get-ChildItem], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
[AnyProxy WARN][2024-11-16 08:46:08]: ROOT CA NOT INSTALLED YET
[AnyProxy Log][2024-11-16 08:46:08]: You can install the root CA manually.
[AnyProxy Log][2024-11-16 08:46:08]: The root CA file path is: C:\Users\40294\.anyproxy\certificates\rootCA.crt
[AnyProxy Log][2024-11-16 08:46:08]: Http proxy started on port 8001
[AnyProxy Log][2024-11-16 08:46:08]: web interface started on port 8002
[AnyProxy Log][2024-11-16 08:46:22]: clearing cache file...
同样的启动命令在 cmd中启动没有问题
D:\tempFiles>anyproxy -i
[AnyProxy Log][2024-11-16 08:46:42]: Http proxy started on port 8001
[AnyProxy Log][2024-11-16 08:46:42]: web interface started on port 8002
[AnyProxy Log][2024-11-16 08:47:22]: received https CONNECT request mobile.events.data.microsoft.com
[AnyProxy Log][2024-11-16 08:47:22]: will forward to local https server
[AnyProxy Log][2024-11-16 08:47:22]: [internal https]proxy server for mobile.events.data.microsoft.com established
[AnyProxy ERROR][2024-11-16 08:47:22]: Error: write ECONNABORTED
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing `anyproxy -i` in PowerShell and CMD on Windows 11, comparing the certificate check and startup output. Trace the startup entry point that checks the Windows root certificate store; done when an already trusted root CA is recognized in PowerShell and the warning no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, powershell
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100