vnt-dev / vnts

vnt server
161 stars 67 forks source link

只能监听在ipv4上吗? #6

Closed muziling closed 10 months ago

muziling commented 11 months ago

vnts只监听在0.0.0.0上,没有监听ipv6,这样客户端没办法通过ipv6公网地址连接服务端。

vnt-dev commented 11 months ago

后续会支持

muziling commented 10 months ago

@lbl8603 最新代码有问题

root@opmain:~# cat ./log/vnts.log
2023-12-22T20:29:11.758846372+08:00 [src/main.rs:186] INFO vnts:config:ConfigInfo { port: 65534, white_token: None, gateway: 10.26.0.1, broadcast: 10.26.0.255, netmask: 255.255.255.0, check_finger: false }
2023-12-22T20:29:11.759166838+08:00 [src/main.rs:194] INFO vnts:监听udp ipv4地址: 0.0.0.0:65534
2023-12-22T20:29:11.759297717+08:00 [src/main.rs:199] WARN vnts:udp_ipv6启动失败:Os { code: 98, kind: AddrInUse, message: "Address in use" }
root@opmain:~# cat ./log/log4rs.yaml
refresh_rate: 30 seconds
appenders:
  rolling_file:
    kind: rolling_file
    path: log/vnts.log
    append: true
    encoder:
      pattern: "{d} [{f}:{L}] {h({l})} {M}:{m}{n}"
    policy:
      kind: compound
      trigger:
        kind: size
        limit: 10 mb
      roller:
        kind: fixed_window
        pattern: log/vnts.{}.log
        base: 1
        count: 5

root:
  level: info
  appenders:
    - rolling_file
vnt-dev commented 10 months ago

这是ipv6的端口冲突了吧

muziling commented 10 months ago

没有冲突,netstat看过了,我这个是在openwrt上试的

在ubuntu下也试了,也是报这个错误,简单的尝试方法就是不加参数,直接./vnts 执行

vnt-dev commented 10 months ago

是代码有点问题,修复了

muziling commented 10 months ago

没问题了