mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
refactor: change core binary name
This commit is contained in:
@@ -70,8 +70,8 @@ export const LayoutTraffic = () => {
|
||||
);
|
||||
|
||||
/* --------- meta memory information --------- */
|
||||
const isMetaCore = verge?.clash_core?.includes("clash-meta");
|
||||
const displayMemory = isMetaCore && (verge?.enable_memory_usage ?? true);
|
||||
|
||||
const displayMemory = verge?.enable_memory_usage ?? true;
|
||||
|
||||
const { data: memory = { inuse: 0 } } = useSWRSubscription<
|
||||
MemoryUsage,
|
||||
|
||||
@@ -12,8 +12,8 @@ import { closeAllConnections, upgradeCore } from "@/services/api";
|
||||
import getSystem from "@/utils/get-system";
|
||||
|
||||
const VALID_CORE = [
|
||||
{ name: "Clash Meta", core: "clash-meta" },
|
||||
{ name: "Clash Meta Alpha", core: "clash-meta-alpha" },
|
||||
{ name: "Mihomo", core: "verge-mihomo" },
|
||||
{ name: "Mihomo Alpha", core: "verge-mihomo-alpha" },
|
||||
];
|
||||
|
||||
const OS = getSystem();
|
||||
@@ -31,7 +31,7 @@ export const ClashCoreViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
close: () => setOpen(false),
|
||||
}));
|
||||
|
||||
const { clash_core = "clash-meta" } = verge ?? {};
|
||||
const { clash_core = "verge-mihomo" } = verge ?? {};
|
||||
|
||||
const onCoreChange = useLockFn(async (core: string) => {
|
||||
if (core === clash_core) return;
|
||||
|
||||
@@ -23,7 +23,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
const [open, setOpen] = useState(false);
|
||||
const [values, setValues] = useState({
|
||||
stack: "gvisor",
|
||||
device: "Meta",
|
||||
device: "Mihomo",
|
||||
autoRoute: true,
|
||||
autoDetectInterface: true,
|
||||
dnsHijack: ["any:53"],
|
||||
@@ -36,7 +36,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
setOpen(true);
|
||||
setValues({
|
||||
stack: clash?.tun.stack ?? "gvisor",
|
||||
device: clash?.tun.device ?? "Meta",
|
||||
device: clash?.tun.device ?? "Mihomo",
|
||||
autoRoute: clash?.tun["auto-route"] ?? true,
|
||||
autoDetectInterface: clash?.tun["auto-detect-interface"] ?? true,
|
||||
dnsHijack: clash?.tun["dns-hijack"] ?? ["any:53"],
|
||||
@@ -51,7 +51,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
try {
|
||||
let tun = {
|
||||
stack: values.stack,
|
||||
device: values.device === "" ? "Meta" : values.device,
|
||||
device: values.device === "" ? "Mihomo" : values.device,
|
||||
"auto-route": values.autoRoute,
|
||||
"auto-detect-interface": values.autoDetectInterface,
|
||||
"dns-hijack": values.dnsHijack[0] === "" ? [] : values.dnsHijack,
|
||||
@@ -90,7 +90,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
onClick={async () => {
|
||||
let tun = {
|
||||
stack: "gvisor",
|
||||
device: "Meta",
|
||||
device: "Mihomo",
|
||||
"auto-route": true,
|
||||
"auto-detect-interface": true,
|
||||
"dns-hijack": ["any:53"],
|
||||
@@ -99,7 +99,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
};
|
||||
setValues({
|
||||
stack: "gvisor",
|
||||
device: "Meta",
|
||||
device: "Mihomo",
|
||||
autoRoute: true,
|
||||
autoDetectInterface: true,
|
||||
dnsHijack: ["any:53"],
|
||||
@@ -151,7 +151,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
spellCheck="false"
|
||||
sx={{ width: 250 }}
|
||||
value={values.device}
|
||||
placeholder="Meta"
|
||||
placeholder="Mihomo"
|
||||
onChange={(e) =>
|
||||
setValues((v) => ({ ...v, device: e.target.value }))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user