diff --git a/src/protocol/curl/ftp.c b/src/protocol/curl/ftp.c index c1331b86b..fa9a8a5fd 100644 --- a/src/protocol/curl/ftp.c +++ b/src/protocol/curl/ftp.c @@ -513,6 +513,10 @@ do_ftpes(struct connection *conn) curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t)get_opt_long("protocol.ftp.curl_max_recv_speed", NULL)); curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t)get_opt_long("protocol.ftp.curl_max_send_speed", NULL)); + char *interface = get_cmd_opt_str("bind-address"); + if (interface && *interface) { + curl_easy_setopt(curl, CURLOPT_INTERFACE, interface); + } //curl_easy_setopt(curl, CURLOPT_XFERINFODATA, conn); //curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_callback); diff --git a/src/protocol/curl/http.c b/src/protocol/curl/http.c index 84a1c840d..07d3decd9 100644 --- a/src/protocol/curl/http.c +++ b/src/protocol/curl/http.c @@ -207,6 +207,11 @@ do_http(struct connection *conn) curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t)get_opt_long("protocol.http.curl_max_recv_speed", NULL)); curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t)get_opt_long("protocol.http.curl_max_send_speed", NULL)); + char *interface = get_cmd_opt_str("bind-address"); + if (interface && *interface) { + curl_easy_setopt(curl, CURLOPT_INTERFACE, interface); + } + if (conn->uri->protocol == PROTOCOL_HTTPS) { char *ciphers = get_opt_str("protocol.https.curl_tls13_ciphers", NULL);