Giter Club home page Giter Club logo

sork's Introduction

Sork

基于 PHP + Swoole 实现的内网穿透工具。

sork-server

Usage

在有公网ip的机器上面启动服务端

php sork server

默认会加载当前目录下面的 server.json 配置文件,内容如下:

{
  "server": {
    "host": "0.0.0.0",
    "port": 8070
  },
  "tunnel": {
    "host": "0.0.0.0",
    "port": 8072
  },
  "listen": {
    "host": "0.0.0.0",
    "port": 8071
  }
}

这些都是默认的配置,可以不修改,当然如果存在端口冲突,那么自行修改,不过修改之后同时也需要修改客户端的配置。保持服务端的端口与客户端的端口一致。

在本地启动客户端

php sork client

默认会加载当前目录下面的 client.json 配置文件,内容如下:

{
  "server": {
    "host": "127.0.0.1",
    "port": 8070
  },
  "tunnel": {
    "host": "127.0.0.1",
    "port": 8072
  },
  "local": {
    "host": "0.0.0.0",
    "port": 3306
  }
}

这里你需要修改的是 local.hostlocal.port ,将它们改为你本地的服务。另外将 server.hostserver.porttunnel.hosttunnel.port 改为服务端的ip和端口。

这样的话,一个内网穿透服务就已经搭建完毕了。

支持

  • HTTP
  • MySQL
  • todo...

协议

Sork 采用 MIT 开源许可证,你可以在商业项目中免费使用 Sork 或者基于 Sork 二次开发而不必支付费用。

sork's People

Watchers

James Cloos avatar

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.