Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: support clash premium's structured log stream #735

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

NyaMisty
Copy link

@NyaMisty NyaMisty commented Sep 7, 2023

New version of Clash for Windows uses ws://external-controller/logs?token=&level=info&format=structured to get real time log. When Clash Premium Core reveices format=structured, it returns a different form of JSON log entry. Supporting this feature will allow better Clash for Windows integration

New version of Clash for Windows uses `ws://external-controller/logs?token=&level=info&format=structured` to get real time log. When Clash Premium Core reveices `format=structured`, it returns a different form of JSON log entry. Supporting this feature will allow better Clash for Windows integration

Signed-off-by: Misty <gyc990326@gmail.com>
@@ -364,5 +395,5 @@ func getLogs(w http.ResponseWriter, r *http.Request) {
}

func version(w http.ResponseWriter, r *http.Request) {
render.JSON(w, r, render.M{"meta": C.Meta, "version": C.Version})
render.JSON(w, r, render.M{"mete": C.Meta, "version": C.Version})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this intentional?

@wwqgtxx wwqgtxx merged commit 10e7c53 into MetaCubeX:Alpha Sep 29, 2023
Larvan2 pushed a commit that referenced this pull request Dec 2, 2023
* feat: support clash premium's structured log stream

New version of Clash for Windows uses `ws://external-controller/logs?token=&level=info&format=structured` to get real time log. When Clash Premium Core reveices `format=structured`, it returns a different form of JSON log entry. Supporting this feature will allow better Clash for Windows integration

Signed-off-by: Misty <gyc990326@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants