curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: setting Interface precedence in libcurl

From: Patrick Monnerat via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 8 Aug 2019 11:51:57 +0200

On 8/7/19 11:42 PM, Daniel Stenberg via curl-library wrote:
> On Wed, 7 Aug 2019, Praveen Pvs via curl-library wrote:
>
>> Is there way to set the precedence of interface(media/network) in
>> libcurl? I wanted to set the order as ETH0, WLAN0, GPRS0,BT/WLAN
>
> libcurl only lets you set a single interface to use so if you want to
> try a set in an order, you need to do that in the application and move
> on the next on transfer failure, or similar.
>
As a dirty system-wide workaround, you can also play with the route
metrics (replace the routes set by the kernel by similar ones with
different metrics). This will force the kernel to chose the "cheaper"
interface, but this can also have strange side effects: you've been warned.

In any case you're on your own for that: this is external to libcurl,
requires root access, related to kernel and thus you won't have much
support for that on this list.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-08-08