more compatibility

This commit is contained in:
Meo597
2026-05-19 03:38:36 +08:00
parent 81bcfcae77
commit d39965f20d
2 changed files with 112 additions and 88 deletions
+7
View File
@@ -274,6 +274,13 @@ func (h *Handler) SocketSettings() *internet.SocketConfig {
return h.streamSettings.SocketSettings
}
func (h *Handler) UsesProxySettings() bool {
if h.senderSettings != nil && h.senderSettings.ProxySettings.HasTag() {
return true
}
return h.streamSettings != nil && h.streamSettings.SocketSettings != nil && len(h.streamSettings.SocketSettings.DialerProxy) > 0
}
// Dial implements internet.Dialer.
func (h *Handler) Dial(ctx context.Context, dest net.Destination) (stat.Connection, error) {
if h.senderSettings != nil {