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
![image](https://private-user-images.githubusercontent.com/147307373/342463190-617a3ca8-ca30-4006-bce2-df0b588fc32d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUzNTQ1MzcsIm5iZiI6MTcyNTM1NDIzNywicGF0aCI6Ii8xNDczMDczNzMvMzQyNDYzMTkwLTYxN2EzY2E4LWNhMzAtNDAwNi1iY2UyLWRmMGI1ODhmYzMyZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTAzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwM1QwOTAzNTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNTBlMjFjMTJkY2Q4N2IyNjM2NzVmODgxZmMwNjQ0MTU0N2M3ZTMyMjQzODk2Njk2ZWM1ZTEyMGQzNzBiNmM2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.6FyaFr3XfonncoqH2Xh4Bkw0WMcisWzT2nKvvdQcsEU)
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: