Comments (10)
Missing full log.
from sing-box.
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.
I think there is still some configuration missing, how are you using proxy_protocol?
from sing-box.
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.
If your problem is not related to a feature, disable it.
from sing-box.
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.
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.
Try 9078bc2
from sing-box.
Looks like it works as expected. Thank you
from sing-box.
It works. Thank you.
from sing-box.
Related Issues (20)
- The sing-box program is frequently disconnected and the program hangs dead HOT 1
- deleted
- 希望有能直接跑通的示例,官网这些不work
- Android rule-set无法下载 HOT 3
- sbfa 安卓端Gui点击bug 百分百复现。
- Sing-box crashes when updating remote ruleset is not possible
- Add Fragment support
- 通过 sing-box tun 连接经过 nginx stream 流量转发的网站内容异常
- sing-box以windows服务方式启动时,set_system_proxy字段设置为true但无法正常设置开启windows系统代理 HOT 3
- 大家好:sing-box 是否支持 shadowsocks-rust ?
- [Feature Request] Add DNS answers to ip/nftables set
- can't start on mac,says (packet-tunnel) error: start service: initialize inbound/tproxy[tproxy-in]
- tun接口IP地址/30使用后一位可用IP 异常 HOT 4
- "fatal error: too many callback functions" after too many box.New() instance initialized and started then closed HOT 2
- 内网、办公网环境中,支持自定义域名、IP 段跳过系统代理 HOT 4
- [Feature Request] URL Rewrite and MITM
- IP-based routing rules are not working (geoip-ru) HOT 3
- fatal error: runtime: stack split at bad time HOT 1
- 私有地址匹配路由规则错误 HOT 1
- [功能请求] 支持IPV6后缀匹配
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sing-box.