Comments (3)
Not following template.
from sing-box.
Not following template.
同样的配置文件,在 192.168.1.5 上没问题。
现在重新复制了模板,只加了个节点,仍然连接到了 192.168.1.5
{
"dns": {
"servers": [
{
"tag": "google",
"address": "tls://8.8.8.8"
},
{
"tag": "local",
"address": "223.5.5.5",
"detour": "direct"
}
],
"rules": [
{
"domain": "mydomain.com",
"geosite": "cn",
"server": "local"
}
],
"strategy": "ipv4_only"
},
"inbounds": [
{
"type": "tun",
"inet4_address": "172.19.0.1/30",
"mtu": 9000,
"auto_route": true,
"strict_route": true,
"stack": "gvisor",
"sniff": true,
"sniff_override_destination": true
}
],
"outbounds": [
{
"type": "shadowsocks",
"tag": "CN2-SS",
"method": "2022-blake3-aes-128-gcm",
"password": "8JCsPssffS8tiRwiMlhARg==",
"detour": "CN2-shadowtls",
"multiplex": {
"enabled": true,
"max_connections": 4,
"min_streams": 4
}
},
{
"type": "shadowtls",
"tag": "CN2-shadowtls",
"server": "myserver",
"server_port": 4443,
"tls": {
"enabled": true,
"server_name": "baidu.com"
}
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns-out"
}
],
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"geosite": "category-ads-all",
"outbound": "block"
},
{
"geosite": "cn",
"geoip": "cn",
"outbound": "direct"
}
],
"auto_detect_interface": true
}
}
日志:
root@tunnel:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq state UP group default qlen 1000
link/ether 00:0c:29:09:de:23 brd ff:ff:ff:ff:ff:ff
altname enp11s0
inet 192.168.1.2/24 brd 192.168.1.255 scope global ens192
valid_lft forever preferred_lft forever
inet6 240e:390:7806:d7f0:20c:29ff:fe09:de23/64 scope global dynamic mngtmpaddr
valid_lft 259185sec preferred_lft 172785sec
inet6 fe80::20c:29ff:fe09:de23/64 scope link
valid_lft forever preferred_lft forever
root@tunnel:~# ./sing-box run
INFO[0000] router: loaded geoip database: 1 codes
INFO[0000] router: loaded geosite database: 1260 codes
INFO[0000] router: updated default interface ens192, index 2
INFO[0000] inbound/tun[0]: started at tun0
INFO[0000] sing-box started (0.644s)
INFO[0002] [719507464] inbound/tun[0]: inbound packet connection from 172.19.0.1:58958
INFO[0002] [719507464] inbound/tun[0]: inbound packet connection to 192.168.1.5:53
DEBUG[0002] [719507464] router: sniffed packet protocol: dns
DEBUG[0002] [719507464] router: match[0] protocol=dns => dns-out
DEBUG[0002] [719507464] dns: exchange 2.debian.pool.ntp.org.tunnel.lan AAAA INET
DEBUG[0002] [719507464] dns: exchange 2.debian.pool.ntp.org.tunnel.lan A INET
INFO[0002] outbound/shadowsocks[CN2-SS]: outbound multiplex connection to 8.8.8.8:853
INFO[0003] outbound/shadowsocks[CN2-SS]: outbound multiplex connection to 8.8.8.8:853
INFO[0005] outbound/shadowsocks[CN2-SS]: outbound multiplex connection to 8.8.8.8:853
ERROR[0006] [719507464] dns: exchange failed for 2.debian.pool.ntp.org.tunnel.lan.: read tcp 192.168.1.2:44950->myserver:4443: read: connection reset by peer
DEBUG[0007] [719507464] dns: exchange 2.debian.pool.ntp.org.tunnel.lan AAAA INET
DEBUG[0007] [719507464] dns: exchange 2.debian.pool.ntp.org.tunnel.lan A INET
INFO[0007] outbound/shadowsocks[CN2-SS]: outbound multiplex connection to 8.8.8.8:853
INFO[0008] outbound/shadowsocks[CN2-SS]: outbound multiplex connection to 8.8.8.8:853
INFO[0010] outbound/shadowsocks[CN2-SS]: outbound multiplex connection to 8.8.8.8:853
ERROR[0011] [719507464] dns: exchange failed for 2.debian.pool.ntp.org.tunnel.lan.: read tcp 192.168.1.2:44960->myserver:4443: read: connection reset by peer
INFO[0012] [1932962955] inbound/tun[0]: inbound packet connection from 172.19.0.1:56845
INFO[0012] [1932962955] inbound/tun[0]: inbound packet connection to 192.168.1.5:53
DEBUG[0012] [1932962955] router: sniffed packet protocol: dns
DEBUG[0012] [1932962955] router: match[0] protocol=dns => dns-out
DEBUG[0012] [1932962955] dns: exchange 3.debian.pool.ntp.org AAAA INET
DEBUG[0012] [1932962955] dns: exchange 3.debian.pool.ntp.org A INET
INFO[0012] outbound/shadowsocks[CN2-SS]: outbound multiplex connection to 8.8.8.8:853
INFO[0013] outbound/shadowsocks[CN2-SS]: outbound multiplex connection to 8.8.8.8:853
INFO[0015] outbound/shadowsocks[CN2-SS]: outbound multiplex connection to 8.8.8.8:853
from sing-box.
配置文件在没有使用 192.168.1.5 之前也是没问题的。
192.168.1.5 部署网关之后,192.168.1.2 就不行了。
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.