mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-01-09 10:49:35 +08:00
[Fix] redir-host use host not ip
This commit is contained in:
parent
d9a308072a
commit
0ec5a6e133
@ -244,7 +244,7 @@ func handleUDPConn(packet *inbound.PacketAdapter) {
|
|||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), C.DefaultUDPTimeout)
|
ctx, cancel := context.WithTimeout(context.Background(), C.DefaultUDPTimeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
rawPc, err := proxy.ListenPacketContext(ctx, metadata.Pure())
|
rawPc, err := proxy.ListenPacketContext(ctx, metadata)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if rule == nil {
|
if rule == nil {
|
||||||
log.Warnln("[UDP] dial %s to %s error: %s", proxy.Name(), metadata.RemoteAddress(), err.Error())
|
log.Warnln("[UDP] dial %s to %s error: %s", proxy.Name(), metadata.RemoteAddress(), err.Error())
|
||||||
@ -302,7 +302,7 @@ func handleTCPConn(connCtx C.ConnContext) {
|
|||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), C.DefaultTCPTimeout)
|
ctx, cancel := context.WithTimeout(context.Background(), C.DefaultTCPTimeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
remoteConn, err := proxy.DialContext(ctx, metadata.Pure())
|
remoteConn, err := proxy.DialContext(ctx, metadata)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if rule == nil {
|
if rule == nil {
|
||||||
log.Warnln("[TCP] dial %s to %s error: %s", proxy.Name(), metadata.RemoteAddress(), err.Error())
|
log.Warnln("[TCP] dial %s to %s error: %s", proxy.Name(), metadata.RemoteAddress(), err.Error())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user