-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
API for integrations and automatization #1391
Comments
To use it, you can use the documentation in the API section in the link below: |
The panel is using rest api to interact to the backend so you can easily simulate the requests and send them to the backend. all you need is just a valid cookie that can be gathered by send a post request to /login I have implemented a telegram bot which talks to XUI in order to create users and retrieve information from the outbounds. you might find it useful https://github.com/mhsenpc/xui-telegram-bot the implemented code to interact to XUI is in this directory |
Important addition to my issue @mhsenpc @fuad00: this is related to frontend clients building. Sorry for not narrowing the scope of the problem before. I am building a web app as frontend client for X-UI's Go server. The problem is: there is authentication flow that gives you cookie tied to specific domain after Not even mentioning CORS restriction but it can be bypassed with NGINX reverse proxy running next to X-UI's instance. We have:
Frontend client tries to login. It logins successfully but the cookie it gets relies to Conclusion: Postman works good, 3rd party frontend clients cannot work because cookie is inaccessible. |
Is your feature request related to a problem? Please describe.
As a developer, I want to extend X-UI capabilities and automate its deployment and configuration. I want a separate API to manage all its configuration and adding/editing/removing users/inbounds/outbounds, and so on.
Describe the solution you'd like
I want X-UI to have a separate entrypoint; the default one could be
/api
, but with security in mind: it could be PAT, or cookie, or special custom query string with special processing on backend, whatever. Any possible miss and X-UI' server responds as if/api
did not ever exist.Describe alternatives you've considered
I tried to run NGINX and Caddy proxy next to X-UI to avoid CORS and access X-UI's internal API, but with no luck: X-UI asks for cookie file and then responds with HTTP 301 Redirect. I managed to bypass this protection but it is overly complicated, with no documentation at all.
Why is it needed
When you deploy new X-UI instance to a server, it is hard to configure it automatically. Of course, you can automatically generate and configure bare XRay... but X-UI offers much more capabilities with more convenient way, and subscriptions is the top feature.
The text was updated successfully, but these errors were encountered: