Giter Site home page Giter Site logo

wormhole's Introduction

下载

  • 下载release下对应系统的安装包
  • 或者go环境下进行源码编译./build.sh生成三个系统的二进制程序
#生成当前平台程序
go build wormhole
#生成mac,linux,windows3个平台程序(命名已区分)
./build.sh

使用

程序默认使用1808端口,可在config.yaml中修改,默认接收文件放在程序下的accept目录下,可自行修改

  • 查看帮助
$ wormhole
使用示例: 
1、启动本地服务:wormhole server 
2、查看在线设备:wormhole ls
3、发送消息:wormhole send 0 hello
4、发送文件:wormhole send ./wormhole

Usage:
  wormhole [flags]
  wormhole [command]

Available Commands:
  env         展示环境参数
  help        Help about any command
  list        列出所有设备
  net         添加指定IP或IP所在网段(IP最后为255)
  restart     重启服务
  send        发送文本消息或文件
  server      启动wormhole服务
  set         设置环境参数
  start       后台方式启动wormhole服务
  stop        停止服务

Flags:
  -h, --help   help for wormhole

Use "wormhole [command] --help" for more information about a command.
  • 接受方需先启动服务:
wormhole server #前台进程
wormhole start #后台进程
  • 发送方可指定ip和端口直接发送,不指定flag时优先匹配发送信息为文件路径
wormhole send 192.168.1.1:1808 ./file
wormhole send 192.168.1.1:1808 "this is a message"
  • 发送方先启动服务后可以有更多发送方式 先查看主机列表信息:
$ wormhole ls
+-------+---------------+------+-----------+--------+---------------------+
| INDEX |     HOST      | PORT |   NAME    | STATE  |   LASTACTIVETIME    |
+-------+---------------+------+-----------+--------+---------------------+
|     0 | 192.168.12.49 | 1808 | bishisimo | online | 2020-10-26 13:22:18 |
+-------+---------------+------+-----------+--------+---------------------+
#通过索引发送,0号主机永远为本机
wormhole send 0 ./file
#通过用户名发送
wormhole send bishisimo ./file
#通过主机IP发送
wormhole send 192.168.1.1 ./file

TODO

  • 维护README
  • 发送字符串消息
  • 发送文件
  • 发送文件夹
  • 不启动Server进行快捷发送
  • 使用命令进行配置变量打印与设置
  • 使用start(wormhole start)命令进行后台运行并通过stop或restart实现控制
  • 支持中转服务器实现跨局域网通信(wormhole fort)

wormhole's People

Contributors

bishisimo avatar

Stargazers

Jerry Li avatar

Watchers

James Cloos avatar  avatar

Forkers

xiaowu5759

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.