[GH-ISSUE #1063] Feature request: Add support expiration time for Telegram API config #358

Open
opened 2026-10-14 03:19:52 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @kolsys on GitHub (Sep 12, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1063

We are making in-house authentication server based on AmneziaVPN and config API.
Currently the expiration API key is sets to +1 day and API config reloads only 1 time per day.
We want to add possibility to provide expiration time of API config.

$config = [
    'dns1' => $dns1,
    'dns2' => $dns2,
    'hostName' => $vpnHost,
    'defaultContainer' => 'amnezia-awg',
    'api_config' => [
        'public_key'=> [
            'end_date' => $expiresAt,
        ],
    ],
    'containers' => [
        $awgContainer,
    ],
];

github.com/amnezia-vpn/amnezia-client@fff15fffe2/client/core/controllers/apiController.cpp (L121)

Something like this

    if (apiConfig.value(config_key::configVersion).toInt() == ApiConfigSources::Telegram) {
            serverConfig["api_config"] = apiConfig.value("api_config");
    }
Originally created by @kolsys on GitHub (Sep 12, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1063 We are making in-house authentication server based on AmneziaVPN and config API. Currently the expiration API key is sets to +1 day and API config reloads only 1 time per day. We want to add possibility to provide expiration time of API config. ```PHP $config = [ 'dns1' => $dns1, 'dns2' => $dns2, 'hostName' => $vpnHost, 'defaultContainer' => 'amnezia-awg', 'api_config' => [ 'public_key'=> [ 'end_date' => $expiresAt, ], ], 'containers' => [ $awgContainer, ], ]; ``` https://github.com/amnezia-vpn/amnezia-client/blob/fff15fffe2b8f98cd2e11e452ba9a546eed4620c/client/core/controllers/apiController.cpp#L121 Something like this ```CPP if (apiConfig.value(config_key::configVersion).toInt() == ApiConfigSources::Telegram) { serverConfig["api_config"] = apiConfig.value("api_config"); } ```
Author
Owner

@Nethius commented on GitHub (Sep 20, 2024):

I don't understand what you want

<!-- gh-comment-id:2364130865 --> @Nethius commented on GitHub (Sep 20, 2024): I don't understand what you want
Author
Owner

@kolsys commented on GitHub (Sep 23, 2024):

I don't understand what you want

I want allow to setting up config expiration time via Telegram API and not only via server API. It's required for the forcing reload config on a next connect.

<!-- gh-comment-id:2368666597 --> @kolsys commented on GitHub (Sep 23, 2024): > I don't understand what you want I want allow to setting up config expiration time via Telegram API and not only via server API. It's required for the forcing reload config on a next connect.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#358
No description provided.