Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

endpoints 工作异常 ERROR[0013] [1326223602 2ms] connection: open outbound connection: dial tcp 192.168.123.1:22: route ip+net : no such network interface #2319

Open
4 of 5 tasks
dashiell-zhang opened this issue Nov 28, 2024 · 3 comments

Comments

@dashiell-zhang
Copy link

dashiell-zhang commented Nov 28, 2024

Operating system

Windows

System version

windows 11

Installation type

Original sing-box Command Line

If you are using a graphical client, please provide the version of the client.

sing-box version 1.11.0-beta.1

Version

INFO[0000] network: updated default interface 以太网, index 18
INFO[0000] endpoint/wireguard[out-proxy]: started at wg0
ERROR[0000] endpoint/wireguard[out-proxy]: unable to update bind: listen udp6 :51590: An invalid argument was supplied.
ERROR[0000] endpoint/wireguard[out-proxy]: failed to read packet from tun device: invalid argument
INFO[0001] network: updated default interface 以太网, index 18
INFO[0003] inbound/tun[0]: started at tun0
INFO[0003] sing-box started (3.633s)
INFO[0003] [2309393784 0ms] inbound/tun[0]: inbound packet connection from 192.168.150.1:55146
INFO[0003] [2309393784 1ms] inbound/tun[0]: inbound packet connection to 192.168.150.2:53
INFO[0003] [2309393784 5ms] outbound/direct[out-direct]: outbound packet connection
INFO[0003] [694508728 0ms] inbound/tun[0]: inbound packet connection from 192.168.150.1:51179
INFO[0003] [694508728 0ms] inbound/tun[0]: inbound packet connection to 192.168.150.2:53
INFO[0003] [694508728 0ms] outbound/direct[out-direct]: outbound packet connection
INFO[0004] network: updated default interface 以太网, index 18
INFO[0005] [813533979 0ms] inbound/tun[0]: inbound packet connection from 192.168.150.1:59861
INFO[0005] [813533979 0ms] inbound/tun[0]: inbound packet connection to 192.168.150.2:53
INFO[0005] [813533979 0ms] outbound/direct[out-direct]: outbound packet connection
INFO[0009] network: updated default interface 以太网, index 18
INFO[0011] [1570441567 0ms] inbound/tun[0]: inbound connection from 192.168.150.1:56255
INFO[0011] [1570441567 0ms] inbound/tun[0]: inbound connection to 192.168.123.1:22
INFO[0011] [1570441567 0ms] endpoint/wireguard[out-proxy]: outbound connection to 192.168.123.1:22
ERROR[0011] [1570441567 3ms] connection: open outbound connection: dial tcp 192.168.123.1:22: route ip+net : no such network interface
INFO[0012] [1016965818 0ms] inbound/tun[0]: inbound connection from 192.168.150.1:56255
INFO[0012] [1016965818 0ms] inbound/tun[0]: inbound connection to 192.168.123.1:22
INFO[0012] [1016965818 0ms] endpoint/wireguard[out-proxy]: outbound connection to 192.168.123.1:22
ERROR[0012] [1016965818 3ms] connection: open outbound connection: dial tcp 192.168.123.1:22: route ip+net : no such network interface

Description

我有使用 sing-box 连接一个 wireguard ,之前使用的是 outbound wireguard 功能一切正常,切换到最新的 endpoints 之后无法正常工作

{
  "log": {
    "disabled": false,
    "level": "info"
  },
  "dns": {
    "servers": [
      {
        "address": "udp://223.6.6.6"
      }
    ]
  },
  "inbounds": [
    {
      "type": "tun",
      "address": [
        "192.168.150.1/30"
      ],
      "auto_route": true,
      "route_address": [
        "192.168.123.0/24"
      ],
      "route_exclude_address": [
        "172.18.4.132/32"
      ],
      "stack": "gvisor"
    }
  ],
  "endpoints": [
    {
      "type": "wireguard",
      "tag": "out-proxy",
      "system": true,
      "name": "wg0",
      "mtu": 1100,
      "address": [
        "192.168.123.5/32"
      ],
      "private_key": "xxxxx",
      "peers": [
        {
          "address": "172.18.4.132",
          "port": 15703,
          "public_key": "xxxxxxx",
          "allowed_ips": [
            "0.0.0.0/0"
          ],
          "persistent_keepalive_interval": 30,
          "reserved": [ 0, 0, 0 ]
        }
      ]
    }
  ],
  "outbounds": [
    {
      "type": "direct",
      "tag": "out-direct"
    }
  ],
  "route": {
    "rules": [
      {
        "type": "logical",
        "mode": "and",
        "rules": [
          {
            "ip_cidr": [
              "192.168.123.0/24"
            ]
          }
        ],
        "outbound": "out-proxy"
      }
    ],

    "auto_detect_interface": true
  }
}

上面的配置文件搭配 sing-box 11 是不正常的,下面的配置文件搭配 sing-box 10 是可以正常工作的


{
  "log": {
    "disabled": false,
    "level": "info"
  },
  "dns": {
    "servers": [
      {
        "address": "udp://223.6.6.6"
      }
    ]
  },
  "inbounds": [
    {
      "type": "tun",
      "address": [
        "192.168.150.1/30"
      ],
      "auto_route": true,
      "route_address": [
        "192.168.123.0/24"
      ],
      "route_exclude_address": [
        "172.18.4.132/32"
      ],
      "stack": "gvisor"
    }
  ],

  "outbounds": [
    {
      "type": "direct",
      "tag": "out-direct"
    },
    {
      "type": "wireguard",
      "tag": "out-proxy",
      "server": "172.18.4.132",
      "server_port": 15703,
      "local_address": [
        "192.168.123.5/32"
      ],
      "private_key": "xxxxxx",
      "peer_public_key": "xxxxxx"
    }
  ],
  "route": {
    "rules": [
      {
        "type": "logical",
        "mode": "and",
        "rules": [
          {
            "ip_cidr": [
              "192.168.123.0/24"
            ]
          }
        ],
        "outbound": "out-proxy"
      }
    ],

    "auto_detect_interface": true
  }
}

Reproduction

./sing-box.exe -c sing-box.json run

Logs

No response

Supporter

Integrity requirements

  • I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
  • I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
  • I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
  • I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
@dashiell-zhang dashiell-zhang changed the title ERROR[0013] [1326223602 2ms] connection: open outbound connection: dial tcp 192.168.123.1:22: route ip+net : no such network interface endpoints 工作异常 ERROR[0013] [1326223602 2ms] connection: open outbound connection: dial tcp 192.168.123.1:22: route ip+net : no such network interface Nov 28, 2024
@dashiell-zhang
Copy link
Author

ERROR[0000] endpoint/wireguard[out-proxy]: unable to update bind: listen udp6 :53766: An invalid argument was supplied.
ERROR[0000] endpoint/wireguard[out-proxy]: peer(Wptl…7wSw) - failed to send handshake initiation: address family not supported by protocol

启动的时候就会有这个两个错误
连接的时候会有

INFO[0011] [1570441567 0ms] endpoint/wireguard[out-proxy]: outbound connection to 192.168.123.1:22
ERROR[0011] [1570441567 3ms] connection: open outbound connection: dial tcp 192.168.123.1:22: route ip+net : no such network interface

这样一个错误

@dashiell-zhang

This comment was marked as off-topic.

@dashiell-zhang
Copy link
Author

dashiell-zhang commented Dec 2, 2024

@nekohasekai 你好,这个问题我目前在 endpoints 的节点上手动添加 "detour": "out-direct" 之后可以正常使用了,这里可能是缺少走默认出口的策略,还有就是在 windows 中endpoints 的 wireguard 的配置 "system": flase 这个不可以用 true ,如果在文档里面可以提示一下就更好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants