14.07.2014, 06:38
I have a web API that processes HTTP requests from SA-MP Servers. On my web API, I have a list of servers (in a database). When a server sends a request to my API, the API will check where the request is coming from (the source IP) and will allow it to perform actions on the server(s) with the same IP.
So let's say a SA-MP server with IP "127.0.01:7777" sends a HTTP(); to my API with some data. My API will check the source (127.0.0.1), look for any servers it has in it's database (could be 127.0.0.1:777, or any other port).
If it finds a match, it will process the request using this IP. This way IP 127.0.0.1 can only do stuff with servers with the same IP. A request coming from 94.126.3.15 can not perform action on a server with IP 94.133.25.5, and vice versa.
An illustration:
All this is based on the fact that, if a request is coming from a SA-MP server with IP X, this server owns the right to control server X on my web API.
I need to establish a secure connetion between a SA-MP server and the server on my web API. Is this the way to go? How do I make sure the request is always coming from the actual server, i.o.w that I know 100% for sure that the request send from a server is actually coming from this server and that the IP or any other data was not spoofed?
So let's say a SA-MP server with IP "127.0.01:7777" sends a HTTP(); to my API with some data. My API will check the source (127.0.0.1), look for any servers it has in it's database (could be 127.0.0.1:777, or any other port).
If it finds a match, it will process the request using this IP. This way IP 127.0.0.1 can only do stuff with servers with the same IP. A request coming from 94.126.3.15 can not perform action on a server with IP 94.133.25.5, and vice versa.
An illustration:
All this is based on the fact that, if a request is coming from a SA-MP server with IP X, this server owns the right to control server X on my web API.
I need to establish a secure connetion between a SA-MP server and the server on my web API. Is this the way to go? How do I make sure the request is always coming from the actual server, i.o.w that I know 100% for sure that the request send from a server is actually coming from this server and that the IP or any other data was not spoofed?