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][cross-platform] Error setting profile for external controller with random port #2198

Open
5 of 6 tasks
love-2000 opened this issue Dec 13, 2024 · 2 comments
Open
5 of 6 tasks
Labels
C: Backend T: Bug Something isn't working

Comments

@love-2000
Copy link

love-2000 commented Dec 13, 2024

复现步骤 / Step to reproduce

0. delete inbound firewall rules for mihomo.exe, clash.exe, clash nyanpasu.exe (if applicable)
0. install the latest clash-nyanpasu

  1. set Random for Port Strategy in Clash External Controller
  2. create a new local profile
  3. apply any local profile

预期行为 / Expected behavior

Validate Profile, and Apply Profile Successfully (or prompt a window asking for firewall rule).

实际行为 / Actual behavior

  • Validation go through, but
  • Failed to apply profile

应用日志 / App logs

No logs in Trace and Debug mode

备注 / Addition details

Error Message:

Error setting profile:
error sending request for URL
(http://127.0.0.1:50888/configs)

Inbound Firewall Rules as below
This error only happens on the windows machines without corresponding Inbound Rules (specifically, new users).

环境信息 / Environment information

  • the latest windows 11, or
  • the latest MacOS
  • fresh installed Clash Nyanpasu 1.6.x

自查步骤 / Verify steps

  • 如果您有足够的时间和能力,并愿意为此提交 PR,请勾上此复选框 / Pull request is welcome. Check this if you want to start a pull request
  • 您已知悉如果没有提供正确的系统信息,以及日志,您的 Issue 会直接被关闭 / You have known that if you don't provide correct system information and logs, your issue will be closed directly
  • 您已仔细查看并知情 Q&AFAQ 中的内容 / You have read and understood the contents of Q&A and FAQ
  • 您已搜索过 Issue Tracker,没有找到类似内容 / I have searched on Issue Tracker, No duplicate or related open issue has been found
  • 您确保这个 Issue 只提及一个问题。如果您有多个问题报告,烦请发起多个 Issue / Ensure there is only one bug report in this issue. Please make multiply issue for multiply bugs
  • 您确保已使用最新 Pre-release 版本测试,并且该问题在最新 Pre-release 版本中并未解决 / This bug have not solved in latest Pre-release version
@love-2000 love-2000 added S: Untriaged T: Bug Something isn't working labels Dec 13, 2024
@greenhat616
Copy link
Collaborator

It seems that the Local fireware was blocked the Local Inbound connection. Possible the default network rules are too strict?

@love-2000 love-2000 changed the title [Bug][Windows] Error setting profile for external controller with random port [Bug][cross-platform] Error setting profile for external controller with random port Jan 5, 2025
@love-2000
Copy link
Author

Sorry for the late reply.

After further investigation, I tested the feature on another Windows machine with different user behavior patterns. Contrary to my initial assumption, the issue does not appear to be solely related to firewall settings. The problem persists even when an inbound rule is explicitly created for the Windows Firewall. Any other port strategy, Fixed or Allow Fallback, works.

Additionally, I conducted tests on a macOS system, and the issue persists across all local profiles on this platform as well. Based on these findings, I have updated the original issue to better reflect the issue.

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

No branches or pull requests

2 participants