File tree Expand file tree Collapse file tree 3 files changed +5
-13
lines changed
turbopack/crates/turbo-tasks-fetch/src Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -1740,7 +1740,6 @@ impl NextConfig {
1740
1740
. or ( self . experimental . turbopack_use_system_tls_certs )
1741
1741
. unwrap_or ( false ) ;
1742
1742
Ok ( ReqwestClientConfig {
1743
- proxy : None ,
1744
1743
tls_built_in_webpki_certs : !use_system_tls_certs,
1745
1744
tls_built_in_native_certs : use_system_tls_certs,
1746
1745
}
Original file line number Diff line number Diff line change @@ -481,6 +481,10 @@ export const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>
481
481
*
482
482
* This option is ignored on Windows on ARM, where the native TLS inplementation is always
483
483
* used.
484
+ *
485
+ * If you need to set a proxy, Turbopack [respects the common `HTTP_PROXY` and `HTTPS_PROXY`
486
+ * environment variable convention](https://docs.rs/reqwest/latest/reqwest/#proxies). HTTP
487
+ * proxies are supported, SOCKS proxies are not currently supported.
484
488
*/
485
489
turbopackUseSystemTlsCerts : z . boolean ( ) . optional ( ) ,
486
490
optimizePackageImports : z . array ( z . string ( ) ) . optional ( ) ,
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ pub enum ProxyConfig {
25
25
#[ turbo_tasks:: value( shared) ]
26
26
#[ derive( Hash ) ]
27
27
pub struct ReqwestClientConfig {
28
- pub proxy : Option < ProxyConfig > ,
29
28
/// Whether to load embedded webpki root certs with rustls. Default is true.
30
29
///
31
30
/// Ignored for:
@@ -44,7 +43,6 @@ pub struct ReqwestClientConfig {
44
43
impl Default for ReqwestClientConfig {
45
44
fn default ( ) -> Self {
46
45
Self {
47
- proxy : None ,
48
46
tls_built_in_webpki_certs : true ,
49
47
tls_built_in_native_certs : false ,
50
48
}
@@ -53,16 +51,7 @@ impl Default for ReqwestClientConfig {
53
51
54
52
impl ReqwestClientConfig {
55
53
fn try_build ( & self ) -> reqwest:: Result < reqwest:: Client > {
56
- let mut client_builder = reqwest:: Client :: builder ( ) ;
57
- match & self . proxy {
58
- Some ( ProxyConfig :: Http ( proxy) ) => {
59
- client_builder = client_builder. proxy ( reqwest:: Proxy :: http ( proxy. as_str ( ) ) ?)
60
- }
61
- Some ( ProxyConfig :: Https ( proxy) ) => {
62
- client_builder = client_builder. proxy ( reqwest:: Proxy :: https ( proxy. as_str ( ) ) ?)
63
- }
64
- None => { }
65
- } ;
54
+ let client_builder = reqwest:: Client :: builder ( ) ;
66
55
67
56
// make sure this cfg matches the one in `Cargo.toml`!
68
57
#[ cfg( not( any(
You can’t perform that action at this time.
0 commit comments