Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ubus for authentication for better integration with OpenWRT luci #7444

Open
3 tasks done
yshui opened this issue Nov 16, 2024 · 0 comments
Open
3 tasks done

Use ubus for authentication for better integration with OpenWRT luci #7444

yshui opened this issue Nov 16, 2024 · 0 comments

Comments

@yshui
Copy link

yshui commented Nov 16, 2024

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • I want to request a feature or enhancement and not ask a question

The problem

With AdGuardHome running on an openwrt router, I need to separately log into openwrt and adguardhome's web interfaces, which is inconvenient.

Proposed solution

I search the codebase and noticed there is a special "GLMode" authentication, which reads a token file from /tmp:

// GLMode - enable GL-Inet compatibility mode

GL-Inet turns out to be a router manufacturer, so I assume this mode is so that users that have logged into the router's interface don't have to log into AGH again.

I think OpenWRT can get similar treatment. OpenWRT's web interface uses ubus for authentication, and all current sessions can be listed by running ubus call session list on the router. So in theory AGH can use ubus to check if a session token is valid or not.

Alternatives considered and additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant