Answer the question
In order to leave comments, you need to log in
Creation of a proxy service. How to implement the API?
Greetings connoisseurs.
There was a need to create your own proxy service (not commercial, for personal purposes), with API support. The API is quite simple - it selects and returns the ip:port list upon appropriate requests.
In linux experience is small, but there is. I set my proxy to 3proxy.
Now there are such questions:
1) How to implement the API?
Now I see it like this: write the API itself in PHP, store information about proxies in the mySQL database. It doesn't seem very badass.
But I could not quickly find how to save the list of IPs in the database or in general in any convenient format?
2) which server to choose?
Now I'm choosing between
3proxy
tinyproxy
Squid
, maybe there are other better options? what to choose from these?
3) maybe there is a ready-made solution server + API operation, and there is no need to reinvent the wheel?
In general, advise what to read on the topic, because. I suspect that my questions are "not very professional". Thanks in advance.
Answer the question
In order to leave comments, you need to log in
1) Well, create a database and push addresses there
CREATE TABLE servers(
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30) NOT NULL,
addr VARCHAR(15) NOT NULL,
port VARCHAR(5) NOT NULL,
)
INSERT INTO servers (name, addr,port)
VALUES ('mega puper server','100.100.100.100','8888');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question