xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 2 | SPDX-License-Identifier: curl |
| 3 | Long: interface |
| 4 | Arg: <name> |
| 5 | Help: Use network INTERFACE (or address) |
| 6 | See-also: dns-interface |
| 7 | Category: connection |
| 8 | Example: --interface eth0 $URL |
| 9 | Added: 7.3 |
| 10 | Multi: single |
| 11 | --- |
| 12 | Perform an operation using a specified interface. You can enter interface |
| 13 | name, IP address or host name. An example could look like: |
| 14 | |
| 15 | curl --interface eth0:1 https://www.example.com/ |
| 16 | |
| 17 | On Linux it can be used to specify a VRF, but the binary needs to either |
| 18 | have CAP_NET_RAW or to be run as root. More information about Linux VRF: |
| 19 | https://www.kernel.org/doc/Documentation/networking/vrf.txt |