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

Missing Web api #191

Open
3 of 8 tasks
greenhat616 opened this issue Nov 24, 2023 · 6 comments
Open
3 of 8 tasks

Missing Web api #191

greenhat616 opened this issue Nov 24, 2023 · 6 comments

Comments

@greenhat616
Copy link
Collaborator

greenhat616 commented Nov 24, 2023

Original API abstract definition:

r.Get("/", hello)
r.Get("/logs", getLogs)
r.Get("/traffic", traffic)
r.Get("/memory", memory)
r.Get("/version", version)
r.Get("/configs", getConfigs)
r.Put("/configs", updateConfigs)
r.Post("/configs/geo", updateGeoDatabases)
r.Patch("/configs", patchConfigs)
r.Get("/proxies", getProxies)
r.Get("/proxies/{name}", getProxy)
r.Get("/proxies/{name}/delay", getProxyDelay)
r.Put("/proxies/{name}", updateProxy)
r.Get("/group", getGroups)
r.Get("/group/{name}", getGroup)
r.Get("/group/{name}/delay", getGroupDelay)
r.Get("/rules", getRules)
r.Get("/connections", getConnections)
r.Delete("/connections", closeAllConnections)
r.Delete("/connections/{id}", closeConnection)
r.Get("/providers/proxies", getProviders)
r.Get("/providers/proxies/{providerName}", getProvider)
r.Put("/providers/proxies/{providerName}", updateProvider)
r.Get("/providers/proxies/{providerName}/healthcheck", healthCheckProvider)
r.Get("/providers/proxies/{providerName}/{name}", getProxy)
r.Get("/providers/proxies/{providerName}/{name}/healthcheck", getProxyDelay)
r.Get("/providers/rules", getRuleProviders)
r.Put("/providers/rules/{name}", updateRuleProvider)
r.Post("/cache/fakeip/flush", flushFakeIPPool)
r.Get("/dns/query", queryDNS)
r.Post("/restart", restart)
r.Post("/upgrade", upgradeCore)
r.Post("/upgrade/ui", updateUI)

These api impl are missing:

@ibigbug
Copy link
Member

ibigbug commented Nov 24, 2023

are some of these from the premium core? i don't remember seeing all of them from the open sourced clash snapshot

@greenhat616
Copy link
Collaborator Author

greenhat616 commented Nov 24, 2023

are some of these from the premium core? i don't remember seeing all of them from the open sourced clash snapshot

You reminded me that indeed Clash Core is missing these interfaces. they are premium and meta only. 🥲

@ibigbug
Copy link
Member

ibigbug commented Nov 26, 2023

are any of these critical to the clash-verge? i guess we can start adding those required ones and have it run in degraded until all get implemented

@greenhat616
Copy link
Collaborator Author

greenhat616 commented Nov 27, 2023

are any of these critical to the clash-verge? i guess we can start adding those required ones and have it run in degraded until all get implemented

I should confirm it later.
Moreover, /providers/rules breaks yacd webui, ref https://github.com/haishanh/yacd/blob/master/src/api/rule-provider.ts

EDITED: I test the latest comit in master branch and it can access all endpoint what verges use, and I have post a pr(libnyanpasu/clash-nyanpasu#23) to support this kernel in this wide-known clash-verge fork.

@greenhat616
Copy link
Collaborator Author

greenhat616 commented Dec 15, 2023

Nyanpasu have supported to manage rules providers since libnyanpasu/clash-nyanpasu#155, which is depended on /providers/rules

And as user's feedback, it seems that the PUT /config interface, which is incompatible with normal clash. libnyanpasu/clash-nyanpasu#107

@ibigbug
Copy link
Member

ibigbug commented Dec 16, 2023

thanks for the reporting.

that API wasn't implemented

StatusCode::NOT_IMPLEMENTED,

I can have a look after finishing the current wireguard part

This was referenced Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants