Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion v2/config/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,11 @@ func setInbound(options *option.Options, hopt *HiddifyOptions) {
// } else {
// inboundDomainStrategy = opt.IPv6Mode
// }
ipv6Enable := isIPv6Supported()
// Honor the user's IPv6 mode: IPv4-only must not give the TUN an IPv6
// address nor bind IPv6, otherwise the TUN captures the default IPv6
// route while egress has no usable IPv6, black-holing AAAA-first conns.
ipv6Enable := isIPv6Supported() &&
hopt.IPv6Mode != option.DomainStrategy(C.DomainStrategyIPv4Only)
if hopt.EnableTun {

opts := option.TunInboundOptions{
Expand Down