Jump to content

Question

Posted

Здравствуйте!

Я пытаюсь написать приложение, которое будет включать и отключать VPN на роутере Keenetic через REST API. При обращении к адресу  http://localhost/rci не удаётся авторизоваться. Как я это могу сделать?

1 answer to this question

Recommended Posts

  • 0
Posted
20 hours ago, Waxby said:

Здравствуйте!

Я пытаюсь написать приложение, которое будет включать и отключать VPN на роутере Keenetic через REST API. При обращении к адресу  http://localhost/rci не удаётся авторизоваться. Как я это могу сделать?

Если исполняться будет локально (из entware), то API доступно на 79 порту (без авторизации).

curl http://localhost:79/rci/show/version

Есть такой вариант (главное не забыть про пароль):
https://help.keenetic.com/hc/ru/articles/11282223272092-Применение-методов-API-посредством-сервиса-HTTP-Proxy

Можно обращаться к веб-морде, но там авторизация немного сложнее. Готовые примеры есть на гитхабе ("keenetic rci github", интеграции с home assistant), форуме и т.д.
https://github.com/akinin/ha_keenetic/blob/main/custom_components/ha_keenetic/api.py#L33
https://gist.github.com/ancientGlider/e72cdaa2daf0af5f8d80f53fea4666be#file-keenetic_auth-py-L25

 

  • Thanks 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

This site uses cookies. By clicking "I accept" or continuing to browse the site, you authorize their use in accordance with the Privacy Policy.