feat: add base clash api methods

This commit is contained in:
divocat
2025-10-05 16:09:26 +03:00
parent 341f260fcf
commit c75dd3e78b
11 changed files with 233 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import { ClashAPI, IBaseApiResponse } from '../types';
import { createBaseApiRequest } from './createBaseApiRequest';
export async function getClashConfig(): Promise<
IBaseApiResponse<ClashAPI.Config>
> {
return createBaseApiRequest<ClashAPI.Config>(() =>
fetch('http://192.168.160.129:9090/configs', {
method: 'GET',
headers: { 'Content-Type': 'application/json' },
}),
);
}