ts whitelist fix

This commit is contained in:
Sam Latsin 2026-10-23 18:15:43 +03:00
parent 21180acbaf
commit 6723f4e2cb
4 changed files with 9 additions and 5 deletions

View File

@ -331,7 +331,7 @@ RU-адреса, без OpenVPN, Tailscale, торрентов и `PUSH`; сво
| всё остальное (`MAIN`) | `FOREIGN` | `FOREIGN` | напрямую (можно `MY`) | `FOREIGN` | | всё остальное (`MAIN`) | `FOREIGN` | `FOREIGN` | напрямую (можно `MY`) | `FOREIGN` |
| торренты (порты 20000–20199) | ✓ | ✓ | ✓ | — | | торренты (порты 20000–20199) | ✓ | ✓ | ✓ | — |
| OpenVPN | напрямую | через `OVPN-EXIT` (RU-нода) | через `OVPN-EXIT` (RU-нода) | — | | OpenVPN | напрямую | через `OVPN-EXIT` (RU-нода) | через `OVPN-EXIT` (RU-нода) | — |
| Tailscale | напрямую | через `MY` (свои hysteria2), без них напрямую* | напрямую | — | | Tailscale | напрямую | через `MY` (свои hysteria2 и `[MY]`-ноды подписки), без них напрямую* | напрямую | — |
| свои серверы | напрямую | через `MY-EXIT` | напрямую | через `MY-EXIT` | | свои серверы | напрямую | через `MY-EXIT` | напрямую | через `MY-EXIT` |
| пуши (`PUSH`, отключаемо) | `DIRECT` | `MY` | `DIRECT` | — | | пуши (`PUSH`, отключаемо) | `DIRECT` | `MY` | `DIRECT` | — |

View File

@ -9,6 +9,7 @@
udp: true udp: true
accept-routes: true accept-routes: true
dialer-proxy: TS-EXIT #@ts_exit dialer-proxy: TS-EXIT #@ts_exit
# whitelist: control and DERP over TCP through own servers (MY -> hysteria2 -> MY-EXIT); #@whitelist,hy2,!ts_exit # whitelist: control and DERP over TCP through own servers (MY -> own node -> MY-EXIT); #@whitelist,!ts_exit
# needs the kit's core (v1.19.32-ts1, tools/core/*.patch, MetaCubeX/mihomo#3142) #@whitelist,hy2,!ts_exit # MY holds hysteria2 from the settings and "[MY]" nodes of the subscriptions; empty MY is direct #@whitelist,!ts_exit
dialer-proxy: MY #@whitelist,hy2,!ts_exit # needs the kit's core (v1.19.32-ts1, tools/core/*.patch, MetaCubeX/mihomo#3142) #@whitelist,!ts_exit
dialer-proxy: MY #@whitelist,!ts_exit

View File

@ -0,0 +1,3 @@
TARGET=router
LOCATION=whitelist
TAILSCALE=1

View File

@ -535,7 +535,7 @@ const TEMPLATES = {
"providers/15-sub.each.yaml": " # own servers kept in the subscription, named \"[MY] ...\", for group MY (the main\n # provider leaves them out); a provider of its own because on whitelist and the\n # phone they go through MY-EXIT. Router: not a second download, reads the file the\n # main provider saves (mihomo watches it; ./providers exists before the start,\n # ovpn_routes_write). Phone: FlClash moves provider files to paths of its own,\n # so the subscription is fetched once more.\n ${SUB_NAME}-my:\n type: file #@router\n path: ./providers/${SUB_NAME}.yaml #@router\n type: http #@mobile\n url: \"${SUB_URL}\" #@mobile\n path: ./providers/${SUB_NAME}-my.yaml #@mobile\n interval: 3600 #@mobile\n proxy: ${@SUB_PROXY} #@mobile\n filter: \"(?i)\\\\[MY\\\\]\"\n override: #@my_exit\n dialer-proxy: MY-EXIT #@my_exit\n override: #@csqtt,!my_exit\n dialer-proxy: UPLINK #@csqtt,!my_exit\n header: #@mobile\n User-Agent: [\"${SUB_UA}\"] #@mobile\n ${@@SUB_HEADERS} #@mobile\n health-check:\n enable: true\n url: \"https://www.gstatic.com/generate_204\"\n interval: 300 #@!lite\n interval: 600 #@lite\n timeout: 3000\n lazy: false #@!lite\n lazy: true #@lite\n", "providers/15-sub.each.yaml": " # own servers kept in the subscription, named \"[MY] ...\", for group MY (the main\n # provider leaves them out); a provider of its own because on whitelist and the\n # phone they go through MY-EXIT. Router: not a second download, reads the file the\n # main provider saves (mihomo watches it; ./providers exists before the start,\n # ovpn_routes_write). Phone: FlClash moves provider files to paths of its own,\n # so the subscription is fetched once more.\n ${SUB_NAME}-my:\n type: file #@router\n path: ./providers/${SUB_NAME}.yaml #@router\n type: http #@mobile\n url: \"${SUB_URL}\" #@mobile\n path: ./providers/${SUB_NAME}-my.yaml #@mobile\n interval: 3600 #@mobile\n proxy: ${@SUB_PROXY} #@mobile\n filter: \"(?i)\\\\[MY\\\\]\"\n override: #@my_exit\n dialer-proxy: MY-EXIT #@my_exit\n override: #@csqtt,!my_exit\n dialer-proxy: UPLINK #@csqtt,!my_exit\n header: #@mobile\n User-Agent: [\"${SUB_UA}\"] #@mobile\n ${@@SUB_HEADERS} #@mobile\n health-check:\n enable: true\n url: \"https://www.gstatic.com/generate_204\"\n interval: 300 #@!lite\n interval: 600 #@lite\n timeout: 3000\n lazy: false #@!lite\n lazy: true #@lite\n",
"providers/20-openvpn.yaml": " # OpenVPN: file written on the router by bmstu-otp.sh (fresh TOTP in the\n # password). No health-check here: a dead tunnel would be redialed with a\n # stale OTP; the cron watchdog (bmstu-otp.sh check) handles it.\n ${OVPN_PROVIDER}:\n type: file\n path: ./providers/${OVPN_PROVIDER}.yaml\n health-check:\n enable: false\n override: #@ovpn_exit\n dialer-proxy: OVPN-EXIT #@ovpn_exit\n", "providers/20-openvpn.yaml": " # OpenVPN: file written on the router by bmstu-otp.sh (fresh TOTP in the\n # password). No health-check here: a dead tunnel would be redialed with a\n # stale OTP; the cron watchdog (bmstu-otp.sh check) handles it.\n ${OVPN_PROVIDER}:\n type: file\n path: ./providers/${OVPN_PROVIDER}.yaml\n health-check:\n enable: false\n override: #@ovpn_exit\n dialer-proxy: OVPN-EXIT #@ovpn_exit\n",
"proxies/10-boot.each.yaml": " - name: ${SEED_NAME}\n type: vless\n server: ${SEED_SERVER}\n port: ${SEED_PORT}\n uuid: ${SEED_UUID}\n network: tcp\n udp: true\n tls: true\n flow: xtls-rprx-vision\n servername: ${SEED_SNI}\n client-fingerprint: firefox\n reality-opts:\n public-key: ${SEED_PBK}\n short-id: ${SEED_SID}\n dialer-proxy: UPLINK #@csqtt\n", "proxies/10-boot.each.yaml": " - name: ${SEED_NAME}\n type: vless\n server: ${SEED_SERVER}\n port: ${SEED_PORT}\n uuid: ${SEED_UUID}\n network: tcp\n udp: true\n tls: true\n flow: xtls-rprx-vision\n servername: ${SEED_SNI}\n client-fingerprint: firefox\n reality-opts:\n public-key: ${SEED_PBK}\n short-id: ${SEED_SID}\n dialer-proxy: UPLINK #@csqtt\n",
"proxies/20-tailscale.yaml": " # Tailscale: userspace node, starts on first use. First login: open the URL\n # from the nikki log (\"To start this tsnet server ... go to: ...\"), then\n # disable key expiry for this node. Needs TS_FORCE_NOISE_443=true in the\n # mihomo environment (mihomo-kit.sh fix).\n - name: tailscale\n type: tailscale\n hostname: ${TS_HOSTNAME}\n state-dir: ./tailscale\n udp: true\n accept-routes: true\n dialer-proxy: TS-EXIT #@ts_exit\n # whitelist: control and DERP over TCP through own servers (MY -> hysteria2 -> MY-EXIT); #@whitelist,hy2,!ts_exit\n # needs the kit's core (v1.19.32-ts1, tools/core/*.patch, MetaCubeX/mihomo#3142) #@whitelist,hy2,!ts_exit\n dialer-proxy: MY #@whitelist,hy2,!ts_exit\n", "proxies/20-tailscale.yaml": " # Tailscale: userspace node, starts on first use. First login: open the URL\n # from the nikki log (\"To start this tsnet server ... go to: ...\"), then\n # disable key expiry for this node. Needs TS_FORCE_NOISE_443=true in the\n # mihomo environment (mihomo-kit.sh fix).\n - name: tailscale\n type: tailscale\n hostname: ${TS_HOSTNAME}\n state-dir: ./tailscale\n udp: true\n accept-routes: true\n dialer-proxy: TS-EXIT #@ts_exit\n # whitelist: control and DERP over TCP through own servers (MY -> own node -> MY-EXIT); #@whitelist,!ts_exit\n # MY holds hysteria2 from the settings and \"[MY]\" nodes of the subscriptions; empty MY is direct #@whitelist,!ts_exit\n # needs the kit's core (v1.19.32-ts1, tools/core/*.patch, MetaCubeX/mihomo#3142) #@whitelist,!ts_exit\n dialer-proxy: MY #@whitelist,!ts_exit\n",
"proxies/30-hy2.each.yaml": " - name: ${HY2_NAME}\n type: hysteria2\n server: ${HY2_SERVER}\n port: ${HY2_PORT}\n password: \"${HY2_PASSWORD}\"\n obfs: ${@HY2_OBFS}\n obfs-password: \"${@@HY2_OBFS_PASSWORD}\"\n sni: ${@HY2_SNI}\n skip-cert-verify: ${HY2_INSECURE}\n up: \"${@@HY2_UP}\"\n down: \"${@@HY2_DOWN}\"\n udp: true\n dialer-proxy: MY-EXIT #@my_exit\n dialer-proxy: UPLINK #@csqtt,!my_exit\n", "proxies/30-hy2.each.yaml": " - name: ${HY2_NAME}\n type: hysteria2\n server: ${HY2_SERVER}\n port: ${HY2_PORT}\n password: \"${HY2_PASSWORD}\"\n obfs: ${@HY2_OBFS}\n obfs-password: \"${@@HY2_OBFS_PASSWORD}\"\n sni: ${@HY2_SNI}\n skip-cert-verify: ${HY2_INSECURE}\n up: \"${@@HY2_UP}\"\n down: \"${@@HY2_DOWN}\"\n udp: true\n dialer-proxy: MY-EXIT #@my_exit\n dialer-proxy: UPLINK #@csqtt,!my_exit\n",
"proxies/40-csqtt.yaml": " # CSQTT (star-panel-csqtt): tunnel interface csqtt0 on the router, mihomo\n # just sends the connection out of it (the interface does not change routes)\n - name: CSQTT\n type: direct\n interface-name: ${CSQTT_IFACE}\n udp: true\n", "proxies/40-csqtt.yaml": " # CSQTT (star-panel-csqtt): tunnel interface csqtt0 on the router, mihomo\n # just sends the connection out of it (the interface does not change routes)\n - name: CSQTT\n type: direct\n interface-name: ${CSQTT_IFACE}\n udp: true\n",
"rule-providers/10-base.yaml": " # Russian services (geosite ru-inside of russia-only, as .mrs): an ordinary\n # http rule-set, so every client fetches it with the config, no geodata setup\n ru-inside:\n type: http\n behavior: domain\n format: mrs\n url: \"${RULESET_URL}/ru-inside.mrs\"\n path: ./ruleset/ru-inside.mrs\n interval: 86400\n", "rule-providers/10-base.yaml": " # Russian services (geosite ru-inside of russia-only, as .mrs): an ordinary\n # http rule-set, so every client fetches it with the config, no geodata setup\n ru-inside:\n type: http\n behavior: domain\n format: mrs\n url: \"${RULESET_URL}/ru-inside.mrs\"\n path: ./ruleset/ru-inside.mrs\n interval: 86400\n",