Skip to content

Conversation

@spongebob888
Copy link
Contributor

🤔 This is a ...

  • New feature
  • Bug fix
  • Performance optimization
  • Enhancement feature
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

IPV6 switch is not effective is bindaddress is not explicitly set to "::"

This PR sets the bindaddress to "::" if it is not explicitly set and ipv6 option is on

📝 Changelog

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Changelog is provided or not needed

@codecov
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
clash-lib/src/config/internal/convert/general.rs 75.00% 1 Missing ⚠️
clash-lib/src/config/internal/convert/listener.rs 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ibigbug
Copy link
Member

ibigbug commented Jul 21, 2025

if you change the default value here to unspecified and match it with the ipv6 switch in the listener, would it work? https://github.com/watfaq/clash-rs/blob/master/clash-lib/src/config/internal/config.rs#L126

@spongebob888
Copy link
Contributor Author

Then. If user set explicitly bind-address:0.0.0.0 and ipv6: true will change bind-address:[::] which may be confusing

@spongebob888
Copy link
Contributor Author

spongebob888 commented Jul 21, 2025

We can't distinguish between user set bind-address to 0.0.0.0 or empty field

@ibigbug
Copy link
Member

ibigbug commented Jul 21, 2025

Which should be fine? It they want 0.0.0.0 and ipv6 it would work too if you listen ::? If it's dual stack.

I just think making it optional adds extra complexity to match it instead of simply unwrap it

@spongebob888
Copy link
Contributor Author

OK

@spongebob888 spongebob888 force-pushed the fix-ipv6 branch 2 times, most recently from fa3d264 to ab3fb4c Compare July 21, 2025 14:44
@ibigbug ibigbug merged commit 08f7c6b into Watfaq:master Jul 22, 2025
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants