administrators

私有

帖子

  • RE: 哈基 项目推荐

    @四折光曲 基于WireGuard

  • RE: 哈基 项目推荐
  • RE: OPENPPP2 配置示例 与分流

    QQ20260511-095410.webp

  • RE: OPENPPP2 配置示例 与分流

    SMART DNS CONF 国内域名白名单规则转换:

    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>全能格式转换工具 (IP & DNS)</title>
        <style>
            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; }
        </style>
    </head>
    <body>
    
    <div class="container">
        <div class="tabs">
            <div class="tab-btn active" onclick="switchTab('ip-tab')">IP 范围转 CIDR</div>
            <div class="tab-btn" onclick="switchTab('dns-tab')">DNS 格式转换 (C → D)</div>
        </div>
    
        <!-- IP 转换面板 -->
        <div id="ip-tab" class="content active">
            <div class="grid">
                <div>
                    <label class="label">输入 IP 范围 (格式 A)</label>
                    <textarea id="inputA" placeholder="1.0.1.0 1.0.1.255&#10;2001:db8:: 2001:db8::ffff"></textarea>
                </div>
                <div>
                    <label class="label">输出 CIDR (格式 B)</label>
                    <textarea id="outputB" readonly></textarea>
                </div>
            </div>
            <div class="controls">
                <button onclick="processIPs()">立即转换 IP</button>
            </div>
        </div>
    
        <!-- DNS 转换面板 -->
        <div id="dns-tab" class="content">
            <div class="grid">
                <div>
                    <label class="label">输入 DNS 配置 (格式 C)</label>
                    <textarea id="inputC" placeholder="server=/google.com/114.114.114.114&#10;server=/00.net/114.114.114.114"></textarea>
                </div>
                <div>
                    <label class="label">输出结果 (格式 D)</label>
                    <textarea id="outputD" readonly></textarea>
                </div>
            </div>
            <div class="controls">
                <span>自定义后缀:</span>
                <input type="text" id="dnsSuffix" value="/223.5.5.5/nic" placeholder="/DNS地址/接口名">
                <button onclick="processDNS()">立即转换 DNS</button>
            </div>
        </div>
    </div>
    
    <script>
        function switchTab(tabId) {
            document.querySelectorAll('.content').forEach(c => c.classList.remove('active'));
            document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active'));
            document.getElementById(tabId).classList.add('active');
            event.currentTarget.classList.add('active');
        }
    
        // --- DNS 转换逻辑 (C -> 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 => {
                // 使用正则提取 / 之间的域名
                // 匹配 server=/域名/IP
                const match = line.match(/server=\/(.*?)\//);
                if (match && 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 > 1 ? parts[1].split(':') : [];
                let middle = new Array(8 - (left.length + right.length)).fill('0');
                let full = left.concat(middle).concat(right).map(x => x === '' ? '0' : x);
                return full.reduce((acc, part) => (acc << 16n) + BigInt(parseInt(part, 16)), 0n);
            } else {
                return ip.split('.').reduce((acc, part) => (acc << 8n) + BigInt(parseInt(part, 10)), 0n);
            }
        }
    
        function bigIntToIp(bn, isV6) {
            if (isV6) {
                let parts = [];
                for (let i = 0; i < 8; i++) {
                    parts.unshift(((bn >> BigInt(i * 16)) & 0xFFFFn).toString(16));
                }
                return parts.join(':').replace(/\b0+/g, '').replace(/:{3,}/g, '::');
            } else {
                let parts = [];
                for (let i = 0; i < 4; i++) {
                    parts.unshift(((bn >> BigInt(i * 8)) & 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 >= start) {
                let cur = maxBits;
                while (cur > 0n) {
                    let mask = (1n << (maxBits - (cur - 1n))) - 1n;
                    if ((start & mask) !== 0n || (start + mask > end)) break;
                    cur--;
                }
                res.push(bigIntToIp(start, isV6) + '/' + cur);
                start += (1n << (maxBits - cur));
                if (start === 0n) break;
            }
            return res;
        }
    
        function processIPs() {
            const input = document.getElementById('inputA').value;
            let results = [];
            input.split('\n').forEach(line => {
                const parts = line.trim().split(/[\s\t\-]+/);
                if (parts.length >= 2) {
                    try { results = results.concat(summarizeRange(parts[0], parts[1])); } catch (e) {}
                }
            });
            document.getElementById('outputB').value = results.join('\n');
        }
    </script>
    
    </body>
    </html>
    
  • OPENPPP2 配置示例 与分流

    国内IP白名单/v6https://github.com/mayaxcn/china-ip-list/blob/master/chnroute.txt

    国内域名白名单:https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/refs/heads/master/accelerated-domains.china.conf

    配置文件示例:

    {
        "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
                }
            ]
        }
    }
    

    启动脚本示例:

    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
    
  • RE: 哈基 项目推荐
  • RE: 哈基 项目推荐

    https://github.com/pocketbase/pocketbase

    PocketBase

    后端服务、身份认证、文件存储和 SQLite 整合单一二进制文件中。

    • 列表架构特点: 纯 Go 编写,运行时占用极低(通常不到 50MB 内存)。

    • 列表性能表现: 利用 SQLite 的 WAL 模式,单机处理每秒几千次请求轻而易举。

    • 列表适用场景: SaaS 原型、个人博客、中小型管理后台。

    • 列表现代化点: 提供自动化的 REST/SDK 接口和实时订阅(Realtime subscriptions)功能。

  • RE: 吉吉 网站推荐
  • 吉吉 网站推荐

    ζั͡花ั͡藤ั͡字ั͡生ั͡成ั͡器ั͡帮ั͡你ั͡制ั͡作ั͡缠ั͡绕ั͡花ั͡藤ั͡效ั͡果ั͡的ั͡文ั͡字ั͡应ั͡用ั͡在ั͡网ั͡名ั͡昵ั͡称ั͡上ั͡非ั͡常ั͡好ั͡看ั͡漂ั͡亮ั͡。ั͡✾ ั

  • RE: 神秘 软件推荐

    https://www.cgsecurity.org/wiki/TestDisk_Download
    免费开源的数据恢复软件