Skip to content

DNS does not work over socks5 proxy #820

Open

Description

@UnsolvedCypher

When attempting to reach a server only available in the proxy, I get ENOTFOUND. It appears that the DNS resolution doesn't happen over the proxy.

This appears to be an issue with using socks-proxy-agent according to this StackOverflow post. Perhaps switching to socks5-http(s)-client is the solution.

I am able to reproduce this in the latest version (0.27.2). I am happy to pull a branch and test a fix if needed.

Activity

  1. Mika56 commented on Nov 16, 2023

    @Mika56

    It doesn't work over http either. It feels like Bruno tries to manually resolve the name before sending the request through the proxy?
    My dev environment uses a proxy which is responsible for resolving the DNS queries, so I can't make any query for now :(

  2. sentoc commented on Feb 5, 2024

    @sentoc

    Issue still there on version 1.7.1

  3. emilio-cea commented on Jun 18, 2024

    @emilio-cea

    Using DNS through Socks5 still doesn't work using Bruno 1.19.0.
    To be clear, queries do work using this proxy but not to addresses that are not discoverable by a surface request e.g: any .onion site.

  4. mayormaier commented on Sep 1, 2024

    @mayormaier

    Just want to +1 this issue. There should be an option added to proxy DNS traffic in addition to the API requests.

  5. lapo-luchini commented on Oct 8, 2024

    @lapo-luchini

    An option would be best, yes, because there are cases when DNS ought to be resolved in SOCKS5 and there are cases when DNS should be resolved locally.

  6. johzie commented on Apr 8, 2025

    @johzie

    Running into the same issue with Bruno 2.0.1 behind a corporate proxy reached via HTTP.

    Image

  7. johzie commented on Apr 8, 2025

    @johzie

    @johzie Can you try our nightly build? https://github.com/usebruno/bruno-nightly-builds

    @anusree-bruno Thanks for your quick reply. I was able to test my OAuth 2.0 flow with your nightly 2.1.0.

    The DNS issues is resolved 🚀. Only thing what remains is using a local proxy e.g. Px running on localhost.

    1. Bruno -> corporate proxy -> internet ✅
    2. Bruno -> local proxy on localhost -> corporate proxy -> internet ❌

    It seems that Bruno has some special handling for DNS resolving on localhost which causes issues using a local proxy for authentication.

  8. Shackelford-Arden commented on Jul 1, 2025

    @Shackelford-Arden

    Reporting that I'm unable to proxy requests on v2.6.1. In my case, specifically with a SOCKS5 proxy listening on localhost.

  9. dev00 commented on Dec 8, 2025

    @dev00

    I can observe the same behaviour as @Shackelford-Arden on 2.13.2 - a socks5 Proxy running on localhost:20000 (openssh client for Windows with -D 20000 parameter ) is not used for Domain Name lookup.

    In other Libraries I've used in the past, this was controlled via the proxy protocol prefix:

    • socks5:// - Lookup using System Resolver
    • socks5h:// - Leave Lookup to the Proxy

    As a workaround I resolve the address myself and set the Host: Header within the request, but that is understandably not an acceptable solution.

    Proxy is configured on Global level, and inherited to the collection through Config: global and setting Protocol to SOCKS5 there as well

  10. LeonteDenismsgDev commented on Dec 12, 2025

    @LeonteDenismsgDev

    As a workaround I resolve the address myself and set the Host: Header within the request, but that is understandably not an acceptable solution.

    How did you manage to implement said workaround?

  11. firedes commented on Jun 1, 2026

    @firedes

    As a workaround I resolve the address myself and set the Host: Header within the request, but that is understandably not an acceptable solution.

    How did you manage to implement said workaround?

    For example, suppose you want to access: https://api.bitget.com/xxx.
    First, resolve api.bitget.com using your SSH server. Assume it resolves to the IP address: 123.123.123.123.
    Then, in Bruno, set the request URL to: https://123.123.123.123:443/xxx, with header: Host: api.bitget.com

  12. dev00 commented on Jul 10, 2026

    @dev00

    @LeonteDenismsgDev @firedes
    I just tried #6390 (comment) and it works.

    On windows you can find the config for the whole application in C:\Users\$username\AppData\Roaming\bruno\preferences.json.
    For individual collections, check the bruno.json file in the collection directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions