mirror of
https://github.com/p4gefau1t/trojan-go.git
synced 2024-04-21 12:21:34 +00:00
deploy: 984d2ec812
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<meta itemprop="name" content="国内直连和广告屏蔽">
|
||||
<meta itemprop="description" content="注意,Trojan不支持这个特性 Trojan-Go内建的路由模块可以帮助你实现国内直连,即客户端对于国内网站不经过代理,直接连接。 路由模块在">
|
||||
|
||||
<meta itemprop="wordCount" content="853">
|
||||
<meta itemprop="wordCount" content="854">
|
||||
<meta itemprop="image" content="https://p4gefau1t.github.io/trojan-go/images/og-image.png"/>
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
<p>“full:",完全域名匹配</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>“regex:",正则表达式匹配</p>
|
||||
<p>“regexp:",正则表达式匹配</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>“cidr:",CIDR匹配</p>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<meta itemprop="name" content="编译和自定义Trojan-Go">
|
||||
<meta itemprop="description" content="编译需要Go版本号高于1.14.x,请在编译前确认你的编译器版本。推荐使用snap安装和更新go。 编译方式非常简单,可以使用Makefile">
|
||||
|
||||
<meta itemprop="wordCount" content="403">
|
||||
<meta itemprop="wordCount" content="405">
|
||||
<meta itemprop="image" content="https://p4gefau1t.github.io/trojan-go/images/og-image.png"/>
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ GOOS<span style="color:#f92672">=</span>linux GOARCH<span style="color:#f92672">
|
||||
</code></pre></div><p>你可以使用release.sh进行批量的多个平台的交叉编译,release版本使用了这个脚本进行构建。</p>
|
||||
<p>Trojan-Go的大多数模块是可插拔的。在build文件夹下可以找到各个模块的导入声明。如果你不需要其中某些功能,或者需要缩小可执行文件的体积,可以使用构建标签(tags)进行模块的自定义,例如</p>
|
||||
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">go build -tags <span style="color:#e6db74">"full"</span> <span style="color:#75715e">#编译所有模块</span>
|
||||
go build -tags <span style="color:#e6db74">"client"</span> -ldflags<span style="color:#f92672">=</span><span style="color:#e6db74">"-s -w"</span> <span style="color:#75715e">#只有客户端功能,且去除符号表缩小体积</span>
|
||||
go build -tags <span style="color:#e6db74">"client"</span> -trimpath -ldflags<span style="color:#f92672">=</span><span style="color:#e6db74">"-s -w -buildid="</span> <span style="color:#75715e">#只有客户端功能,且去除符号表缩小体积</span>
|
||||
go build -tags <span style="color:#e6db74">"server mysql"</span> <span style="color:#75715e">#只有服务端和mysql支持</span>
|
||||
</code></pre></div><p>使用full标签等价于</p>
|
||||
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">go build -tags <span style="color:#e6db74">"api client server forward nat other"</span>
|
||||
|
||||
Reference in New Issue
Block a user