mirror of
https://github.com/Dichgrem/Blog.git
synced 2025-07-31 17:09:30 -04:00
229 lines
8.2 KiB
HTML
229 lines
8.2 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
|
||
<head>
|
||
<title>Dich'blog</title>
|
||
|
||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||
<meta name="robots" content="noodp"/>
|
||
|
||
<link rel="stylesheet" href="https://blog.dich.bid/style.css">
|
||
<link rel="stylesheet" href="https://blog.dich.bid/color/blue.css">
|
||
|
||
<link rel="stylesheet" href="https://blog.dich.bid/color/background_dark.css">
|
||
|
||
<link rel="stylesheet" href="https://blog.dich.bid/font-hack-subset.css">
|
||
|
||
<meta name="description" content="">
|
||
|
||
<meta property="og:description" content="">
|
||
<meta property="og:title" content="Dich'blog">
|
||
<meta property="og:type" content="article">
|
||
<meta property="og:url" content="https://blog.dich.bid/about-gfs/">
|
||
|
||
<meta name="twitter:card" content="summary_large_image">
|
||
<meta name="twitter:description" content="">
|
||
<meta name="twitter:title" content="Dich'blog">
|
||
<meta property="twitter:domain" content="blog.dich.bid">
|
||
<meta property="twitter:url" content="https://blog.dich.bid/about-gfs/">
|
||
|
||
<link rel="alternate" type="application/atom+xml" title="Dich'blog Atom Feed" href="https://blog.dich.bid/atom.xml" />
|
||
|
||
|
||
<link rel="icon" type="image/png" href=/dich.webp />
|
||
|
||
<!-- ✅ Added center alignment styles -->
|
||
<style>
|
||
.footer {
|
||
text-align: center;
|
||
padding: 1rem 0;
|
||
}
|
||
|
||
.footer__inner {
|
||
display: flex;
|
||
justify-content: center;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
}
|
||
|
||
.copyright {
|
||
text-align: center;
|
||
}
|
||
</style>
|
||
</head>
|
||
|
||
<body class="">
|
||
<div class="container">
|
||
|
||
<header class="header">
|
||
<div class="header__inner">
|
||
<div class="header__logo">
|
||
|
||
<a href="https://blog.dich.bid" style="text-decoration: none;">
|
||
<div class="logo">
|
||
|
||
Dich'blog
|
||
|
||
</div>
|
||
</a>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<nav class="menu">
|
||
<ul class="menu__inner">
|
||
<li><a href="https://blog.dich.bid">blog</a></li>
|
||
|
||
<li><a href="https://blog.dich.bid/archive">archive</a></li>
|
||
|
||
<li><a href="https://blog.dich.bid/tags">tags</a></li>
|
||
|
||
<li><a href="https://blog.dich.bid/weekly">weekly</a></li>
|
||
|
||
<li><a href="https://blog.dich.bid/search">search</a></li>
|
||
|
||
<li class="active"><a href="https://blog.dich.bid/about">about me</a></li>
|
||
|
||
<li><a href="https://blog.dich.bid/links">links</a></li>
|
||
|
||
<li><a href="https://blog.dich.bid/atom.xml">rss</a></li>
|
||
|
||
<li><a href="https://github.com/Dichgrem" target="_blank" rel="noopener noreferrer">github</a></li>
|
||
</ul>
|
||
</nav>
|
||
|
||
|
||
|
||
</header>
|
||
|
||
|
||
<div class="content">
|
||
|
||
<div class="post">
|
||
|
||
<h1 class="post-title"><a href="https://blog.dich.bid/about-gfs/">乱七八糟:GFS项目考量笔记</a></h1>
|
||
<div class="post-meta-inline">
|
||
|
||
<span class="post-date">
|
||
2025-03-18
|
||
</span>
|
||
|
||
</div>
|
||
|
||
|
||
<span class="post-tags-inline">
|
||
:: tags:
|
||
<a class="post-tag" href="https://blog.dich.bid/tags/luan-qi-ba-zao/">#乱七八糟</a></span>
|
||
|
||
|
||
<div class="post-content">
|
||
<p>前言 最近nekoray项目归档,考量新的singbox前端时发现这个项目不错,不过在Arch linux中运行有一些小问题,这里做个总结。</p>
|
||
<span id="continue-reading"></span><h2 id="an-zhuang-zui-xin-ban">安装最新版:</h2>
|
||
<p>安装gui-for-singbox的时候发现仓库的1.9.2版本release被作者删除,无法安装,于是:</p>
|
||
<ul>
|
||
<li>在AUR仓库中下载<strong>aur-gui-for-singbox.tar.gz</strong>,解压进入aur-gui-for-singbox目录;</li>
|
||
<li><strong>更改.SRCINFO文件</strong>,使其版本号为最新;</li>
|
||
<li><strong>使用makepkg -si构建并安装</strong>这个包,缺少的png图片可以直接下载并放进目录;</li>
|
||
<li>如果有错误<strong>刷新密钥环</strong>(sudo pacman-key --refresh-keys);</li>
|
||
</ul>
|
||
<h2 id="wu-fa-da-kai-wu-fa-shi-yong-tunmo-shi">无法打开/无法使用TUN模式:</h2>
|
||
<ul>
|
||
<li>安装成功,进入<code>/opt/gui-for-singbox</code>,运行<code>sudo chown -R your_username:your_group /opt/gui-for-singbox</code>,使其可以被非root用户启动;</li>
|
||
<li>执行<code>sudo setcap cap_net_bind_service,cap_net_admin,cap_dac_override=+ep /opt/gui-for-singbox/your_executable</code>命令,并在设置-内核中点击盾牌-钥匙图标,使Tun模式可以有特权运行。</li>
|
||
</ul>
|
||
<h2 id="mian-mi-ma-yun-xing-tunmo-shi">免密码运行TUN模式:</h2>
|
||
<ul>
|
||
<li>检查 polkit 服务是否正在运行</li>
|
||
</ul>
|
||
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>systemctl status polkit
|
||
</span></code></pre>
|
||
<ul>
|
||
<li>若返回状态为除 active (running) 之外的结果,运行</li>
|
||
</ul>
|
||
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>sudo systemctl enable --now polkit
|
||
</span></code></pre>
|
||
<ul>
|
||
<li>创建 polkit 策略</li>
|
||
</ul>
|
||
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>sudo vi /etc/polkit-1/rules.d/99-nopassword.rules
|
||
</span></code></pre>
|
||
<ul>
|
||
<li>添加以下内容并保存退出</li>
|
||
</ul>
|
||
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>polkit.addRule(function (action, subject) {
|
||
</span><span> if (
|
||
</span><span> (action.id == "org.freedesktop.resolve1.set-domains" ||
|
||
</span><span> action.id == "org.freedesktop.resolve1.set-default-route" ||
|
||
</span><span> action.id == "org.freedesktop.resolve1.set-dns-servers") &&
|
||
</span><span> subject.local &&
|
||
</span><span> subject.active &&
|
||
</span><span> subject.isInGroup("wheel")
|
||
</span><span> ) {
|
||
</span><span> return polkit.Result.YES;
|
||
</span><span> }
|
||
</span><span>});
|
||
</span></code></pre>
|
||
<ul>
|
||
<li>将当前用户添加至 wheel 组中,注意Debian 与衍生系统需要先创建 wheel 组,然后运行:</li>
|
||
</ul>
|
||
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>sudo usermod -G wheel 当前用户
|
||
</span></code></pre>
|
||
<ul>
|
||
<li>重新加载 polkit 使更改生效</li>
|
||
</ul>
|
||
<pre style="background-color:#151515;color:#e8e8d3;"><code><span>sudo systemctl restart polkit
|
||
</span></code></pre>
|
||
<hr />
|
||
<p><strong>Done.</strong></p>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="pagination">
|
||
<div class="pagination__title">
|
||
<span class="pagination__title-h">Thanks for reading! Read other posts?</span>
|
||
<hr />
|
||
</div>
|
||
<div class="pagination__buttons">
|
||
<span class="button previous">
|
||
<a href="https://blog.dich.bid/about-frp/">
|
||
<span class="button__icon">←</span>
|
||
<span class="button__text">乱七八糟:FRP使用指南</span>
|
||
</a>
|
||
</span>
|
||
|
||
|
||
<span class="button next">
|
||
<a href="https://blog.dich.bid/about-markdown/">
|
||
<span class="button__text">乱七八糟:Markdown使用快速教程</span>
|
||
<span class="button__icon">→</span>
|
||
</a>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<footer class="footer">
|
||
<div class="footer__inner">
|
||
<div class="copyright">
|
||
<span>©
|
||
2025
|
||
Dichgrem</span>
|
||
<span class="copyright-theme">
|
||
<span class="copyright-theme-sep"> :: CC BY-SA 4.0 :: A friend comes from distant lands</span>
|
||
</a>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
</div>
|
||
</body>
|
||
</html>
|
||
|