Coder Social home page Coder Social logo

ssh连上就断线 about vnt HOT 18 CLOSED

lbl8603 avatar lbl8603 commented on August 25, 2024
ssh连上就断线

from vnt.

Comments (18)

lbl8603 avatar lbl8603 commented on August 25, 2024

用的vnt哪个版本呢

from vnt.

muziling avatar muziling commented on August 25, 2024

今天刚下载的版本,最新1.2.3

from vnt.

lbl8603 avatar lbl8603 commented on August 25, 2024

试试用历史版本呢,如1.2.2

from vnt.

lbl8603 avatar lbl8603 commented on August 25, 2024

貌似和特定平台有关,方便抓日志来看吗,将log4rs.yaml文件放到vnt-cli同目录下,cd到该目录启动vnt-cli将会输出日志到./log目录中

# cat log4rs.yaml
refresh_rate: 30 seconds
appenders:
  rolling_file:
    kind: rolling_file
    path: log/vnt-cli.log
    append: true
    encoder:
      pattern: "{d(%+)(utc)} [{f}:{L}] {h({l})} {M}:{m}{n}"
    policy:
      kind: compound
      trigger:
        kind: size
        limit: 5 mb
      roller:
        kind: fixed_window
        pattern: log/vnt-cli.{}.log
        base: 1
        count: 5

root:
  level: info
  appenders:
    - rolling_file

from vnt.

muziling avatar muziling commented on August 25, 2024

在公司侧的vnt日志

2023-09-19T09:29:56.245301800+00:00 [vnt\win-tun-tap\src\tun\log.rs:35] ERROR win_tun_tap::tun::log:WinTun: Failed to find matching adapter name: 找不到元素。 (Code 0x00000490)
2023-09-19T09:29:56.344642700+00:00 [vnt\win-tun-tap\src\tun\log.rs:33] INFO win_tun_tap::tun::log:WinTun: Using existing driver 0.14
2023-09-19T09:29:56.352652900+00:00 [vnt\win-tun-tap\src\tun\log.rs:33] INFO win_tun_tap::tun::log:WinTun: Creating adapter
2023-09-19T09:29:56.733326600+00:00 [vnt\win-tun-tap\src\tun\log.rs:33] INFO win_tun_tap::tun::log:WinTun: Removed orphaned adapter "Vnt-Tun-V1 1"
2023-09-19T09:29:58.131934+00:00 [vnt\src\nat\mod.rs:47] WARN vnt::nat:获取本地ipv6地址失败:向一个无法连接的网络尝试了一个套接字操作。 (os error 10051)
2023-09-19T09:29:58.132631200+00:00 [vnt\src\handle\heartbeat_handler.rs:109] INFO vnt::handle::heartbeat_handler:启动心跳任务
2023-09-19T09:29:58.132665300+00:00 [vnt\src\handle\heartbeat_handler.rs:37] INFO vnt::handle::heartbeat_handler:启动空闲检查任务
2023-09-19T09:29:58.132690800+00:00 [vnt\src\handle\punch_handler.rs:44] INFO vnt::handle::punch_handler:启动打洞任务
2023-09-19T09:29:58.132735100+00:00 [vnt\src\handle\punch_handler.rs:44] INFO vnt::handle::punch_handler:启动打洞任务
2023-09-19T09:29:58.132761200+00:00 [vnt\src\handle\punch_handler.rs:89] INFO vnt::handle::punch_handler:启动发起打洞请求任务
2023-09-19T09:29:58.132840400+00:00 [vnt\src\channel\channel.rs:728] INFO vnt::channel::channel:启动udp v6
2023-09-19T09:29:58.132968300+00:00 [vnt\src\channel\channel.rs:751] INFO vnt::channel::channel:启动udp v4
2023-09-19T09:30:10.136016+00:00 [vnt\src\handle\punch_handler.rs:74] INFO vnt::handle::punch_handler:发起打洞,目标:10.26.0.2,NatInfo { public_ips: [IP隐藏, IP隐藏], public_port: 41226, public_port_range: 0, local_ipv4_addr:IP隐藏:41226, ipv6_addr: [2408:8248:20:f1a0::1]:37523, nat_type: Cone }
2023-09-19T09:30:10.136257300+00:00 [vnt\src\channel\punch.rs:107] INFO vnt::channel::punch:发送到ipv6地址:[2408:8248:20:f1a0::1]:37523,rs=Err(Os { code: 10051, kind: NetworkUnreachable, message: "向一个无法连接的网络尝试了一个套接字操作。" })
2023-09-19T09:30:27.671617400+00:00 [vnt\src\handle\heartbeat_handler.rs:40] INFO vnt::handle::heartbeat_handler:路由空闲 peer_ip:10.26.0.2,route:RouteKey { index: 1, addr: 43.139.56.10:29872 }

家里侧的日志

2023-09-19T09:36:49.551907250+00:00 [vnt/src/tun_tap_device/linux.rs:172] WARN vnt::tun_tap_device::linux:删除网卡失败:Output { status: ExitStatus(unix_wait_status(512)), stdout: "", stderr: "ip: can't find device 'vnt-tun'\n" }
2023-09-19T09:36:49.566501871+00:00 [vnt/src/tun_tap_device/linux.rs:172] WARN vnt::tun_tap_device::linux:删除网卡失败:Output { status: ExitStatus(unix_wait_status(512)), stdout: "", stderr: "ip: can't find device 'vnt-tap'\n" }
2023-09-19T09:36:49.611534497+00:00 [vnt/src/handle/heartbeat_handler.rs:109] INFO vnt::handle::heartbeat_handler:启动心跳任务
2023-09-19T09:36:49.611943058+00:00 [vnt/src/handle/heartbeat_handler.rs:37] INFO vnt::handle::heartbeat_handler:启动空闲检查任务
2023-09-19T09:36:49.612881670+00:00 [vnt/src/handle/punch_handler.rs:44] INFO vnt::handle::punch_handler:启动打洞任务
2023-09-19T09:36:49.613038785+00:00 [vnt/src/handle/punch_handler.rs:44] INFO vnt::handle::punch_handler:启动打洞任务
2023-09-19T09:36:49.613409106+00:00 [vnt/src/handle/punch_handler.rs:89] INFO vnt::handle::punch_handler:启动发起打洞请求任务
2023-09-19T09:36:49.613720643+00:00 [vnt/src/channel/channel.rs:751] INFO vnt::channel::channel:启动udp v4
2023-09-19T09:36:49.614319866+00:00 [vnt/src/channel/channel.rs:728] INFO vnt::channel::channel:启动udp v6
2023-09-19T09:36:49.646968485+00:00 [vnt/src/handle/punch_handler.rs:74] INFO vnt::handle::punch_handler:发起打洞,目标:10.26.0.3,NatInfo { public_ips: [ip隐藏], public_port: 14568, public_port_range: 0, local_ipv4_addr: 192.168.隐藏.隐藏:56984, ipv6_addr: [::]:0, nat_type: Cone }
2023-09-19T09:37:06.036052572+00:00 [vnt/src/handle/heartbeat_handler.rs:40] INFO vnt::handle::heartbeat_handler:路由空闲 peer_ip:10.26.0.3,route:RouteKey { index: 1, addr: 43.139.56.10:29872 }

from vnt.

lbl8603 avatar lbl8603 commented on August 25, 2024

日志记录的过程发生了ssh断连吗

from vnt.

muziling avatar muziling commented on August 25, 2024

发生了,必定会断,感觉是5秒左右必定断。

from vnt.

lbl8603 avatar lbl8603 commented on August 25, 2024

Disconnected from remote host(192.168.6.1) at 16:11:20.

你是使用的内网ip吗,这看起来不像是vnt生成的虚拟IP

from vnt.

muziling avatar muziling commented on August 25, 2024

对,一楼里写了,是家里的内部设备。 用vnt -i 和 -o参数192.168.6.0/24之类的
设备的SSH服务是没问题的,一直用了好多年,只有vnt会连上就断,别的隧道方式都不会。

from vnt.

lbl8603 avatar lbl8603 commented on August 25, 2024

我明白了,用内网ip,10秒钟没有操作会自动断开

from vnt.

muziling avatar muziling commented on August 25, 2024

有操作的,我在SSH里输入也会断,被强制断。

from vnt.

lbl8603 avatar lbl8603 commented on August 25, 2024

试试ssh后,输入top命令挂着,看是否会断开

from vnt.

muziling avatar muziling commented on August 25, 2024

也会断开

from vnt.

lbl8603 avatar lbl8603 commented on August 25, 2024

用vnt的虚拟ip会断开吗

from vnt.

muziling avatar muziling commented on August 25, 2024

试了,不会断

from vnt.

lbl8603 avatar lbl8603 commented on August 25, 2024

方便进群或者加好友吗,我给你打包个测试版本

from vnt.

lbl8603 avatar lbl8603 commented on August 25, 2024

可以先使用1.2.2版本,这些问题将在下个版本修复

from vnt.

lbl8603 avatar lbl8603 commented on August 25, 2024

在1.2.4版本已修复

from vnt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.