mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 07:03:45 +08:00
chore: set tun default stack
This commit is contained in:
parent
6df8140cb1
commit
609df5b4a6
@ -9,10 +9,12 @@
|
|||||||
|
|
||||||
### 2.0.2相对于2.0.1改进了:
|
### 2.0.2相对于2.0.1改进了:
|
||||||
|
|
||||||
|
- 只允许单例运行,防止多次启动造成的 bug
|
||||||
|
- Tun模式默认是还用内核推荐的 mixed 堆栈
|
||||||
- 改进了默认窗口大小(启动软件窗口不会那么小了)
|
- 改进了默认窗口大小(启动软件窗口不会那么小了)
|
||||||
- 改进了WebDAV备份超时时间机制
|
- 改进了 WebDAV 备份超时时间机制
|
||||||
- 测试菜单添加滚动条
|
- 测试菜单添加滚动条
|
||||||
- 改进和修正了Tun模式下对设置的覆盖逻辑
|
- 改进和修正了 Tun 模式下对设置的覆盖逻辑
|
||||||
- 修复了打开配置出错的问题
|
- 修复了打开配置出错的问题
|
||||||
- 修复了配置文件无法拖拽添加的问题
|
- 修复了配置文件无法拖拽添加的问题
|
||||||
- 改善了浅色模式的对比度
|
- 改善了浅色模式的对比度
|
||||||
|
@ -33,7 +33,7 @@ impl IClashTemp {
|
|||||||
let mut map = Mapping::new();
|
let mut map = Mapping::new();
|
||||||
let mut tun = Mapping::new();
|
let mut tun = Mapping::new();
|
||||||
tun.insert("enable".into(), false.into());
|
tun.insert("enable".into(), false.into());
|
||||||
tun.insert("stack".into(), "gvisor".into());
|
tun.insert("stack".into(), "mixed".into());
|
||||||
tun.insert("auto-route".into(), true.into());
|
tun.insert("auto-route".into(), true.into());
|
||||||
tun.insert("strict-route".into(), false.into());
|
tun.insert("strict-route".into(), false.into());
|
||||||
tun.insert("auto-detect-interface".into(), true.into());
|
tun.insert("auto-detect-interface".into(), true.into());
|
||||||
|
@ -22,7 +22,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
|
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [values, setValues] = useState({
|
const [values, setValues] = useState({
|
||||||
stack: "gvisor",
|
stack: "mixed",
|
||||||
device: "Mihomo",
|
device: "Mihomo",
|
||||||
autoRoute: true,
|
autoRoute: true,
|
||||||
autoDetectInterface: true,
|
autoDetectInterface: true,
|
||||||
@ -35,7 +35,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
open: () => {
|
open: () => {
|
||||||
setOpen(true);
|
setOpen(true);
|
||||||
setValues({
|
setValues({
|
||||||
stack: clash?.tun.stack ?? "gvisor",
|
stack: clash?.tun.stack ?? "mixed",
|
||||||
device: clash?.tun.device ?? "Mihomo",
|
device: clash?.tun.device ?? "Mihomo",
|
||||||
autoRoute: clash?.tun["auto-route"] ?? true,
|
autoRoute: clash?.tun["auto-route"] ?? true,
|
||||||
autoDetectInterface: clash?.tun["auto-detect-interface"] ?? true,
|
autoDetectInterface: clash?.tun["auto-detect-interface"] ?? true,
|
||||||
@ -64,7 +64,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
...(old! || {}),
|
...(old! || {}),
|
||||||
tun,
|
tun,
|
||||||
}),
|
}),
|
||||||
false
|
false,
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
await enhanceProfiles();
|
await enhanceProfiles();
|
||||||
@ -89,7 +89,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
size="small"
|
size="small"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
let tun = {
|
let tun = {
|
||||||
stack: "gvisor",
|
stack: "mixed",
|
||||||
device: "Mihomo",
|
device: "Mihomo",
|
||||||
"auto-route": true,
|
"auto-route": true,
|
||||||
"auto-detect-interface": true,
|
"auto-detect-interface": true,
|
||||||
@ -98,7 +98,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
mtu: 1500,
|
mtu: 1500,
|
||||||
};
|
};
|
||||||
setValues({
|
setValues({
|
||||||
stack: "gvisor",
|
stack: "mixed",
|
||||||
device: "Mihomo",
|
device: "Mihomo",
|
||||||
autoRoute: true,
|
autoRoute: true,
|
||||||
autoDetectInterface: true,
|
autoDetectInterface: true,
|
||||||
@ -112,7 +112,7 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
...(old! || {}),
|
...(old! || {}),
|
||||||
tun,
|
tun,
|
||||||
}),
|
}),
|
||||||
false
|
false,
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user