<?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[<p dir="auto">国内IP白名单/<a href="https://github.com/mayaxcn/china-ip-list/blob/master/chnroute_v6.txt" rel="nofollow ugc">v6</a>：<a href="https://github.com/mayaxcn/china-ip-list/blob/master/chnroute.txt" rel="nofollow ugc">https://github.com/mayaxcn/china-ip-list/blob/master/chnroute.txt</a></p>
<p dir="auto">国内域名白名单：<a href="https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/refs/heads/master/accelerated-domains.china.conf" rel="nofollow ugc">https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/refs/heads/master/accelerated-domains.china.conf</a></p>
<p dir="auto">配置文件示例：</p>
<pre><code>{
    "concurrent": 10,
    "key": {
        "kf": 82225XXXXX908275747,
        "kx": 128,
        "kl": 10,
        "kh": 12,
        "sb": 1000,
        "protocol": "aes-256-cfb",
        "protocol-key": "GoGx2KXXXXXXEYvE742XJjh",
        "transport": "aes-256-cfb",
        "transport-key": "H9oxThG7XXXXXI3YOr6dizqg",
        "masked": true,
        "plaintext": false,
        "delta-encode": true,
        "shuffle-data": true
    },
    "ip": {
        "public": "YOUR VPS IP",
        "interface": "::"
    },
    "vmem": {
        "size": 4096,
        "path": "./{}"
    },
    "tcp": {
        "inactive": {
            "timeout": 300
        },
        "connect": {
            "timeout": 5,
            "nexcept": 4
        },
        "listen": {
            "port": 20000
        },
        "cwnd": 0	,
        "rwnd": 0	,
        "turbo": true,
        "backlog": 1024,
        "fast-open": true
    },
    "udp": {
        "cwnd": 0	,
        "rwnd": 0	,
        "inactive": {
            "timeout": 300
        },
        "dns": {
            "timeout": 4,
            "ttl": 60,
            "cache": true,
            "turbo": false,
            "redirect": "::"
        },
        "listen": {
            "port": 20000
        },
        "static": {
            "keep-alived": [
                1,
                5
            ],
            "dns": true,
            "quic": true,
            "icmp": true,
            "aggligator": 0,
            "servers": [
            ]
        }
    },
    "mux": {
        "connect": {
            "timeout": 10
        },
        "inactive": {
            "timeout": 300
        },
        "congestions": 134217728,
        "keep-alived": [
            1,
            5
        ]
    },
    "server": {
        "log": "./ppp.log",
        "node": 1,
        "subnet": true,
        "mapping": true,
        "backend": "",
        "backend-key": "T7JZgXXXXXrobdZ2H3lOa"
    },
    "client": {
        "guid": "{F4569208-BB45-4DEB-B115-0FEA1D91B85B}",
        "server": "ppp://YOUR VPS IP:20000/",
        "bandwidth": 1000000000,
        "reconnections": {
            "timeout": 5
        },
        "paper-airplane": {
            "tcp": true
        },
        "http-proxy": {
            "bind": "::",
            "port": 8080
        },
        "socks-proxy": {
            "bind": "::",
            "port": 1080,
            "username": "2233",
            "password": "2XXXXXXX"
        },
        "mappings": [
            {
                "local-ip": "::",
                "local-port": 80,
                "protocol": "tcp",
                "remote-ip": "::",
                "remote-port": 10001
            }
        ]
    }
}
</code></pre>
<p dir="auto">启动脚本示例：</p>
<pre><code>start ppp.exe --config=./AKIJP100MS.JSONstart --mode=client --lwip=yes --tun=ppp --tun-ip=10.0.0.10 --tun-gw=10.0.0.1 --tun-mask=24 --tun-host=yes --tun-mux=4 --tun-mux-acceleration=3 --tun-vnet=yes --tun-ssmt=4/st --tun-static=yes --link-restart=3 --block-quic=no --bypass=./chn_ip.txt --dns-rules=./chn_dns.txt
</code></pre>
]]></description><link>https://blog.clouldon.com/topic/17/openppp2-配置示例-与分流</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 19:28:42 GMT</lastBuildDate><atom:link href="https://blog.clouldon.com/topic/17.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 May 2026 01:52:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to OPENPPP2 配置示例 与分流 on Mon, 11 May 2026 01:54:51 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1778464489356-qq20260511-095410.webp" alt="QQ20260511-095410.webp" class=" img-fluid img-markdown" /></p>
]]></description><link>https://blog.clouldon.com/post/65</link><guid isPermaLink="true">https://blog.clouldon.com/post/65</guid><dc:creator><![CDATA[四折光曲]]></dc:creator><pubDate>Mon, 11 May 2026 01:54:51 GMT</pubDate></item><item><title><![CDATA[Reply to OPENPPP2 配置示例 与分流 on Mon, 11 May 2026 01:53:34 GMT]]></title><description><![CDATA[<p dir="auto">SMART DNS CONF 国内域名白名单规则转换：</p>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="zh-CN"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;全能格式转换工具 (IP &amp; DNS)&lt;/title&gt;
    &lt;style&gt;
        body { font-family: -apple-system, sans-serif; max-width: 1000px; margin: 20px auto; padding: 0 20px; background-color: #f5f5f7; }
        .container { background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
        .tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
        .tab-btn { padding: 10px 20px; cursor: pointer; border: none; background: #e0e0e0; border-radius: 6px; font-weight: bold; }
        .tab-btn.active { background: #0071e3; color: white; }
        .content { display: none; }
        .content.active { display: block; }
        .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        textarea { width: 100%; height: 350px; padding: 12px; border: 1px solid #d2d2d7; border-radius: 8px; font-family: monospace; box-sizing: border-box; }
        .controls { margin-top: 15px; display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
        input[type="text"] { padding: 8px; border: 1px solid #ccc; border-radius: 4px; width: 200px; }
        button { background-color: #0071e3; color: white; border: none; padding: 10px 25px; border-radius: 8px; cursor: pointer; font-size: 15px; }
        button:hover { background-color: #005bb5; }
        .label { font-weight: bold; margin-bottom: 8px; display: block; color: #666; }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div class="container"&gt;
    &lt;div class="tabs"&gt;
        &lt;div class="tab-btn active" onclick="switchTab('ip-tab')"&gt;IP 范围转 CIDR&lt;/div&gt;
        &lt;div class="tab-btn" onclick="switchTab('dns-tab')"&gt;DNS 格式转换 (C → D)&lt;/div&gt;
    &lt;/div&gt;

    &lt;!-- IP 转换面板 --&gt;
    &lt;div id="ip-tab" class="content active"&gt;
        &lt;div class="grid"&gt;
            &lt;div&gt;
                &lt;label class="label"&gt;输入 IP 范围 (格式 A)&lt;/label&gt;
                &lt;textarea id="inputA" placeholder="1.0.1.0 1.0.1.255&amp;#10;2001:db8:: 2001:db8::ffff"&gt;&lt;/textarea&gt;
            &lt;/div&gt;
            &lt;div&gt;
                &lt;label class="label"&gt;输出 CIDR (格式 B)&lt;/label&gt;
                &lt;textarea id="outputB" readonly&gt;&lt;/textarea&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="controls"&gt;
            &lt;button onclick="processIPs()"&gt;立即转换 IP&lt;/button&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;!-- DNS 转换面板 --&gt;
    &lt;div id="dns-tab" class="content"&gt;
        &lt;div class="grid"&gt;
            &lt;div&gt;
                &lt;label class="label"&gt;输入 DNS 配置 (格式 C)&lt;/label&gt;
                &lt;textarea id="inputC" placeholder="server=/google.com/114.114.114.114&amp;#10;server=/00.net/114.114.114.114"&gt;&lt;/textarea&gt;
            &lt;/div&gt;
            &lt;div&gt;
                &lt;label class="label"&gt;输出结果 (格式 D)&lt;/label&gt;
                &lt;textarea id="outputD" readonly&gt;&lt;/textarea&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="controls"&gt;
            &lt;span&gt;自定义后缀:&lt;/span&gt;
            &lt;input type="text" id="dnsSuffix" value="/223.5.5.5/nic" placeholder="/DNS地址/接口名"&gt;
            &lt;button onclick="processDNS()"&gt;立即转换 DNS&lt;/button&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
    function switchTab(tabId) {
        document.querySelectorAll('.content').forEach(c =&gt; c.classList.remove('active'));
        document.querySelectorAll('.tab-btn').forEach(b =&gt; b.classList.remove('active'));
        document.getElementById(tabId).classList.add('active');
        event.currentTarget.classList.add('active');
    }

    // --- DNS 转换逻辑 (C -&gt; D) ---
    function processDNS() {
        const input = document.getElementById('inputC').value;
        const suffix = document.getElementById('dnsSuffix').value;
        const lines = input.split('\n');
        let results = [];

        lines.forEach(line =&gt; {
            // 使用正则提取 / 之间的域名
            // 匹配 server=/域名/IP
            const match = line.match(/server=\/(.*?)\//);
            if (match &amp;&amp; match[1]) {
                const domain = match[1].trim();
                // 模拟 D 格式的对齐效果 (域名 + 后缀)
                results.push(`${domain.padEnd(40, ' ')}${suffix}`);
            }
        });

        document.getElementById('outputD').value = results.join('\n');
    }

    // --- IP 转换逻辑 (支持 IPv4/v6) ---
    function ipToBigInt(ip) {
        if (ip.includes(':')) {
            let parts = ip.split('::');
            let left = parts[0] ? parts[0].split(':') : [];
            let right = parts.length &gt; 1 ? parts[1].split(':') : [];
            let middle = new Array(8 - (left.length + right.length)).fill('0');
            let full = left.concat(middle).concat(right).map(x =&gt; x === '' ? '0' : x);
            return full.reduce((acc, part) =&gt; (acc &lt;&lt; 16n) + BigInt(parseInt(part, 16)), 0n);
        } else {
            return ip.split('.').reduce((acc, part) =&gt; (acc &lt;&lt; 8n) + BigInt(parseInt(part, 10)), 0n);
        }
    }

    function bigIntToIp(bn, isV6) {
        if (isV6) {
            let parts = [];
            for (let i = 0; i &lt; 8; i++) {
                parts.unshift(((bn &gt;&gt; BigInt(i * 16)) &amp; 0xFFFFn).toString(16));
            }
            return parts.join(':').replace(/\b0+/g, '').replace(/:{3,}/g, '::');
        } else {
            let parts = [];
            for (let i = 0; i &lt; 4; i++) {
                parts.unshift(((bn &gt;&gt; BigInt(i * 8)) &amp; 0xFFn).toString(10));
            }
            return parts.join('.');
        }
    }

    function summarizeRange(startIpStr, endIpStr) {
        const isV6 = startIpStr.includes(':');
        const maxBits = isV6 ? 128n : 32n;
        let start = ipToBigInt(startIpStr);
        let end = ipToBigInt(endIpStr);
        let res = [];
        while (end &gt;= start) {
            let cur = maxBits;
            while (cur &gt; 0n) {
                let mask = (1n &lt;&lt; (maxBits - (cur - 1n))) - 1n;
                if ((start &amp; mask) !== 0n || (start + mask &gt; end)) break;
                cur--;
            }
            res.push(bigIntToIp(start, isV6) + '/' + cur);
            start += (1n &lt;&lt; (maxBits - cur));
            if (start === 0n) break;
        }
        return res;
    }

    function processIPs() {
        const input = document.getElementById('inputA').value;
        let results = [];
        input.split('\n').forEach(line =&gt; {
            const parts = line.trim().split(/[\s\t\-]+/);
            if (parts.length &gt;= 2) {
                try { results = results.concat(summarizeRange(parts[0], parts[1])); } catch (e) {}
            }
        });
        document.getElementById('outputB').value = results.join('\n');
    }
&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
]]></description><link>https://blog.clouldon.com/post/64</link><guid isPermaLink="true">https://blog.clouldon.com/post/64</guid><dc:creator><![CDATA[四折光曲]]></dc:creator><pubDate>Mon, 11 May 2026 01:53:34 GMT</pubDate></item></channel></rss>