Sing-Box 客户端配置求助

nite07 · 2024-10-17 21:34:14 · 257 次点击

有两个设备A(archlinux) B(windows) 都运行下方配置

使用 localsend 能够互相发现,archlinux端向windows端发送文件正常,但是windows端向archlinux发送文件时,archlinux客户端接收不到请求。

关闭 sing-box 之后正常,所以可以确定是 sing-box 导致的。

有大佬知道怎么解决吗?


{
"log": { "level": "info", "timestamp": true },
"dns": {
"servers": [
{ "tag": "google", "address": "tls://8.8.8.8" },
{
"tag": "local",
"address": "https://223.5.5.5/dns-query",
"detour": "direct"
},
{ "tag": "fakeip", "address": "fakeip" }
],
"rules": [
{ "outbound": "any", "server": "local" },
{ "clash_mode": "Direct", "server": "local" },
{ "clash_mode": "Global", "server": "google" },
{ "rule_set": "geosite-geolocation-cn", "server": "local" },
{
"type": "logical",
"mode": "and",
"rules": [
{ "rule_set": "geosite-geolocation-!cn", "invert": true },
{ "rule_set": "geoip-cn" }
],
"server": "google",
"client_subnet": "114.114.114.114/24"
},
{ "query_type": ["A", "AAAA"], "server": "fakeip" }
],
"fakeip": {
"enabled": true,
"inet4_range": "198.18.0.0/15",
"inet6_range": "fc00::/18"
},
"strategy": "prefer_ipv4",
"independent_cache": true
},
"inbounds": [
{
"type": "tun",
"auto_route": true,
"strict_route": false,
"sniff": true,
"address": ["172.19.0.1/30", "fdfe:dcba:9876::1/126"],
"route_exclude_address": ["100.64.0.0/10", "fd7a:115c:a1e0::/48"]
}
],
"outbounds": [
{
"type": "selector",
"tag": "default",
"outbounds": []
}
],
"route": {
"rules": [
{
"type": "logical",
"mode": "or",
"rules": [{ "protocol": "dns" }, { "port": 53 }],
"outbound": "dns"
},
{
"process_name": ["syncthing", "tailscale", "tailscaled"],
"outbound": "direct"
},
{ "ip_is_private": true, "outbound": "direct" },
{ "clash_mode": "Direct", "outbound": "direct" },
{ "clash_mode": "Global", "outbound": "default" },
{
"type": "logical",
"mode": "or",
"rules": [
{ "port": 853 },
{ "network": "udp", "port": 443 },
{ "protocol": "stun" }
],
"outbound": "block"
},
{ "rule_set": "geosite-google", "outbound": "default" },
{
"type": "logical",
"mode": "or",
"rules": [
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
]
},
{ "process_path_regex": [".*steamapps[\\/]common.*"] }
],
"outbound": "direct"
}
],
"rule_set": [
{
"type": "remote",
"tag": "geosite-geolocation-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-geolocation-!cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geoip-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-category-games@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-games@cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-steam@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-steam@cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs",
"download_detour": "default"
},
{
"type": "remote",
"tag": "geosite-google",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google.srs",
"download_detour": "default"
}
],
"final": "default",
"auto_detect_interface": true
},
"experimental": {
"cache_file": { "enabled": true },
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "./ui",
"external_ui_download_detour": "default",
"default_mode": "Enhanced"
}
}
}

举报· 257 次点击
登录 注册 站外分享
7 条回复  
WyInnovate 初学 2024-10-17 21:34:14

帮顶一下_(:з」∠)_

wizos 初学 2024-10-17 21:34:14

试试将 inbounds 的 address 改为 172.16.0.1/30呢?

maraka 初学 2024-10-17 21:34:14

帮顶,共同关注

kotori 初学 2024-10-17 21:34:14

在Windows下抓取一下传输时的连接以及日志看一下?


可以断开外网用热点什么的组个内网减少一些外网日志的干扰,看一下传输时报的什么错?


正常来说Archlinux下发送文件正常,那可能是windows下tun模式存在一些问题,抓些日志分析一下可能有突破口?

mika24 初学 2024-10-17 21:34:14

你用的是内核吗,可以看日志

0x000 初学 2024-10-17 21:34:14

在 TUN 配置里的 route_exclude_address 添加上局域网地址,比如:"192.168.0.0/16"

xiaohao 初学 2024-10-17 21:34:14

"strict_route": true,的问题吗,之前好像是false

返回顶部