Git Product home page Git Product logo

one-net's Introduction

Onenet : A pure java,excelling and beyond implementation of Ngrok or FRP

Make your PCs'services access by Internet. Release your Pc's cloud capability. Client/Server mode. High performance on High concurrent. Industry level software.

Release

  • Latest version: 1.3-RELEASE
  • Sources branch: 1.3-RELEASE
  • Update Note 1.3-RELEASE.
    • Enable the client pool config.
    • Fix the major issue of too many invalid OneNet channels.
    • Add timeout in local connection creation process.

Features

  1. TCP and HTTP one direction tunnel

    Http context need 80 port and it parse request host name to match config context) , and the tcp context doing no parse on data trans in.

  2. Traffic control for each context/tunnel.
  3. Gzip Support
  4. AES Support

    Need JCE to support

  5. One Server Support Mutipl Domains
  6. Mutil Channl Server/Client Support
  7. Cross Platform(Linux, Windows and the other can run JRE8)

User Guide

  1. Install Java 8 on your Server(Cloud VPS or any PC can access by Internet ) and Pc.

    The AES feature need JCE lib for JRE.

  2. Download(or self build) both server and client of OneNet.
    • Self build:
    #for server
    [project root dir] gradlew one-net-server:clearBoot
    ...
    #for client
    [project root dir] gradlew one-net-client:clearBoot
    the jar output are in [project root dir][sub project dir]/build/libs

    The files hosted in my home and tunnel by OneNet via Cloud VPS :)

  3. Config your tunnels
    • create application.yml files for both server and client, the following template is for Server.

    • The following template demonstrate blow four contexts:

      Context Tunnel In Tunnel Out
      weyong [server]:83 [127.0.0.1]:88
      mstsc [server]:56789 [127.0.0.1]:3389
      test1 [server]:80 [127.0.0.1]:88
      test2 [server]:80 [127.0.0.1]:82

      application.yml for server

          #The OneNetServer config template
          #The file name should be : application.yml
          server:
            port: 8080
            tomcat:
              uri-encoding: UTF-8
          logging:
            level:
              root: error
              org.springframework.boot: error
              com.weyong: info
              io.netty.handler.logging: debug
          oneNetServer:
            name: firstServer
            oneNetPort: 9527
            tcpContexts:
              -
                contextName: weyong
                internetPort: 83
                zip: true
                aes: false
                kBps: 200
              -
                contextName: mstsc
                internetPort: 56789
                kBps: 200
                zip: true
                aes: false
            httpContexts:
              -
                contextName: test1
                zip: true
                aes: false
                kBps: 200
                domainRegExs:
                  -
                    \w+.test1.com
              -
                contextName: test2
                zip: true
                aes: false
                kBps: 200
                domainRegExs:
                  -
                    \w+.test2.com

      application.yml for client

          #The OneNetClient config template
          #The file name should be : application.yml
          server:
            port: 8081
            tomcat:
              uri-encoding: UTF-8
          logging:
            level:
              root: error
              org.springframework.boot: error
              com.weyong: debug
              io.netty.handler.logging: debug
          oneNetClient:
            serverName: localhost
            reconnectAfterNSeconds: 7
            serverConfigs:
              -
                hostName: localhost
                oneNetPort: 9527
                contexts:
                  -
                    contextName: weyong
                    localhost: 127.0.0.1
                    port: 88
                    localPool: true
                    poolConfig:
                      maxIdle: 50
                      minIdle: 30
                      maxTotal: 1024
                      blockWhenExhausted: true
                      fireness: true
                      testWhileIdle: true
                      testOnBorrow: true
                      testOnReturn: false
                      maxWaitMillis: 100
                      timeBetweenEvictionRunsMillis: 1000
                  -
                    contextName: mstsc
                    localhost: 127.0.0.1
                    port: 3389
                    localPool: false
                  -
                    contextName: test1
                    localhost: 127.0.0.1
                    port: 88
                    localPool: false
                  -
                    contextName: test2
                    localhost: 127.0.0.1
                    port: 82
                    localPool: false

      The application.yml need edit in professional editor VS Code and IDEA .etc, Any informat or speicial char will cause error. The pool config is critical to performance, change the value until you know what it is.

  4. Start Server and Client.
    • put application.yml in the same folder with jar file
      #for server
      /usr/bin/java -Xmx256m -jar one-net-server-clear-1.3-RELEASE.jar > one-net-server.log
      #for client
      /usr/bin/java -Xmx256m -jar one-net-client-clear-1.3-RELEASE.jar > one-net-client.log
  5. Check Internet access of your services.
    • check your local service access by Internet.

Performance

  1. The IO core is base on Netty 4.1.9. It is total as-sync.
  2. Byte level transfer protocol result in low cost.
  3. Localhost connection pool supported.
  4. 100 threads, 100 request each thread, test result. alt text

Road Map

  1. Web UI Console

one-net's People

Contributors

ableli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

one-net's Issues

Where to set Cloud VPS ip?

Dear ableli,

one-net is a great idea. I tried to use it but didn't find any place to set my vps ip address in client config.

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.