Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use cURL on specific interface

Tags:

c

linux

curl

I am developing a code in c, which simply FTPs the files on FTP server by using curl utility, by following this example

now i have one simple thing to do, specify curl to use particular interface (IP) of the server for upload, as other interface of the server is associated with other socket connection.

is there any way to do it?

like image 317
madiha malik Avatar asked Oct 11 '15 14:10

madiha malik


People also ask

What is curl interface?

curl is a tool for transferring data from or to a server. It supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET or TFTP. The command is designed to work without user interaction.

What protocol does curl use?

curl is a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, GOPHER, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction.


1 Answers

Seems like curl support --interface option

curl --interface eth0  
like image 57
MrFreezer Avatar answered Oct 02 '22 10:10

MrFreezer