We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I skip DNS and use IP directly to access a domain name? I noticed this issue #561 mentioned DNS bypass.
Like this resolve does not working.
resolve
let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 443); let client = reqwest::ClientBuilder::new(). resolve("example.com", addr). tls_sni(false). use_rustls_tls(). build().unwrap(); client.request(reqwest::Method::GET, "https://example.com").send().await; ... ...
I saw this place using hyper::Request::builder, but it passed the uri argument directly.
hyper::Request::builder
uri
Then it returns the result for example.com instead of 127.0.0.1
example.com
127.0.0.1
<!doctype html> <html> <head> <title>Example Domain</title> <meta charset="utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style type="text/css"> body { background-color: #f0f0f2; margin: 0; padding: 0; font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; } div { width: 600px; margin: 5em auto; padding: 2em; background-color: #fdfdff; border-radius: 0.5em; box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02); } a:link, a:visited { color: #38488f; text-decoration: none; } @media (max-width: 700px) { div { margin: 0 auto; width: auto; } } </style> </head> <body> <div> <h1>Example Domain</h1> <p>This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.</p> <p><a href="https://www.iana.org/domains/example">More information...</a></p> </div> </body> </html>
The text was updated successfully, but these errors were encountered:
I'm not sure I understand. Does ClientBuilder::resolve(domain, ip) not work?
ClientBuilder::resolve(domain, ip)
Sorry, something went wrong.
Yes, he doesn't work.
The expected behavior is to send a request to 127.0.0.1, but in fact, it still requests example.com
No branches or pull requests
Can I skip DNS and use IP directly to access a domain name?
I noticed this issue #561 mentioned DNS bypass.
Like this
resolve
does not working.I saw this place using
hyper::Request::builder
, but it passed theuri
argument directly.Then it returns the result for
example.com
instead of127.0.0.1
The text was updated successfully, but these errors were encountered: