Reputation: 198
I have a Linux server with multiple network interfaces. Each interface has its own IP address. How to force HTTP requests to use a specific interface by specifying its IP address? Just like curl --interface command line option.
Upvotes: 4
Views: 1975
Reputation: 766
You'd need to build your own HttpConnector
probably starting from the vanilla connector, perhaps using net2::TcpBuilder
.
This is definitely something that seems like it should be easier, perhaps specified in the config. You might want to open an issue for hyper or submit a pull request if you implement it yourself.
Upvotes: 2