@@ -1782,9 +1782,13 @@ impl ConnectionString {
17821782 srv_service_name: _,
17831783 wait_queue_timeout,
17841784 tls_insecure,
1785+ #[ cfg ( feature = "socks5-proxy" ) ]
17851786 proxy_host,
1787+ #[ cfg ( feature = "socks5-proxy" ) ]
17861788 proxy_port,
1789+ #[ cfg ( feature = "socks5-proxy" ) ]
17871790 proxy_username,
1791+ #[ cfg ( feature = "socks5-proxy" ) ]
17881792 proxy_password,
17891793 #[ cfg ( test) ]
17901794 original_uri: _,
@@ -2087,20 +2091,23 @@ impl ConnectionString {
20872091 opts. push_str ( & format ! ( "&srvMaxHosts={srv_max_hosts}" ) ) ;
20882092 }
20892093
2090- if let Some ( proxy_host) = proxy_host {
2091- opts. push_str ( & format ! ( "&proxyHost={proxy_host}" ) ) ;
2092- }
2094+ #[ cfg( feature = "socks5-proxy" ) ]
2095+ {
2096+ if let Some ( proxy_host) = proxy_host {
2097+ opts. push_str ( & format ! ( "&proxyHost={proxy_host}" ) ) ;
2098+ }
20932099
2094- if let Some ( proxy_port) = proxy_port {
2095- opts. push_str ( & format ! ( "&proxyPort={proxy_port}" ) ) ;
2096- }
2100+ if let Some ( proxy_port) = proxy_port {
2101+ opts. push_str ( & format ! ( "&proxyPort={proxy_port}" ) ) ;
2102+ }
20972103
2098- if let Some ( proxy_username) = proxy_username {
2099- opts. push_str ( & format ! ( "&proxyUsername={proxy_username}" ) ) ;
2100- }
2104+ if let Some ( proxy_username) = proxy_username {
2105+ opts. push_str ( & format ! ( "&proxyUsername={proxy_username}" ) ) ;
2106+ }
21012107
2102- if let Some ( proxy_password) = proxy_password {
2103- opts. push_str ( & format ! ( "&proxyPassword={proxy_password}" ) ) ;
2108+ if let Some ( proxy_password) = proxy_password {
2109+ opts. push_str ( & format ! ( "&proxyPassword={proxy_password}" ) ) ;
2110+ }
21042111 }
21052112
21062113 if !opts. is_empty ( ) {
0 commit comments