sing-box icon indicating copy to clipboard operation
sing-box copied to clipboard

inbounds tun 几个疑问请教

Open luweijun1992 opened this issue 7 months ago • 0 comments

操作系统

Linux

系统版本

Debian 12

安装类型

sing-box 原始命令行程序

如果您使用图形客户端程序,请提供该程序版本。

No response

版本

sing-box version 1.10.0-alpha.18

Environment: go1.22.4 linux/amd64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api
Revision: f7c96d9d78c2146e695e4ce7171f1e019850a065
CGO: disabled

描述

Debian 12上部署sing-box IP:192.168.248.220

inbounds

{
    "type": "tun",
    "tag": "tunIn",
    "interface_name": "tun0",
    "address": "172.19.0.1/30",
    "auto_route": true,
    "strict_route": true,
    "stack": "system",
    "sniff": true,
    "sniff_override_destination": true
},

问题1: 这里是不是默认会自动劫持DNS的流量啊? 因为我测试终端网关指向sing-box,dns也指向sing-box,无法解析 测试终端网关指向sing-box,dns随便写了一个互联网dns,可以解析


问题2: 测试终端直接向sing-box请求dns解析,使用:dig @192.168.248.220 +short www.qq.com 无法提供解析


问题3: 测试终端使用:dig @198.18.1.1 +short www.qq.com 也无法解析 测试终端有静态路由 198.18.0.0/16 指向sing-box sing-box如下回显信息

sing-box[8331]: INFO[0653] [1329986453 0ms] inbound/tun[tunIn]: inbound packet connection from 192.168.5.1:50842
sing-box[8331]: INFO[0653] [1329986453 0ms] inbound/tun[tunIn]: inbound packet connection to 198.18.1.1:53
sing-box[8331]: ERROR[0653] [1329986453 0ms] inbound/tun[tunIn]: missing fakeip context

重现方式

日志

No response

支持我们

完整性要求

  • [X] 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • [X] 我保证提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
  • [X] 我保证提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
  • [X] 我保证提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。

luweijun1992 avatar Jul 01 '24 08:07 luweijun1992