Giter VIP home page Giter VIP logo

Comments (10)

nekohasekai avatar nekohasekai commented on September 13, 2024

Missing full log.

from sing-box.

0x7d274284 avatar 0x7d274284 commented on September 13, 2024

The full log is here.
Server Side (Docker-Compose) (Fallback Enabled):

sing-box-1  | 6556 INFO [2301277665] inbound/trojan[trojan-raw]: inbound connection from HIDDEN:52346
sing-box-1  | 6556 INFO [72342096] inbound/trojan[trojan-raw]: fallback connection to caddy:8080
sing-box-1  | 6556 DEBUG [72342096] dns: lookup domain caddy
sing-box-1  | 6556 INFO [72342096] dns: lookup succeed for caddy: 172.18.0.3
sing-box-1  | 6556 DEBUG [72342096] dns: resolved [172.18.0.3]
sing-box-1  | 6556 INFO [72342096] outbound/direct[direct-out]: outbound connection to 172.18.0.3:8080
sing-box-1  | 6557 DEBUG [2301277665] inbound/trojan[trojan-raw]: connection closed: process connection from HIDDEN:57026: download: EOF | upload: EOF
sing-box-1  | 6561 INFO [284126810] inbound/trojan[trojan-raw]: inbound connection from HIDDEN:52344
sing-box-1  | 6561 INFO [3281501931] inbound/trojan[trojan-raw]: fallback connection to caddy:8080
sing-box-1  | 6561 DEBUG [3281501931] dns: lookup domain caddy
sing-box-1  | 6561 INFO [3281501931] dns: lookup succeed for caddy: 172.18.0.3
sing-box-1  | 6561 DEBUG [3281501931] dns: resolved [172.18.0.3]
sing-box-1  | 6561 INFO [3281501931] outbound/direct[direct-out]: outbound connection to 172.18.0.3:8080
sing-box-1  | 6561 DEBUG [284126810] inbound/trojan[trojan-raw]: connection closed: process connection from HIDDEN:58994: download: EOF | upload: EOF
sing-box-1  | 6566 INFO [2791008288] inbound/trojan[trojan-raw]: inbound connection from HIDDEN:52340
sing-box-1  | 6566 INFO [2135523363] inbound/trojan[trojan-raw]: fallback connection to caddy:8080
sing-box-1  | 6566 DEBUG [2135523363] dns: lookup domain caddy
sing-box-1  | 6566 INFO [2135523363] dns: lookup succeed for caddy: 172.18.0.3
sing-box-1  | 6566 DEBUG [2135523363] dns: resolved [172.18.0.3]
sing-box-1  | 6566 INFO [2135523363] outbound/direct[direct-out]: outbound connection to 172.18.0.3:8080

Client Side:

INFO[0000] router: loaded geoip database: 250 codes
INFO[0000] router: loaded geosite database: 1033 codes
INFO[0000] router: updated default interface wlan0, index 4
INFO[0000] inbound/tun[tun-in]: started at tun0
INFO[0000] sing-box started (0.99s)
INFO[0001] [2571765276] inbound/tun[tun-in]: inbound packet connection from 172.19.0.1:56518
INFO[0001] [2571765276] inbound/tun[tun-in]: inbound packet connection to 1.1.1.1:53
DEBUG[0001] [2571765276] router: sniffed packet protocol: dns
DEBUG[0001] [2571765276] router: match[0] protocol=dns => dns-out
DEBUG[0001] [2571765276] dns: exchange google.com A INET
DEBUG[0001] [2571765276] dns: match[1] geosite=geolocation-!cn => cloudflare
INFO[0001] outbound/trojan[trojan-in]: outbound packet connection to 1.1.1.1:53
INFO[0006] [3553828839] inbound/tun[tun-in]: inbound packet connection from 172.19.0.1:44218
INFO[0006] [3553828839] inbound/tun[tun-in]: inbound packet connection to 1.1.1.1:53
DEBUG[0006] [3553828839] router: sniffed packet protocol: dns
DEBUG[0006] [3553828839] router: match[0] protocol=dns => dns-out
DEBUG[0006] [3553828839] dns: exchange google.com A INET
DEBUG[0006] [3553828839] dns: match[1] geosite=geolocation-!cn => cloudflare
INFO[0006] outbound/trojan[trojan-in]: outbound packet connection to 1.1.1.1:53
ERROR[0011] [2571765276] dns: exchange failed for google.com.: context deadline exceeded
DEBUG[0011] [2571765276] inbound/tun[tun-in]: connection closed: EOF | upstream: context canceled
INFO[0011] outbound/trojan[trojan-in]: outbound packet connection to 1.1.1.1:53
INFO[0011] [3410565808] inbound/tun[tun-in]: inbound packet connection from 172.19.0.1:39615
INFO[0011] [3410565808] inbound/tun[tun-in]: inbound packet connection to 1.1.1.1:53
DEBUG[0011] [3410565808] router: sniffed packet protocol: dns
DEBUG[0011] [3410565808] router: match[0] protocol=dns => dns-out
DEBUG[0011] [3410565808] dns: exchange google.com A INET
DEBUG[0011] [3410565808] dns: match[1] geosite=geolocation-!cn => cloudflare
ERROR[0016] [3553828839] dns: exchange failed for google.com.: context deadline exceeded
DEBUG[0016] [3553828839] inbound/tun[tun-in]: connection closed: EOF | upstream: context canceled
INFO[0016] outbound/trojan[trojan-in]: outbound packet connection to 1.1.1.1:53
ERROR[0021] [3410565808] dns: exchange failed for google.com.: context deadline exceeded
DEBUG[0021] [3410565808] inbound/tun[tun-in]: connection closed: EOF | upstream: context canceled

The dig command will retry three times

from sing-box.

nekohasekai avatar nekohasekai commented on September 13, 2024

I think there is still some configuration missing, how are you using proxy_protocol?

from sing-box.

0x7d274284 avatar 0x7d274284 commented on September 13, 2024

My haproxy.cfg like this

frontend tcp_in
    bind *:443 alpn h2,http/1.1

    tcp-request inspect-delay 5s
    tcp-request content accept if { req_ssl_hello_type 1 }

    acl is_SING req_ssl_sni -i sing.example.com

    use_backend Live if is_SING

    default_backend default_web

backend SING
  server sing.example.com sing-box:443 send-proxy-v2

backend default_web
  server caddy caddy:443 send-proxy-v2

This error still occurs when I don't use proxy_protocol, so I don't think the problem is related to proxy_protocol

from sing-box.

nekohasekai avatar nekohasekai commented on September 13, 2024

If your problem is not related to a feature, disable it.

from sing-box.

0x7d274284 avatar 0x7d274284 commented on September 13, 2024

Here is a video about this error
https://user-images.githubusercontent.com/112329548/187109897-5fd1e34e-e243-4f28-99f1-96a6cbcc4f6e.mp4
The related logs are as follows

# sing-box run -c /etc/sing-box/config.json
INFO[0000] router: loaded geoip database: 250 codes
INFO[0000] router: loaded geosite database: 1033 codes
INFO[0000] router: updated default interface wlan0, index 4
INFO[0000] inbound/tun[tun-in]: started at tun0
INFO[0000] sing-box started (0.111s)
INFO[0011] [1719130007] inbound/tun[tun-in]: inbound packet connection from 172.19.0.1:51442
INFO[0011] [1719130007] inbound/tun[tun-in]: inbound packet connection to 1.1.1.1:53
DEBUG[0011] [1719130007] router: sniffed packet protocol: dns
DEBUG[0011] [1719130007] router: match[0] protocol=dns => dns-out
DEBUG[0011] [1719130007] dns: exchange google.com A INET
DEBUG[0011] [1719130007] dns: match[1] geosite=geolocation-!cn => cloudflare
INFO[0011] outbound/trojan[trojan-in]: outbound packet connection to 1.1.1.1:53
INFO[0016] [532598967] inbound/tun[tun-in]: inbound packet connection from 172.19.0.1:50872
INFO[0016] [532598967] inbound/tun[tun-in]: inbound packet connection to 1.1.1.1:53
DEBUG[0016] [532598967] router: sniffed packet protocol: dns
DEBUG[0016] [532598967] router: match[0] protocol=dns => dns-out
DEBUG[0016] [532598967] dns: exchange google.com A INET
DEBUG[0016] [532598967] dns: match[1] geosite=geolocation-!cn => cloudflare
INFO[0016] outbound/trojan[trojan-in]: outbound packet connection to 1.1.1.1:53
ERROR[0021] [1719130007] dns: exchange failed for google.com.: context deadline exceeded
INFO[0021] outbound/trojan[trojan-in]: outbound packet connection to 1.1.1.1:53
DEBUG[0021] [1719130007] inbound/tun[tun-in]: connection closed: EOF | upstream: context canceled
INFO[0021] [3102158661] inbound/tun[tun-in]: inbound packet connection from 172.19.0.1:36056
INFO[0021] [3102158661] inbound/tun[tun-in]: inbound packet connection to 1.1.1.1:53
DEBUG[0021] [3102158661] router: sniffed packet protocol: dns
DEBUG[0021] [3102158661] router: match[0] protocol=dns => dns-out
DEBUG[0021] [3102158661] dns: exchange google.com A INET
DEBUG[0021] [3102158661] dns: match[1] geosite=geolocation-!cn => cloudflare
ERROR[0026] [532598967] dns: exchange failed for google.com.: context deadline exceeded
INFO[0026] outbound/trojan[trojan-in]: outbound packet connection to 1.1.1.1:53
DEBUG[0026] [532598967] inbound/tun[tun-in]: connection closed: EOF | upstream: context canceled
DEBUG[0031] [3102158661] inbound/tun[tun-in]: connection closed: EOF | upstream: context canceled
ERROR[0031] [3102158661] dns: exchange failed for google.com.: context deadline exceeded
^C
# sing-box run -c /etc/sing-box/config.json
INFO[0000] router: loaded geoip database: 250 codes
INFO[0000] router: loaded geosite database: 1033 codes
INFO[0000] router: updated default interface wlan0, index 4
INFO[0000] inbound/tun[tun-in]: started at tun0
INFO[0000] sing-box started (0.144s)
INFO[0006] [2113394183] inbound/tun[tun-in]: inbound packet connection from 172.19.0.1:34961
INFO[0006] [2113394183] inbound/tun[tun-in]: inbound packet connection to 1.1.1.1:53
DEBUG[0006] [2113394183] router: sniffed packet protocol: dns
DEBUG[0006] [2113394183] router: match[0] protocol=dns => dns-out
DEBUG[0006] [2113394183] dns: exchange google.com A INET
DEBUG[0006] [2113394183] dns: match[1] geosite=geolocation-!cn => cloudflare
INFO[0006] [2113394183] outbound/trojan[trojan-in]: outbound connection to 1.1.1.1:443
INFO[0007] [2113394183] dns: exchanged google.com. A 172.217.14.78
DEBUG[0017] [2113394183] inbound/tun[tun-in]: connection closed: EOF | upstream: context canceled

from sing-box.

mazzz1y avatar mazzz1y commented on September 13, 2024

The same issue.

It works:

  "dns": {
    "servers": [
      {
        "address": "tcp://8.8.8.8", 
        "detour": "trojan-out"
      }
    ]
  },

This does not work:

  "dns": {
    "servers": [
      {
        "address": "udp://8.8.8.8", 
        "detour": "trojan-out"
      }
    ]
  },

Log and config the same ~

from sing-box.

nekohasekai avatar nekohasekai commented on September 13, 2024

Try 9078bc2

from sing-box.

mazzz1y avatar mazzz1y commented on September 13, 2024

Looks like it works as expected. Thank you

from sing-box.

0x7d274284 avatar 0x7d274284 commented on September 13, 2024

It works. Thank you.

from sing-box.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.