mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-26 20:50:30 +08:00
fix linux permission
This commit is contained in:
parent
f536f7c16c
commit
0d55272db8
@ -4,9 +4,4 @@
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 修复部分用户无法打开Sub-Store页面的问题
|
||||
- 修复Sub-Store无法复制的问题
|
||||
- 修复MacOS路径有空格导致内核启动失败的问题
|
||||
- 修复使用自建Sub-Store后端无法显示界面的问题
|
||||
- 修复导入本地订阅失败的问题
|
||||
- 修复Linux无法启动的问题
|
||||
- 修复Ubuntu下每次开启Tun都需要密码的问题
|
||||
|
||||
@ -174,9 +174,8 @@ export async function autoGrantCorePermition(corePath: string): Promise<void> {
|
||||
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<void>
|
||||
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}"`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -51,6 +51,7 @@ const ProxyItem: React.FC<Props> = (props) => {
|
||||
onPress={() => onSelect(group.name, proxy.name)}
|
||||
isPressable
|
||||
fullWidth
|
||||
shadow="sm"
|
||||
className={`${fixed ? 'bg-secondary/30' : selected ? 'bg-primary/30' : 'bg-content2'}`}
|
||||
radius="sm"
|
||||
>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user