How to make requests to multiple ip?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
Good time of day. Have dedicated server and in addition to the main ip address is optional. I need to make requests to various sites on the Internet so that I could choose from what ip address made the request. How can I do that?
by | 45 views

3 Answers

0 like 0 dislike
I would have solved this issue installing squid proxy on this comp. Configure squid so that turning to 3128 took requests from the same IP, at the address 3129 with the second IP.
In the application that requests just add the use proxy
0 like 0 dislike
It depends on what and how )

Here from man curl:
Perform an operation using a specified interface. You can enter interface name, IP address or host name. An example could look like:
curl --interface eth0:1
If this option is used several times, the last one will be used.

If you want to write to make this program by yourself, you should refer to the documentation of the implementation of network sockets in the close language.
So specific ip address prikolachivayte to the future TCP connection in C:
When a socket is created with socket(2), it exists in a name space
(address family) but has no address assigned to it. bind() assigns
the address specified by addr to the socket referred to by the file
descriptor sockfd. addrlen specifies the size, in bytes, of the
address structure pointed to by addr. Traditionally, this operation
is called “assigning a name to a socket”.
0 like 0 dislike
the idea you have to help cgroups.

Related questions

0 like 0 dislike
7 answers
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
35,390 users