fix: complete Telegram routing, AmneziaWG action support & flowtable bypass

- nft/apply.uc: add 'awg' and 'warp' to action_captures_traffic so nftables
  creates priority sets for AmneziaWG / Cloudflare WARP sections.
- nft/apply.uc: insert flowtable bypass in fw4 forward for marked TPROXY packets
  so OpenWrt flow offloading doesn't hijack proxied connections.
- singbox/generator_routes.uc: include official Telegram IP CIDRs in route rules
  for telegram community list so direct IP connections match sing-box rules.
This commit is contained in:
Dushnilin
2026-07-26 21:31:31 +03:00
parent e98a2c325e
commit e9ad56df56
2 changed files with 12 additions and 1 deletions
+2 -1
View File
@@ -606,7 +606,7 @@ function section_action(section) {
function action_captures_traffic(action) {
return action == "connection" || action == "proxy" || action == "outbound" || action == "vpn" ||
action == "block" || action == "zapret" || action == "zapret2" || action == "byedpi";
action == "awg" || action == "warp" || action == "block" || action == "zapret" || action == "zapret2" || action == "byedpi";
}
function section_priority_action(section) {
@@ -1488,6 +1488,7 @@ function ensure_tproxy_route_rule(table, mark, rt_tables_path) {
log_debug("IPv6 TPROXY marking rule already exists");
}
run_args([ "nft", "insert", "rule", "inet", "fw4", "forward", "meta", "mark", as_string(mark), "return" ]);
return true;
}
@@ -1139,6 +1139,16 @@ function add_combined_route_for_section(config, section) {
let ensured = ensure_community_ruleset(config, section_name, as_string(community));
push(rule_set_tags, ensured.tag);
push(dns_rule_set_tags, ensured.tag);
if (as_string(community) == "telegram") {
let tg_cidrs = [
"149.154.160.0/20", "91.108.4.0/22", "91.108.8.0/22",
"91.108.12.0/22", "91.108.16.0/22", "91.108.56.0/22",
"5.28.192.0/18", "91.105.192.0/23", "95.161.64.0/20",
"185.76.151.0/24", "194.221.0.0/16"
];
for (let cidr in tg_cidrs)
push(ip_cidr, cidr);
}
}
for (let reference in connections.rule_sets(section)) {
let ensured = ensure_custom_ruleset(config, as_string(reference));