A
A
Andrey2017-06-04 19:41:05
linux
Andrey, 2017-06-04 19:41:05

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 answer(s)
T
TyzhSysAdmin, 2017-06-04
@andrshpa

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');

2.) Yes, anyone who knows how to configure, since you have already configured 3proxy, then take it.
In general, thinking about which server to choose for your own use is somehow a question of nothing. :)
3) Yes there is - use a VPN. Less hemorrhoids and everything rises much easier.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question