PinkD / corplink-rs

使用 rust 实现的飞连客户端

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

failed to config interface with uapi for corplink: uapi returns unexpected result: errno=-55

monkey-wenjun opened this issue · comments

failed to config interface with uapi for corplink: uapi returns unexpected result: errno=-55

commented
  1. 系统是什么, linux 还是 win 还是 mac ?
  2. wg-go 是用的修改版吗?
  3. 根据系统,注释掉对应的 .stdout(Stdio::null()).stderr(Stdio::null()) 后重新编译,就能看到 wg-go 返回的报错

    corplink-rs/src/wg.rs

    Lines 64 to 79 in 9986748

    cfg_if::cfg_if! {
    if #[cfg(windows)] {
    return Command::new(cmd)
    .args([name])
    .stdout(Stdio::null())
    .stderr(Stdio::null())
    .envs(envs)
    .spawn();
    } else {
    return Command::new(cmd)
    .args(["-f", name])
    .stdout(Stdio::null())
    .stderr(Stdio::null())
    .envs(envs)
    .spawn();
    }

Manjaro Linux rolling 6位, gnome 42.4 用的是arch 的包直接pacman 安装的

start wg-corplink for corplink
launch wg-corplink with env: {}
socket file /var/run/wireguard/corplink.sock not ready, sleep 1s
try to connect unix sock: /var/run/wireguard/corplink.sock
send config to uapi
failed to config interface with uapi for corplink: uapi returns unexpected result: errno=-55

commented

下载 3.2 版本,在配置里打开 debug_wg 选项,然后把 wg 相关的 log 发出来看看?

login success
try to connect
found 3 vpn(s)
check if udp vpn 11.12.22.3:103 is available
available
try to get wg conf from remote
2fa code generated: 113381, 22 seconds left
start wg-corplink for corplink
launch wg-corplink with env: {}
socket file /var/run/wireguard/corplink.sock not ready, sleep 1s
┌──────────────────────────────────────────────────────┐
│ │
│ Running wireguard-go is not required because this │
│ kernel has first class support for WireGuard. For │
│ information on installing the kernel module, │
│ please visit: │
https://www.wireguard.com/install/
│ │
└──────────────────────────────────────────────────────┘
try to connect unix sock: /var/run/wireguard/corplink.sock
send config to uapi
ERROR: (corplink) 2022/09/06 20:24:09 IPC error -55: failed to set addr to 17.11.0.0/16 for corplink: file exists
ERROR: (corplink) 2022/09/06 20:24:09 IPC error -55: failed to set addr to 17.11.0.0/16 for corplink: file exists
failed to config interface with uapi for corplink: uapi returns unexpected result: errno=-55

变更了IP信息

commented

看起来是路由已存在,有两种可能:

  1. 服务端下发的路由有重复的,一般应该不会这么干,可能性比较小
  2. 本机已经有该路由了,可能是 dhcp 或者其他东西添加的。例如公司的 dhcp 服务器可能会自动加这个段,然后再连飞连,就会出现重复的情况。这个比较好排除,你可以在连接之前使用 ip route 命令查看是否有该路由。如果有,可以考虑使用 ip route delete 17.11.0.0/16 删掉

感谢支持,找到原因了,docker 的IP段和这个冲突了