Open atomlab opened 3 months ago
@atomlab Didn't find where the API specification is?
folez
Unfortunately, I did not find any open implementation of the Amnezia API. In order to create my own implementation, it is necessary to find out what actions are performed on the server in Docker containers to generate configuration files and send them to the client. While studying the process, I found that the client sends a public key, which is then integrated into the main configuration file wg.conf on the server.
I hope that the developers will soon publish their API implementation. This would be preferable, as the API should evolve with the changes occurring in each new release to ensure compatibility.
AmneziaVPN provides parameters for API requests to obtain configuration in vpn:// format through a Telegram bot. To decode these parameters, you can use the decoder code (https://github.com/andr13/amnezia-config-decoder).
As a result, you will get the following:
Please indicate where I can find the API specifications and implementation at the endpoint
/api/v1/request/awg
, so I can set up my own API server.Note that API support is present in the file
amnezia-client/client/core/controllers/apiController.cpp
:https://github.com/amnezia-vpn/amnezia-client/blob/3458ed78d7d3f80a7b0b11f33462b355db93668f/client/core/controllers/apiController.cpp#L23