diff --git a/changelog.md b/changelog.md index 6fe1f9a..980429c 100644 --- a/changelog.md +++ b/changelog.md @@ -4,9 +4,4 @@ ### Bug Fixes -- 修复部分用户无法打开Sub-Store页面的问题 -- 修复Sub-Store无法复制的问题 -- 修复MacOS路径有空格导致内核启动失败的问题 -- 修复使用自建Sub-Store后端无法显示界面的问题 -- 修复导入本地订阅失败的问题 -- 修复Linux无法启动的问题 +- 修复Ubuntu下每次开启Tun都需要密码的问题 diff --git a/src/main/core/manager.ts b/src/main/core/manager.ts index 7a499f9..6b430a1 100644 --- a/src/main/core/manager.ts +++ b/src/main/core/manager.ts @@ -174,9 +174,8 @@ export async function autoGrantCorePermition(corePath: string): Promise { const password = safeStorage.decryptString(Buffer.from(encryptedPassword)) if (process.platform === 'linux') { try { - await execPromise( - `echo "${password}" | sudo -S setcap cap_net_bind_service,cap_net_admin,cap_sys_ptrace,cap_dac_read_search,cap_dac_override,cap_net_raw=+ep "${corePath}"` - ) + await execPromise(`echo "${password}" | sudo -S chown root:root "${corePath}"`) + await execPromise(`echo "${password}" | sudo -S chmod +sx "${corePath}"`) } catch (error) { patchAppConfig({ encryptedPassword: undefined }) throw error @@ -204,9 +203,8 @@ export async function manualGrantCorePermition(password?: string): Promise await execPromise(`osascript -e '${command}'`) } if (process.platform === 'linux') { - await execPromise( - `echo "${password}" | sudo -S setcap cap_net_bind_service,cap_net_admin,cap_sys_ptrace,cap_dac_read_search,cap_dac_override,cap_net_raw=+ep "${corePath}"` - ) + await execPromise(`echo "${password}" | sudo -S chown root:root "${corePath}"`) + await execPromise(`echo "${password}" | sudo -S chmod +sx "${corePath}"`) } } diff --git a/src/renderer/src/components/proxies/proxy-item.tsx b/src/renderer/src/components/proxies/proxy-item.tsx index 66bff0e..ef95621 100644 --- a/src/renderer/src/components/proxies/proxy-item.tsx +++ b/src/renderer/src/components/proxies/proxy-item.tsx @@ -51,6 +51,7 @@ const ProxyItem: React.FC = (props) => { onPress={() => onSelect(group.name, proxy.name)} isPressable fullWidth + shadow="sm" className={`${fixed ? 'bg-secondary/30' : selected ? 'bg-primary/30' : 'bg-content2'}`} radius="sm" >