// ==UserScript==// @name My QNAP// @namespace https://qnap.lan/// @version 2025-05-31// @description try to take over the QNAP!// @author You// @match https://qnap.lan/*// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net// @grant none// ==/UserScript==(function(){'use strict';// Configuration for the observerconstobserverConfig={ childList:true, subtree:true, attributes:false, characterData:false};// Create an observer instanceconstobserver=newMutationObserver(mutations=>{requestIdleCallback(()=>{// DEBUG: Get all label elementsconstallLabels=Array.from(document.querySelectorAll('label.x-form-item-label'));// DEBUG: Find Local IP labelconstlocalIPLabel=allLabels.find(it=>it.innerText==='Local IP');console.debug('[DEBUG] localIPLabel:',localIPLabel);if (localIPLabel==null) {console.warn('[DEBUG] Local IP label not found');return;}constlocalIP=localIPLabel.nextElementSibling.innerText.trim();console.debug('[DEBUG] localIP:',localIP);if(localIP==null||localIP==='') {console.warn('[DEBUG] localIP is null or empty');return;}constquery=newURL(localIP).search;console.debug('[DEBUG] query:',query);// DEBUG: Find SmartShare labelconstsmartShareLabel=allLabels.find(it=>it.innerText==='SmartShare');if (smartShareLabel==null) {console.warn('[DEBUG] SmartShare label not found');return;}constcopyButton=smartShareLabel.nextElementSibling.querySelector('button');if (copyButton==null) {console.warn('[DEBUG] Copy button not found');return;}copyButton.addEventListener('click',()=>{constshareUrl='https://smartshare.zeeko.dev/share.cgi'+query;navigator.clipboard.writeText(shareUrl);});});});// Start observing the document bodyobserver.observe(document.body,observerConfig);// Cleanup observer when page unloadswindow.addEventListener('unload',()=>{observer.disconnect();});})();
09:54:21.055775 [0-0] * [HTTPS-CONNECT] adjust_pollset -> 1 socks09:54:22.048545 [0-0] * [HTTPS-CONNECT] connect, check h2109:54:22.049187 [0-0] * connect to 192.168.100.22 port 443 from 10.1.1.111 port 59496 failed: No route to host
Ncat: Version 7.93 ( https://nmap.org/ncat )Ncat: Connected to 84.17.53.155:9993.Ncat: UDP packet sent successfullyNcat: 1 bytes sent, 0 bytes received in 2.00 seconds.
{"settings":{"interfacePrefixBlacklist":["XXX",... ],/* Array of interface name prefixes (e.g. eth for eth#) to blacklist for ZT traffic */"bind":["ip",... ],/* If present and non-null, bind to these IPs instead of to each interface (wildcard IP allowed) */}}
在我的测试下,需要指定 bind 为 LAN 地址,才能真正解决这个问题。这样设置后,Zerotier 就会通过代理服务跟 Planet 沟通,在管理面板上,OpenWRT 的物理地址也会被展示成代理服务的 IP。
[Unit]Description=Set up specific macvlan route for a Docker containerAfter=network.target[Service]Type=oneshotRemainAfterExit=yes# Replace <your-network-interface> with the actual interface nameExecStart=/usr/bin/ip link add mvlan0 link <your-network-interface> type macvlan mode bridgeExecStart=/usr/bin/ip addr add <unused-ip>/24 dev mvlan0ExecStart=/usr/bin/ip link set mvlan0 upExecStart=/usr/bin/ip route del 192.168.100.0/24 dev mvlan0ExecStart=/usr/bin/ip route add 192.168.100.22 dev mvlan0ExecStop=/usr/bin/ip link delete mvlan0[Install]WantedBy=multi-user.target
tunnel:<Tunnel ID>credentials-file:/path/to/<Tunnel ID>.jsoningress:-hostname:ng-serve.zeeko.devpath:/api/.*service:http://localhost:3000-hostname:ng-serve.zeeko.devservice:http://localhost:4200# this is a required fallback rule-service:http_status:503
禁用 Cloudfare 缓存
你的 Cloudflare 帐户很可能默认开启了请求缓存功能,在一些使用场景下,例如,webpack dev server,这个自带的缓存功能会让 dev server 变得很鬼畜,我们需要手动在 Cloudflare 控制面板禁用缓存。
添加 webpack dev server 白名单
如果你在使用 webpack dev server,记得把绑定的域名添加到 allowedHosts 中,避免 HMR 失败。