hiddify / hiddify-app

Multi-platform auto-proxy client, supporting Sing-box, X-ray, TUIC, Hysteria, Reality, Trojan, SSH etc. It’s an open-source, secure and ad-free.
https://hiddify.com
Other
17.92k stars 1.6k forks source link

RTC calls not connecting while using a custom singbox SSH config #1468

Closed DevPIXL closed 4 weeks ago

DevPIXL commented 4 weeks ago

Search first

What Happened?

{ "log": { "level": "warn", "output": "box.log", "timestamp": true }, "dns": { "servers": [ { "tag": "dns-remote", "address": "tls://1.1.1.1", "address_resolver": "dns-direct" }, { "tag": "dns-trick-direct", "address": "https://sky.rethinkdns.com/", "detour": "direct-fragment" }, { "tag": "dns-direct", "address": "1.1.1.1", "address_resolver": "dns-local", "detour": "direct" }, { "tag": "dns-local", "address": "local", "detour": "direct" }, { "tag": "dns-block", "address": "rcode://success" } ], "rules": [ { "domain_suffix": ".ir", "geosite": "ir", "server": "dns-direct" }, { "domain": "cp.cloudflare.com", "server": "dns-remote", "rewrite_ttl": 3000 } ], "final": "dns-remote", "static_ips": { "sky.rethinkdns.com": [ "188.114.98.0", "188.114.99.0", "104.18.203.232", "104.18.202.232", "188.114.99.0", "188.114.98.0" ] }, "independent_cache": true }, "inbounds": [ { "type": "tun", "tag": "tun-in", "mtu": 9000, "inet4_address": "172.19.0.1/28", "auto_route": true, "strict_route": true, "endpoint_independent_nat": true, "stack": "mixed", "sniff": true, "sniff_override_destination": true }, { "type": "mixed", "tag": "mixed-in", "listen": "127.0.0.1", "listen_port": 2334, "sniff": true, "sniff_override_destination": true }, { "type": "direct", "tag": "dns-in", "listen": "127.0.0.1", "listen_port": 6450, "override_address": "1.1.1.1", "override_port": 53 } ], "outbounds": [ { "type": "selector", "tag": "select", "outbounds": [ "auto", "proxy" ], "default": "auto" }, { "type": "urltest", "tag": "auto", "outbounds": [ "proxy" ], "url": "http://cp.cloudflare.com/", "interval": "10m0s", "idle_timeout": "1h40m0s" }, { "type": "ssh", "tag": "proxy", "server": "آدرس SSH", "server_port": "پورت SSH", "user": "یوزر SSH", "password": "پسورد SSH" }, { "type": "dns", "tag": "dns-out" }, { "type": "direct", "tag": "direct" }, { "type": "direct", "tag": "direct-fragment", "tls_fragment": { "enabled": true, "size": "1-500", "sleep": "0-500" } }, { "type": "direct", "tag": "bypass" }, { "type": "block", "tag": "block" } ], "route": { "geoip": { "path": "geo-assets/sagernet-sing-geoip-geoip.db" }, "geosite": { "path": "geo-assets/sagernet-sing-geosite-geosite.db" }, "rules": [ { "inbound": "dns-in", "outbound": "dns-out" }, { "port": 53, "outbound": "dns-out" }, { "clash_mode": "Direct", "outbound": "direct" }, { "clash_mode": "Global", "outbound": "select" }, { "domain_suffix": ".ir", "geosite": "ir", "geoip": "ir", "outbound": "bypass" } ], "final": "select", "auto_detect_interface": true, "override_android_vpn": true }, "experimental": { "cache_file": { "enabled": true, "path": "clash.db" }, "clash_api": { "external_controller": "127.0.0.1:6756", "secret": "sFZ9P24RXZRKp0uk" } } }

This is a template for my SSH config. It works fine except when I try voice/video calling on Telegram and when I wanna connect to a Discord voice channel, using Hiddify android and iPhone clients.

I tried changing all variations of Config options in the Hiddify client, yet the problem persisted. Let's say the UDPGW port of my SSH VPN server is: 7302, how can I fix this Issue in my config? Thank you.

Minimal Reproducible Example (MRE)

  1. Connect to a custom Singbox SSH config matching the template provided (on any smartphone).
  2. Try calling someone on Telegram or connect to any discord voice channel.

Expected Behavior

The apps show "Connecting" or "RTC Connecting" and get stuck on said status. image Screenshot_2024_11_02_21_24_43_82_fa4ea8e8aeb69dcd3ab969e8fd3d4310 Screenshot_2024_11_02_21_26_32_95_0b342c26d6c44f3c8d2de40eabb4e1da

Version

Tried on 1.5.2 and 2.0.5 and latest iOS dev build on AppStore

Platform/OS

Android, iOS

Additional Context

No response

Application Config Options

{
  "region": "ir",
  "block-ads": false,
  "execute-config-as-is": false,
  "log-level": "warn",
  "resolve-destination": false,
  "ipv6-mode": "ipv4_only",
  "remote-dns-address": "tls://1.1.1.1",
  "remote-dns-domain-strategy": "",
  "direct-dns-address": "1.1.1.1",
  "direct-dns-domain-strategy": "",
  "mixed-port": 2334,
  "tproxy-port": 2335,
  "local-dns-port": 6450,
  "tun-implementation": "mixed",
  "mtu": 9000,
  "strict-route": true,
  "connection-test-url": "http://connectivitycheck.gstatic.com/generate_204",
  "url-test-interval": 600,
  "enable-clash-api": true,
  "clash-api-port": 6756,
  "enable-tun": true,
  "enable-tun-service": false,
  "set-system-proxy": false,
  "bypass-lan": false,
  "allow-connection-from-lan": false,
  "enable-fake-dns": false,
  "enable-dns-routing": true,
  "independent-dns-cache": true,
  "rules": [],
  "mux": {
    "enable": false,
    "padding": false,
    "max-streams": 8,
    "protocol": "h2mux"
  },
  "tls-tricks": {
    "enable-fragment": false,
    "fragment-size": "1-500",
    "fragment-sleep": "0-500",
    "mixed-sni-case": false,
    "enable-padding": false,
    "padding-size": "1-1500"
  },
  "warp": {
    "enable": false,
    "mode": "proxy_over_warp",
    "wireguard-config": "",
    "license-key": "",
    "account-id": "",
    "access-token": "",
    "clean-ip": "auto",
    "clean-port": 0,
    "noise": "5-10",
    "noise-delay": "20-200"
  },
  "warp2": {
    "enable": false,
    "mode": "proxy_over_warp",
    "wireguard-config": "",
    "license-key": "",
    "account-id": "",
    "access-token": "",
    "clean-ip": "auto",
    "clean-port": 0,
    "noise": "5-10",
    "noise-delay": "20-200"
  }
}

Relevant log output

Screenshot_2024_11_02_21_27_30_24_dd661fbf574bc01712a840b6c315ea7e

Are you willing to submit a PR? If you know how to fix the bug.

hiddify-com commented 4 weeks ago

because ssh won't support UDP packets