ooclab / otunnel

peer-to-peer tunnel tool
MIT License
239 stars 57 forks source link

小白请教客户端这是怎么引起的? #6

Closed laikitleung closed 6 years ago

laikitleung commented 7 years ago

panic: wrong tunnel map

goroutine 1 [running]: github.com/ooclab/otunnel/client.(Client).startTCP(0xc0420361e0) /data/goroot/src/github.com/ooclab/otunnel/client/client.go:184 +0x222 github.com/ooclab/otunnel/client.(Client).Start(0xc0420361e0) /data/goroot/src/github.com/ooclab/otunnel/client/client.go:160 +0xd7 github.com/ooclab/otunnel/client.glob..func1(0xc042038280) /data/goroot/src/github.com/ooclab/otunnel/client/cmd.go:54 +0xe9 github.com/urfave/cli.HandleAction(0x697c00, 0x706fa8, 0xc042038280, 0xc04203430 0, 0x0) /data/goroot/src/github.com/urfave/cli/app.go:487 +0x83 github.com/urfave/cli.Command.Run(0x6f685a, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6fa0 91, 0x13, 0x0, ...) /data/goroot/src/github.com/urfave/cli/command.go:207 +0xb79 github.com/urfave/cli.(*App).Run(0xc042019380, 0xc04202c070, 0x7, 0x7, 0x0, 0x0)

    /data/goroot/src/github.com/urfave/cli/app.go:250 +0x7d7

main.main() /data/goroot/src/github.com/ooclab/otunnel/cmd/otunnel/main.go:46 +0x1a9

gwind commented 7 years ago

可能是你的命令行用法错误,程序健壮性处理不足。能否把你的命令行用法粘贴一下?

laikitleung commented 7 years ago

服务端:otunne listen :20000 -s verylongpassword >/dev/null 2>&1 & 客户端:otunnel connect **:20000 -s verylongpassword -t 'f::8787:127.0.0.1:20001'

gwind commented 7 years ago

抱歉,目前来看,命令行好像没啥错误(除了f::8787 前面为空有点奇怪,想表达的是什么意思?)

建议看下 https://github.com/ooclab/otunnel/wiki/USAGE.zh_CN 是否有遗漏。 如果仍然有问题:

  1. 贴下 otunnel -v 看下版本信息
  2. 注意下你的 -t 参数里 : 是否为英文的字符
  3. f::8787:127.0.0.1:2001 想表达的意思是?

终极解决方案:进入错误信息行,输出下命令行参数数据,重新build测试下