<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[openppp2简易使用教程]]></title><description><![CDATA[<h1>1.openppp2项目简介</h1>
<p dir="auto">介绍一种VPN-openppp2，目前来看不会被墙，而且支持内网穿透，虚拟子网，UDP多线路宽频聚合，CDN转发，国内自动BGP分流等等更多功能看github<br />
仓库：<a href="https://github.com/liulilittle/openppp2" rel="nofollow ugc">https://github.com/liulilittle/openppp2</a><br />
使用指南：<a href="https://github.com/liulilittle/openppp2/blob/main/README_CN.md" rel="nofollow ugc">https://github.com/liulilittle/openppp2/blob/main/README_CN.md</a></p>
<p dir="auto">下文将openppp2简称为ppp<br />
ppp目前在IPv6上支持不好，不太能跑在IPv6上，使用前得把IPv4优先或者禁用IPv6（Window客户端），如果是直连比较吃线路，除非个人会调整网络调优，或是使用CDN转发。<br />
其在Linux下运行支持较为良好，而在Windows上常常会遇到奇奇怪怪的问题（IPv6问题导致无法进行有效通讯），作者已给出部分解决方法，见使用指南。</p>
<p dir="auto">原版安装参考<a href="https://github.com/liulilittle/openppp2/blob/main/README_CN.md#-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B" rel="nofollow ugc">原文-快速开始</a></p>
<h1>2.脚本简介及服务端安装</h1>
<p dir="auto">因为最近使用了AI写了一键脚本，在Debian系统里面还是可用的。</p>
<pre><code>wget -4 -O ppp_install.sh https://raw.githubusercontent.com/zouazhi/zouazhi/main/ppp/ppp_install.sh &amp;&amp; chmod +x ppp_install.sh &amp;&amp; ./ppp_install.sh
</code></pre>
<p dir="auto">脚本地址：<a href="https://github.com/zouazhi/zouazhi/blob/main/ppp/ppp_install.sh" rel="nofollow ugc">https://github.com/zouazhi/zouazhi/blob/main/ppp/ppp_install.sh</a><br />
拉取脚本之后，</p>
<pre><code>✅ 脚本启动，进入主循环
openppp2一键脚本
请选择操作：
1) 服务端-自动交互安装[完整安装ppp及配置，系统服务]
2) 服务端-自行修改配置[跳过配置文件，直通系统服务]
3) 通用-更新[更新openppp2二进制文件并重新配置服务]
4) 通用-重启[重启ppp服务]
5) 通用-停止[停止ppp服务]
6) 通用-查看运行状况[查看ppp.log和系统服务状态]
7) 通用-卸载ppp[删除文件-删除重载系统服务]
8) 退出脚本
请输入选项[1-8]： 
</code></pre>
<h2>2.1全新服务端安装</h2>
<p dir="auto">数字1就会安装jq、uuidgen 和 unzip，拉取启动脚本，和部分改好的配置文件，和系统服务功能。<br />
工作目录默认放在opt/ppp下，此时可以选择（1自行修改或（2交互式输入，如下所示。</p>
<pre><code>✅ ppp.sh 启动脚本 拉取完成
✅ ppp.sh 启动脚本 已具有可执行权限
是否自行修改 appsettings.json 文件？
1) 是（脚本将暂停）
2) 否（通过脚本输入 IP、端口和 GUID）
请输入选项 (1/2)： 
</code></pre>
<p dir="auto">以下介绍两个1-1和1-2的不同</p>
<h2>2.2修改配置文件和交互</h2>
<p dir="auto">（2交互较为简单，只需要输入数字2，然后输入IP，端口，GUID，后续会进行配置文件的补全，并完成启动，完成这一步的的直接转到[[#3.客户端使用]]<br />
对于自行修改配置文件<br />
（1则需要修改<code>opt/pppppsettings.json</code>里面tcp，udp监听端口（默认20000）以及udp下的<code>"servers": ["1.1.1.1:20000"]</code>，<code>"client"</code>下的<code>"guid"</code>，和<code>"server"</code>（默认为<code>ppp://1.1.1.1:20000</code>），其中<code>1.1.1.1</code>即为入口的IP，<code>20000</code>即为工作端口。</p>
<p dir="auto">附GUID生成网站：<a href="https://www.guidgen.com/" rel="nofollow ugc">https://www.guidgen.com/</a></p>
<p dir="auto">该脚本拉取的配置文件是经修改的精简版本，方便快速启动并默认开启内网穿透，更多内容请看上文仓库<a href="https://github.com/liulilittle/openppp2/blob/main/README_CN.md#-%E5%85%A8%E5%B1%80%E5%8F%82%E6%95%B0" rel="nofollow ugc">原文</a>配置文件及使用说明。</p>
<h2>2.3自行修改配置文件后续</h2>
<p dir="auto">该为选择1-1之后脚本暂停之后重新执行脚本,即为主循环中的2。<br />
优先参考<a href="https://github.com/liulilittle/openppp2/blob/main/README_CN.md#-%E5%85%A8%E5%B1%80%E5%8F%82%E6%95%B0" rel="nofollow ugc">原文</a><br />
重新执行脚本：</p>
<pre><code>bash /root/ppp_install.sh
</code></pre>
<p dir="auto">即会自动拉取启动脚本和系统服务。</p>
<h2>2.4服务端启动脚本及系统服务</h2>
<p dir="auto">若是选择服务端的启动脚本为下所示，放置于<code>/opt/ppp/ppp.sh</code>内</p>
<pre><code>./ppp --mode=server &gt; ./ppp.log
</code></pre>
<p dir="auto">脚本内系统服务为引用改sh文件进行服务运行，系统服务如下所示</p>
<pre><code>[Unit]
Description=PPP PRIVATE NETWORK™ 2
After=network.target network-online.target

[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/opt/ppp
ExecStart=/bin/bash /opt/ppp/ppp.sh
Restart=always
RestartSec=20
StartLimitBurst=5
SyslogIdentifier=ppp

[Install]
WantedBy=multi-user.target
</code></pre>
<p dir="auto">即可以使用<code>service ppp stop</code>等service系统服务命令进行控制</p>
<p dir="auto">相应的查看当前运行状况可以采用检查<code>service ppp status</code>和<code>/opt/ppp/ppp.log</code>来判断运行状况。<br />
其中<code>/opt/ppp/ppp.log</code>其实为实时运行图：</p>
<pre><code>PPP                                                                             
--------------------------------------------------------------------------------
Application started. Press Ctrl+C to shut down.                             
Max Concurrent        : 1                                                   
Process               : 149273                                              
Triplet               : linux:X86_64                                        
Cwd                   : /opt/ppp             
Template              : /opt/ppp/appsettings.json  
Public IP             : ::               
Interface IP          : ::                  
Service 1             : [::]:20000/ppp+tcp   
Service 2             : [::]:20000/ppp+udp  
Hosting Environment   : server:production                                      
VPN                              
----------------------------------------------------------------------------
Duration              : 00:35:46   
Sessions              : 0        
TX                    : 0.000000 B   
RX                    : 0.000000 B    
IN                    : 21.000000 B   
OUT                   : 6.154297 KB   
</code></pre>
<p dir="auto">实际上，openppp2的启动命令为<code>./ppp --mode=server</code>，在终端输入即可得到实时运行的流量变化，客户端数等内容，但其为前台运行，本脚本将其运行页面写入<code>ppp.log</code>以便管理<br />
同样你也可以使用<code>screen</code>等工具使其在后台启动（目录下自行<code>./ppp --mode=server</code>），此时并不需要系统服务，望读者注意。</p>
<h1>3.客户端使用</h1>
<p dir="auto">客户端和服务端使用同一套二进制文件，同样对于配置文件，其中包括服务端部分和客户端部分，最简化的配置文件只需包含各自服务端/客户端的配置内容。<br />
上文所提到的配置文件已经包括客户端，服务端两部分，即是通用的。所以直接从服务端拉取配置文件即可，对于每个不同的客户端，其GUID不能相同，但从服务端拉取的配置文件是修改过的，且当前主机为第一客户端，所以不用修改，与其他小伙伴共享时也需修改其GUID。另外对于下文启用了<code>--tun-vnet=yes</code>的<code>--tun-ip=10.0.0.5</code> 同时在线的子网IP也不能相同。</p>
<h2>3.1Windows</h2>
<p dir="auto">Windows用户若存在IPv4/IPv6双栈问题请阅读原文并尝试使用以下命令，或者直接禁用IPv6。</p>
<p dir="auto"><a href="https://github.com/liulilittle/openppp2/blob/main/README_CN.md#-windows-%E5%91%BD%E4%BB%A4" rel="nofollow ugc">原文</a></p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>命令</th>
<th>功能</th>
<th>格式</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--system-network-reset</code></td>
<td>网络重置</td>
<td><code>--system-network-reset</code></td>
</tr>
<tr>
<td><code>--system-network-optimization</code></td>
<td>性能优化</td>
<td><code>--system-network-optimization</code></td>
</tr>
<tr>
<td><code>--system-network-preferred-ipv4</code></td>
<td>设置IPV4网络优先</td>
<td><code>--system-network-preferred-ipv4</code></td>
</tr>
<tr>
<td><code>--system-network-preferred-ipv6</code></td>
<td>设置IPV6网络优先</td>
<td><code>--system-network-preferred-ipv6</code></td>
</tr>
<tr>
<td><code>--no-lsp</code></td>
<td>禁用LSP</td>
<td><code>--no-lsp</code></td>
</tr>
</tbody>
</table>
<p dir="auto">优先参考<a href="https://github.com/liulilittle/openppp2/blob/main/README_CN.md#-%E5%AE%A2%E6%88%B7%E7%AB%AF%E9%83%A8%E7%BD%B2" rel="nofollow ugc">原文</a></p>
<ol>
<li>现于<a href="https://github.com/liulilittle/openppp2/releases" rel="nofollow ugc">releases</a>中下载<a href="https://github.com/liulilittle/openppp2/releases/download/1.0.0.25435/openppp2-windows-amd64.zip" rel="nofollow ugc">openppp2-windows-amd64.zip</a></li>
<li>解压后去除<code>cmcc_cidr.txt, crtc_cidr.txt, ip.txt, starrylink.net.key, starrylink.net.pem, appsettings.json</code>,然后放入服务器拉取的<code>appsettings.json</code>。</li>
<li>新建bat文件<code>start.bat</code>填入以下命令</li>
</ol>
<pre><code>start ppp.exe --mode=client --config=./config/修改这里.json --auto-pull-iplist --tun-ip=10.0.0.5 --tun-gw=10.0.0.0 --tun-mask=24 --tun-host=yes --link-restart=3  --tun-vnet=yes --tun-static=no --block-quic=yes --set-http-proxy=no --tun-mux-acceleration=3 --tun-ssmt=4/st 
</code></pre>
<p dir="auto">其中<code>--tun-host</code>为控制网络走VPN<br />
<code>--tun-static</code>为是否启用udp静态隧道<br />
<code>--config=./config/修改这里.json</code>为配置文件目录，此为例子，按需修改。如果配置文件名为<code>appsettings.json</code>则为<code>--config=./appsettings.json</code>。<br />
更多命令参考<a href="https://github.com/liulilittle/openppp2/blob/main/README_CN.md#-%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%8E%A5%E5%8F%A3" rel="nofollow ugc">原文</a><br />
然后点击<code>start.bat</code>即可</p>
<h2>3.2Linux客户端</h2>
<p dir="auto">对于Linux其运行和提到的服务端相似，而启动命令可以参照下</p>
<pre><code>./ppp --mode=client --config=./ggvHK.json --tun-ip=10.0.0.88 --tun-gw=10.0.0.0 --tun-mask=24 --tun-host=no --link-restart=3 --tun-mux-acceleration=3 --tun-static=no --tun-ssmt=4/st --block-quic=yes &gt; ./ppp.log
</code></pre>
<p dir="auto">可以使用一键脚本写入，将启动sh文件将服务端的<code>--mode=server</code>改为<code>--mode=client</code>即可。</p>
<h2>3.3启动后</h2>
<p dir="auto">启动后可以用ping去简易判断连接情况，不受<code>--tun-host</code>影响</p>
<pre><code>PS C:\Users\2233\Desktop&gt; ping 10.0.0.1

正在 Ping 10.0.0.1 具有 32 字节的数据:
来自 10.0.0.1 的回复: 字节=32 时间=73ms TTL=127
来自 10.0.0.1 的回复: 字节=32 时间=67ms TTL=127
来自 10.0.0.1 的回复: 字节=32 时间=70ms TTL=127
来自 10.0.0.1 的回复: 字节=32 时间=73ms TTL=127
</code></pre>
<p dir="auto">对于IPv6问题的用户可以采用http代理的模式替代，可以使用启动命令的<code>--set-http-proxy=yes</code>进行系统代理，或自行代理。配置文件默认使用8080端口进行http代理（sock5帮我删掉了）。</p>
<pre><code>"http-proxy": {
            "bind": "0.0.0.0",
            "port": 8080
        }
</code></pre>
<p dir="auto"><a href="https://postimg.cc/cvrj10LG" rel="nofollow ugc">点击查看启动图</a></p>
]]></description><link>https://blog.clouldon.com/topic/2/openppp2简易使用教程</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 19:28:11 GMT</lastBuildDate><atom:link href="https://blog.clouldon.com/topic/2.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 29 Oct 2025 03:26:06 GMT</pubDate><ttl>60</ttl></channel></rss>