PageSourceSearch

https://lolipopj.github.io/component---src-templates-post-tsx-cont…linux-project-v-mdx-f7c67617371680cc66b6.js

js lolipopj.github.io collected 2026-10-03 09:32:41 UTC 14,967 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkhomepage=self.webpackChunkhomepage||[]).push([[5332],{2648:function(n,a,e){e.r(a),e.d(a,{Head:function(){return _},default:function(){return S}});var s=e(5676),t=e(758);function o(n){const a=Object.assign({h2:"h2",p:"p",a:"a",span:"span"},(0,s.R)(),n.components);return t.createElement(t.Fragment,null,t.createElement(a.h2,null,"下载 Release"),"\n",t.createElement(a.p,null,"在 Project-V 的 ",t.createElement(a.a,{href:"https://github.com/v2fly/v2ray-core/releases"},"Github Releases")," 页面下载最新的二进制包。"),"\n",t.createElement(a.p,null,"本文以通用于 x86_64 机器的 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">v2ray-linux-64.zip</code>'}})," 为例。下载完成后传入 Linux 主机即可。"),"\n",t.createElement(a.h2,null,"安装 Project-V"),"\n",t.createElement(a.p,null,"执行 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">unzip</code>'}})," 命令:"),"\n",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="bash"><pre class="language-bash"><code class="language-bash"><span class="token function">unzip</span> v2ray-linux-64.zip</code></pre></div>'}}),"\n",t.createElement(a.p,null,"文件将全部解压到当前目录。"),"\n",t.createElement(a.h2,null,"创建软链接"),"\n",t.createElement(a.p,null,"执行 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">ln</code>'}})," 命令:"),"\n",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="bash"><pre class="language-bash"><code class="language-bash"><span class="token function">ln</span> <span class="token parameter variable">-s</span> /path/to/v2ray /usr/local/bin</code></pre></div>'}}),"\n",t.createElement(a.p,null,"这里的 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">v2ray</code>'}})," 是压缩包里已编译好的二进制可执行文件。"),"\n",t.createElement(a.h2,null,"配置 Project-V"),"\n",t.createElement(a.p,null,"编辑与 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">v2ray</code>'}})," 相同目录下的 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">config.json</code>'}})," 文件,配置如下:"),"\n",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="json"><pre class="language-json"><code class="language-json"><span class="token punctuation">{</span>\n  <span class="token comment">// 前略</span>\n  <span class="token comment">// List of inbound proxy configurations.</span>\n  <span class="token property">"inbounds"</span><span class="token operator">:</span> <span class="token punctuation">[</span>\n    <span class="token punctuation">{</span>\n      <span class="token comment">// Port to listen on. You may need root access if the value is less than 1024.</span>\n      <span class="token property">"port"</span><span class="token operator">:</span> <span class="token number">1080</span><span class="token punctuation">,</span> <span class="token comment">// 本机监听的端口,应为不加双引号的数字</span>\n\n      <span class="token comment">// IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces.</span>\n      <span class="token property">"listen"</span><span class="token operator">:</span> <span class="token string">"127.0.0.1"</span><span class="token punctuation">,</span>\n\n      <span class="token comment">// Tag of the inbound proxy. May be used for routing.</span>\n      <span class="token property">"tag"</span><span class="token operator">:</span> <span class="token string">"socks-inbound"</span><span class="token punctuation">,</span>\n\n      <span class="token comment">// Protocol name of inbound proxy.</span>\n      <span class="token property">"protocol"</span><span class="token operator">:</span> <span class="token string">"socks"</span><span class="token punctuation">,</span>
1\n\n      <span class="token comment">// Settings of the protocol. Varies based on protocol.</span>\n      <span class="token property">"settings"</span><span class="token operator">:</span> <span class="token punctuation">{</span>\n        <span class="token property">"auth"</span><span class="token operator">:</span> <span class="token string">"noauth"</span><span class="token punctuation">,</span>\n        <span class="token property">"udp"</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>\n        <span class="token property">"ip"</span><span class="token operator">:</span> <span class="token string">"127.0.0.1"</span>\n      <span class="token punctuation">}</span><span class="token punctuation">,</span>\n\n      <span class="token comment">// Enable sniffing on TCP connection.</span>\n      <span class="token property">"sniffing"</span><span class="token operator">:</span> <span class="token punctuation">{</span>\n        <span class="token property">"enabled"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>\n        <span class="token comment">// Target domain will be overriden to the one carried by the connection, if the connection is HTTP or HTTPS.</span>\n        <span class="token property">"destOverride"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">"http"</span><span class="token punctuation">,</span> <span class="token string">"tls"</span><span class="token punctuation">]</span>\n      <span class="token punctuation">}</span>\n    <span class="token punctuation">}</span>\n  <span class="token punctuation">]</span><span class="token punctuation">,</span>\n  <span class="token comment">// List of outbound proxy configurations.</span>\n  <span class="token property">"outbounds"</span><span class="token operator">:</span> <span class="token punctuation">[</span>\n    <span class="token punctuation">{</span>\n      <span class="token comment">// Protocol name of the outbound proxy.</span>\n      <span class="token property">"protocol"</span><span class="token operator">:</span> <span class="token string">"vmess"</span><span class="token punctuation">,</span> <span class="token comment">// 使用的代理协议</span>\n\n      <span class="token comment">// Settings of the protocol. Varies based on protocol.</span>\n      <span class="token property">"settings"</span><span class="token operator">:</span> <span class="token punctuation">{</span>\n        <span class="token property">"vnext"</span><span class="token operator">:</span> <span class="token punctuation">[</span>\n          <span class="token punctuation">{</span>\n            <span class="token property">"address"</span><span class="token operator">:</span> <span class="token string">"V2RAY_SERVER_ADDRESS"</span><span class="token punctuation">,</span> <span class="token comment">// 代理的服务器地址</span>\n            <span class="token property">"port"</span><span class="token operator">:</span> <span class="token number">16823</span><span class="token punctuation">,</span> <span class="token comment">// 代理服务器的端口,应为不加双引号的数字</span>\n            <span class="token property">"users"</span><span class="token operator">:</span> <span class="token punctuation">[</span>\n              <span class="token punctuation">{</span>\n                <span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"V2RAY_UUID"</span><span class="token punctuation">,</span> <span class="token comment">// 代理服务器的 UUID</span>\n                <span class="token property">"alterId"</span><span class="token operator">:</span> <span class="token number">64</span> <span class="token comment">// 代理服务器的 Alter Id,应为不加双引号的数字</span>\n              <span class="token punctuation">}</span>\n            <span class="token punctuation">]</span>
1\n          <span class="token punctuation">}</span><span class="token punctuation">,</span>\n          <span class="token punctuation">{</span>\n            <span class="token comment">// 添加更多的 VMESS 协议代理服务器</span>\n          <span class="token punctuation">}</span>\n        <span class="token punctuation">]</span>\n      <span class="token punctuation">}</span><span class="token punctuation">,</span>\n\n      <span class="token comment">// Tag of the outbound. May be used for routing.</span>\n      <span class="token property">"tag"</span><span class="token operator">:</span> <span class="token string">"vmess_serve"</span>\n    <span class="token punctuation">}</span>\n  <span class="token punctuation">]</span>\n  <span class="token comment">// 后略</span>\n<span class="token punctuation">}</span></code></pre></div>'}}),"\n",t.createElement(a.p,null,"对于新手,只需要掌握 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">inbounds</code>'}})," 和 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">outbounds</code>'}})," 的配置方式即可。"),"\n",t.createElement(a.p,null,"对于进阶使用,可以参考",t.createElement(a.a,{href:"https://www.v2fly.org/"},"官方文档"),",或者更适合新手的",t.createElement(a.a,{href:"https://guide.v2fly.org/"},"“白话文”文档"),"。"),"\n",t.createElement(a.h2,null,"启用 Project-V"),"\n",t.createElement(a.p,null,"保存修改后,在后台运行 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">v2ray</code>'}}),":"),"\n",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="bash"><pre class="language-bash"><code class="language-bash">v2ray <span class="token operator">&amp;</span></code></pre></div>'}}),"\n",t.createElement(a.p,null,"如果参考前面的默认配置,则它将监听在 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">127.0.0.1:1080</code>'}})," 端口。"),"\n",t.createElement(a.p,null,"假如您想加速 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">git</code>'}})," 克隆速度,则可以配置它的 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">http(s).proxy</code>'}}),":"),"\n",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<div class="gatsby-highlight" data-language="bash"><pre class="language-bash"><code class="language-bash"><span class="token function">git</span> config <span class="token parameter variable">--global</span> http.proxy socks5://127.0.0.1:1080\n<span class="token function">git</span> config <span class="token parameter variable">--global</span> https.proxy socks5://127.0.0.1:1080</code></pre></div>'}}),"\n",t.createElement(a.p,null,"现在,使用 ",t.createElement(a.span,{dangerouslySetInnerHTML:{__html:'<code class="language-text">git clone</code>'}})," 命令享受飞一般的速度吧。"))}var p=function(n){void 0===n&&(n={});const{wrapper:a}=Object.assign({},(0,s.R)(),n.components);return a?t.createElement(a,n,t.createElement(o,n)):o(n)},l=e(5643),c=e(9182),r=e.n(c),u=e(2838),i=e.n(u),m=e(4579),g=e.n(m),d=e(2030),k=e(7531),h=e(1099),y=e(4490),f=e(3625),b=e(5672),E=e(1579);r().extend(g()),r().extend(i());const x={a:n=>{let{href:a="",children:e}=n;const s=!(null!=a&&a.startsWith("#")),o=s?a:`#${encodeURIComponent(a.slice(1))}`;return t.createElement("a",{href:o,target:s?"_blank":void 0,rel:"noreferrer"},e)},img:n=>{const{alt:a="The author is too lazy to give an alt",src:e,...s}=n;return t.createElement("a",{href:e,"data-fancybox":"gallery","data-caption":a},t.createElement("img",Object.assign({src:e,alt:a},s)))},Card:k.A,Link:d.Link,HintText:h.A},v=n=>{var a;let{children:e,data:o}=n;const{mdx:{fields:{isDraft:p},frontmatter:{title:c,date:u,updated:i,categories:m,tags:g,timeliness:k}}}=o,h=t.useRef(null),y=r().utc(u).tz("Asia/Shanghai"),v=i?r().utc(i).tz("Asia/Shanghai"):y,[_,S]=t.useState(null),T=null!==_?_.diff(v,"days"):null,M="number"==typeof k?k:365,H=null!==T&&M>=0&&T>=M;return t.useEffect(()=>{t.startTransition(()=>S(r()().tz("Asia/Shanghai")))},[]),t.useEffect(()=>{var n;const a=null===(n=h.current)||void 0===n?void 0:n.querySelectorAll("a.gatsby-resp-image-link");return null==a||a.forEach(n=>{const a=n.children.item(1);n.setAttribute("data-fancybox","gallery"),n.setAttribute("data-caption",a.alt)}),l.lX.bind("[data-fancybox]",{on:{initLayout:n=>{var a,e;null===(a=n.getContainer())||void 0===a||a.setAttribute("theme",null!==(e=document.documentElement.dataset.theme)&&void 0!==e?e:"light")}}}),()=>l.lX.unbind("[data-fancybox]")},[]),(0,E.A)(h),t.createElement("div",{className:"mx-auto flex max-w-xl flex-col gap-y-12"},t.createElement("div",{className:"flex flex-col gap-4"},(null==m?void 0:m.length)&&t.createElement(d.Link,{to:`/categories/${encodeURIComponent(m[0])}
1`,className:"w-fit rounded bg-background-lighter px-3 py-2 leading-normal transition-opacity hover:opacity-75"},t.createElement("span",{className:`cursor-pointer bg-gradient-to-tr from-0% via-40% to-90% bg-clip-text text-lg font-bold leading-none text-transparent ${null!==(a=b.Y[m[0]])&&void 0!==a?a:""}`},m[0])),t.createElement("h1",{className:"text-3xl font-bold"},c),t.createElement("div",{className:"item-secondary flex flex-col gap-2 lg:flex-row"},u&&t.createElement("span",{title:`首次发布于:${y.format("YYYY-MM-DD HH:mm:ss [UTC+8]")}\n最后更新于:${v.format("YYYY-MM-DD HH:mm:ss [UTC+8]")}`},y.format("MM 月 DD 日 YYYY 年")),(null==g?void 0:g.length)&&t.createElement("div",{className:"flex flex-1 flex-wrap gap-2 lg:before:content-['•']"},g.map(n=>t.createElement(f.A,{key:n,name:n,className:"item-secondary item-selectable"}))))),t.createElement("article",{ref:h,className:"heti post-entry"},p&&t.createElement("blockquote",{className:"!border-red-400"},"这是一篇",t.createElement("strong",null,"尚未正式发布"),"的博客,内容可能暂不完善或存在纰漏,建议您仔细评估文章的可靠性。"),H&&null!==T&&t.createElement("blockquote",{className:"!border-orange-400"},"这是一篇",t.createElement("strong",null,"最后更新于 ",T," 天前"),"的博客,内容可能随着时间的推移而变得不再适用,建议您仔细评估文章的有效性。"),t.createElement(s.x,{components:x},e)))},_=n=>{let{data:a}=n;return t.createElement(y.A,{title:String(a.mdx.frontmatter.title)})};function S(n){return t.createElement(v,n,t.createElement(p,n))}}}]);
2//# sourceMappingURL=component---src-templates-post-tsx-content-file-path-blog-posts-linux-project-v-mdx-f7c67617371680cc66b6.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.