fix hysteria faketcp lookback in TUN mode (#601)

This commit is contained in:
Mars160
2023-06-04 23:43:54 +08:00
committed by Larvan2
parent 76a7945994
commit 4d7350923c
2 changed files with 11 additions and 1 deletions

View File

@ -22,7 +22,7 @@ func LookupLocalAddrFromIfaceName(ifaceName string, network string, destination
addr, err = ifaceObj.PickIPv6Addr(destination)
default:
if destination.IsValid() {
if destination.Is4() {
if destination.Is4() || destination.Is4In6() {
addr, err = ifaceObj.PickIPv4Addr(destination)
} else {
addr, err = ifaceObj.PickIPv6Addr(destination)