chore: set tun default stack

This commit is contained in:
wonfen
2024-11-28 04:22:13 +08:00
parent 6df8140cb1
commit 609df5b4a6
3 changed files with 11 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
const [open, setOpen] = useState(false);
const [values, setValues] = useState({
stack: "gvisor",
stack: "mixed",
device: "Mihomo",
autoRoute: true,
autoDetectInterface: true,
@@ -35,7 +35,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
open: () => {
setOpen(true);
setValues({
stack: clash?.tun.stack ?? "gvisor",
stack: clash?.tun.stack ?? "mixed",
device: clash?.tun.device ?? "Mihomo",
autoRoute: clash?.tun["auto-route"] ?? true,
autoDetectInterface: clash?.tun["auto-detect-interface"] ?? true,
@@ -64,7 +64,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
...(old! || {}),
tun,
}),
false
false,
);
try {
await enhanceProfiles();
@@ -89,7 +89,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
size="small"
onClick={async () => {
let tun = {
stack: "gvisor",
stack: "mixed",
device: "Mihomo",
"auto-route": true,
"auto-detect-interface": true,
@@ -98,7 +98,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
mtu: 1500,
};
setValues({
stack: "gvisor",
stack: "mixed",
device: "Mihomo",
autoRoute: true,
autoDetectInterface: true,
@@ -112,7 +112,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
...(old! || {}),
tun,
}),
false
false,
);
}}
>