Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass LAN option doesn't work with local domains (hostnames) #1431

Open
1 of 2 tasks
proninyaroslav opened this issue Oct 22, 2024 · 4 comments
Open
1 of 2 tasks

Bypass LAN option doesn't work with local domains (hostnames) #1431

proninyaroslav opened this issue Oct 22, 2024 · 4 comments
Labels
bug Something isn't working reviewed

Comments

@proninyaroslav
Copy link
Contributor

Search first

  • I searched and no similar issues were found

What Happened?

Bypass LAN works fine with IP addresses, but I can't open local domains (hostname domains) on my router, such as openwrt.lan or server.lan. The log is littered with errors like dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error

Minimal Reproducible Example (MRE)

  1. Enable Bypass LAN and Allow connection from LAN options
  2. Try to open any local address in a browser, such as openwrt.lan or SMB hostname

Expected Behavior

Local domains must be handled along with IP addresses.

Version

v2.0.5

Platform/OS

Android, Linux

Additional Context

No response

Application Config Options

{
  "region": "ru",
  "block-ads": false,
  "execute-config-as-is": false,
  "log-level": "warn",
  "resolve-destination": false,
  "ipv6-mode": "ipv4_only",
  "remote-dns-address": "udp://1.1.1.1",
  "remote-dns-domain-strategy": "",
  "direct-dns-address": "1.1.1.1",
  "direct-dns-domain-strategy": "",
  "mixed-port": 12334,
  "tproxy-port": 12335,
  "local-dns-port": 16450,
  "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": 16756,
  "enable-tun": false,
  "enable-tun-service": false,
  "set-system-proxy": true,
  "bypass-lan": true,
  "allow-connection-from-lan": true,
  "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": "10-30",
    "fragment-sleep": "2-8",
    "mixed-sni-case": false,
    "enable-padding": false,
    "padding-size": "1-1500"
  },
  "warp": {
    "enable": true,
    "mode": "proxy_over_warp",
    "clean-ip": "188.114.96.1",
    "clean-port": 500,
    "noise": "5-10",
    "noise-size": "40-100",
    "noise-delay": "20-250",
    "noise-mode": "m4"
  },
  "warp2": {
    "enable": true,
    "mode": "proxy_over_warp",
    "clean-ip": "188.114.96.1",
    "clean-port": 500,
    "noise": "5-10",
    "noise-size": "40-100",
    "noise-delay": "20-250",
    "noise-mode": "m4"
  }
}

Relevant log output

+0300 2024-10-22 12:25:20 ERROR router: fetch rule-set geoip-ru: Get "https://raw.githubusercontent.com/hiddify/hiddify-geo/rule-set/country/geoip-ru.srs": EOF
+0300 2024-10-22 12:25:20 ERROR router: fetch rule-set geosite-ru: Get "https://raw.githubusercontent.com/hiddify/hiddify-geo/rule-set/country/geosite-ru.srs": unexpected EOF
+0300 2024-10-22 12:25:26 ERROR [3484094315 42ms] dns: lookup failed for openwrt.lan: exchange4: name error | exchange6: name error
+0300 2024-10-22 12:25:26 ERROR [3484094315 42ms] dns: lookup failed for openwrt.lan: exchange4: name error | exchange6: name error
+0300 2024-10-22 12:25:26 ERROR [3484094315 42ms] outbound/urltest[auto]: exchange4: name error | exchange6: name error
+0300 2024-10-22 12:25:27 ERROR [1796786536 32ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:27 ERROR [1796786536 32ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:27 ERROR [1796786536 32ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:27 ERROR [4039765534 32ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:27 ERROR [4039765534 32ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:27 ERROR [4039765534 32ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:28 ERROR [742552596 1ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:28 ERROR [742552596 1ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:28 ERROR [742552596 1ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:29 ERROR [1909672394 908ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:29 ERROR [1909672394 908ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:29 ERROR [1909672394 908ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:30 ERROR [404204131 246ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:30 ERROR [404204131 246ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:30 ERROR [404204131 246ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:40 ERROR [1276109166 10.45s] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:40 ERROR [1276109166 10.45s] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:40 ERROR [1276109166 10.45s] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1762659781 33ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1762659781 33ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1762659781 33ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1931663921 34ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1931663921 34ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1931663921 34ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:45 ERROR [3083153394 1ms] dns: lookup failed for optimizationguide-pa.googleapis.com: exchange6: dial udp 1.1.1.1:53: operation was canceled | exchange4: dial udp 1.1.1.1:53: operation was canceled | upstream: context canceled
+0300 2024-10-22 12:25:45 ERROR [3083153394 1ms] outbound/urltest[auto]: context canceled
+0300 2024-10-22 12:25:45 ERROR [447228351 0ms] dns: lookup failed for optimizationguide-pa.googleapis.com: exchange6: dial udp 1.1.1.1:53: operation was canceled | exchange4: dial udp 1.1.1.1:53: operation was canceled | upstream: context canceled
+0300 2024-10-22 12:25:45 ERROR [447228351 0ms] outbound/urltest[auto]: context canceled
+0300 2024-10-22 12:25:45 ERROR [2442704816 0ms] dns: lookup failed for optimizationguide-pa.googleapis.com: exchange6: dial udp 1.1.1.1:53: operation was canceled | exchange4: dial udp 1.1.1.1:53: operation was canceled | upstream: context canceled
+0300 2024-10-22 12:25:45 WARN outbound/urltest[auto]: TCP URLTest Outbound auto (WARP § 0) failed to connect for 10 times==> test proxies again!
+0300 2024-10-22 12:25:45 ERROR dns: lookup failed for connectivitycheck.gstatic.com: exchange4: dial udp 1.1.1.1:53: operation was canceled | exchange6: dial udp 1.1.1.1:53: operation was canceled
+0300 2024-10-22 12:25:46 ERROR [2442704816 9ms] outbound/urltest[auto]: context canceled

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

  • I'm willing to submit a PR (Thank you!)
@proninyaroslav proninyaroslav added the bug Something isn't working label Oct 22, 2024
@taorye
Copy link

taorye commented Nov 1, 2024

Search first

* [x]  I searched and no similar issues were found

What Happened?

Bypass LAN works fine with IP addresses, but I can't open local domains (hostname domains) on my router, such as openwrt.lan or server.lan. The log is littered with errors like dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error

Minimal Reproducible Example (MRE)

1. Enable Bypass LAN and Allow connection from LAN options

2. Try to open any local address in a browser, such as `openwrt.lan` or SMB hostname

Expected Behavior

Local domains must be handled along with IP addresses.

Version

v2.0.5

Platform/OS

Android, Linux

Additional Context

No response

Application Config Options

{
  "region": "ru",
  "block-ads": false,
  "execute-config-as-is": false,
  "log-level": "warn",
  "resolve-destination": false,
  "ipv6-mode": "ipv4_only",
  "remote-dns-address": "udp://1.1.1.1",
  "remote-dns-domain-strategy": "",
  "direct-dns-address": "1.1.1.1",
  "direct-dns-domain-strategy": "",
  "mixed-port": 12334,
  "tproxy-port": 12335,
  "local-dns-port": 16450,
  "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": 16756,
  "enable-tun": false,
  "enable-tun-service": false,
  "set-system-proxy": true,
  "bypass-lan": true,
  "allow-connection-from-lan": true,
  "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": "10-30",
    "fragment-sleep": "2-8",
    "mixed-sni-case": false,
    "enable-padding": false,
    "padding-size": "1-1500"
  },
  "warp": {
    "enable": true,
    "mode": "proxy_over_warp",
    "clean-ip": "188.114.96.1",
    "clean-port": 500,
    "noise": "5-10",
    "noise-size": "40-100",
    "noise-delay": "20-250",
    "noise-mode": "m4"
  },
  "warp2": {
    "enable": true,
    "mode": "proxy_over_warp",
    "clean-ip": "188.114.96.1",
    "clean-port": 500,
    "noise": "5-10",
    "noise-size": "40-100",
    "noise-delay": "20-250",
    "noise-mode": "m4"
  }
}

Relevant log output

+0300 2024-10-22 12:25:20 ERROR router: fetch rule-set geoip-ru: Get "https://raw.githubusercontent.com/hiddify/hiddify-geo/rule-set/country/geoip-ru.srs": EOF
+0300 2024-10-22 12:25:20 ERROR router: fetch rule-set geosite-ru: Get "https://raw.githubusercontent.com/hiddify/hiddify-geo/rule-set/country/geosite-ru.srs": unexpected EOF
+0300 2024-10-22 12:25:26 ERROR [3484094315 42ms] dns: lookup failed for openwrt.lan: exchange4: name error | exchange6: name error
+0300 2024-10-22 12:25:26 ERROR [3484094315 42ms] dns: lookup failed for openwrt.lan: exchange4: name error | exchange6: name error
+0300 2024-10-22 12:25:26 ERROR [3484094315 42ms] outbound/urltest[auto]: exchange4: name error | exchange6: name error
+0300 2024-10-22 12:25:27 ERROR [1796786536 32ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:27 ERROR [1796786536 32ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:27 ERROR [1796786536 32ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:27 ERROR [4039765534 32ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:27 ERROR [4039765534 32ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:27 ERROR [4039765534 32ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:28 ERROR [742552596 1ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:28 ERROR [742552596 1ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:28 ERROR [742552596 1ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:29 ERROR [1909672394 908ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:29 ERROR [1909672394 908ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:29 ERROR [1909672394 908ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:30 ERROR [404204131 246ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:30 ERROR [404204131 246ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:30 ERROR [404204131 246ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:40 ERROR [1276109166 10.45s] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:40 ERROR [1276109166 10.45s] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:40 ERROR [1276109166 10.45s] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1762659781 33ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1762659781 33ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1762659781 33ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1931663921 34ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1931663921 34ms] dns: lookup failed for openwrt.lan: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:41 ERROR [1931663921 34ms] outbound/urltest[auto]: exchange6: name error | exchange4: name error
+0300 2024-10-22 12:25:45 ERROR [3083153394 1ms] dns: lookup failed for optimizationguide-pa.googleapis.com: exchange6: dial udp 1.1.1.1:53: operation was canceled | exchange4: dial udp 1.1.1.1:53: operation was canceled | upstream: context canceled
+0300 2024-10-22 12:25:45 ERROR [3083153394 1ms] outbound/urltest[auto]: context canceled
+0300 2024-10-22 12:25:45 ERROR [447228351 0ms] dns: lookup failed for optimizationguide-pa.googleapis.com: exchange6: dial udp 1.1.1.1:53: operation was canceled | exchange4: dial udp 1.1.1.1:53: operation was canceled | upstream: context canceled
+0300 2024-10-22 12:25:45 ERROR [447228351 0ms] outbound/urltest[auto]: context canceled
+0300 2024-10-22 12:25:45 ERROR [2442704816 0ms] dns: lookup failed for optimizationguide-pa.googleapis.com: exchange6: dial udp 1.1.1.1:53: operation was canceled | exchange4: dial udp 1.1.1.1:53: operation was canceled | upstream: context canceled
+0300 2024-10-22 12:25:45 WARN outbound/urltest[auto]: TCP URLTest Outbound auto (WARP § 0) failed to connect for 10 times==> test proxies again!
+0300 2024-10-22 12:25:45 ERROR dns: lookup failed for connectivitycheck.gstatic.com: exchange4: dial udp 1.1.1.1:53: operation was canceled | exchange6: dial udp 1.1.1.1:53: operation was canceled
+0300 2024-10-22 12:25:46 ERROR [2442704816 9ms] outbound/urltest[auto]: context canceled

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

* [ ]  I'm willing to submit a PR (Thank you!)

Could you try these local domains like <your_host_name>.local?
It worked on my computers. (both Windows and Linux)

Wireshark can also be used to check the true destination of DNS requests.

@proninyaroslav
Copy link
Contributor Author

Same thing.

@taorye
Copy link

taorye commented Nov 1, 2024

Same thing.

try gvisor instead of mixed, for the TUN impl.

@proninyaroslav
Copy link
Contributor Author

@taorye
I had it selected initially. I also tried mixed, but nothing changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reviewed
Projects
Status: No status
Development

No branches or pull requests

3 participants