Skip to content

Commit

Permalink
Revert "Apply DomainStrategy to outbound target"
Browse files Browse the repository at this point in the history
This reverts commit ce7dc23.

Until implementation of `PreferIPv4` and `PreferIPv6`. See v2fly#2553
  • Loading branch information
Vigilans committed Feb 19, 2024
1 parent 31635f9 commit 9d3937e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions app/proxyman/outbound/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,6 @@ func (h *Handler) Tag() string {

// Dispatch implements proxy.Outbound.Dispatch.
func (h *Handler) Dispatch(ctx context.Context, link *transport.Link) {
if h.senderSettings != nil && h.senderSettings.DomainStrategy != proxyman.SenderConfig_AS_IS {
outbound := session.OutboundFromContext(ctx)
if outbound == nil {
outbound = new(session.Outbound)
ctx = session.ContextWithOutbound(ctx, outbound)
}
if outbound.Target.Address != nil && outbound.Target.Address.Family().IsDomain() {
if addr := h.resolveIP(ctx, outbound.Target.Address.Domain(), h.Address()); addr != nil {
outbound.Target.Address = addr
}
}
}
if h.mux != nil && (h.mux.Enabled || session.MuxPreferedFromContext(ctx)) {
if err := h.mux.Dispatch(ctx, link); err != nil {
err := newError("failed to process mux outbound traffic").Base(err)
Expand Down

0 comments on commit 9d3937e

Please sign in to comment.