Forum: Ruby Tricky socks question: changing source IP on Net::HTTP

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
41e1579600683eed6c00af9a425268e6?d=identicon&s=25 epfrederick@gmail.com (Guest)
on 2007-06-29 06:55
(Received via mailing list)
Howdy,

I've got an interface with multiple IP addresses and I'm looking to
make HTTP requests from the non-primary IP.

How would I pull that off?

Cheers,

Eddie
15a5043475dac9278ae75efb4c71f1f6?d=identicon&s=25 Felix Windt (Guest)
on 2007-06-29 17:32
(Received via mailing list)
I may well be wrong, but I don't think you can set that programatically.
What you could do, though, is either make that virtual interface - I'm
assuming you're using virtual interfaces to implement multiple IP
address on
an interface - the default route via the OS functions, or run a proxy on
that
virtual interface and set Net::HTTP to use that proxy.

*waits to be corrected as I'm not too familiar with Net::HTTP*

HTH,

Felix
This topic is locked and can not be replied to.