Giter Site home page Giter Site logo

net-penetration's Introduction

代码中已包含大量注释,穿透的具体逻辑可前往进行查看:https://blog.csdn.net/qq_45808700/article/details/131417192

1 若没有公网ip,可进行本地测试,步骤如下:

  1. 首先运行服务端main.go
  2. 运行客户端main.go
  3. 运行应用端main.go
  4. 此时可前往浏览器进行测试,分别打开AppPort和AppTargetPort进行查看
  5. 在第一次打开AppTargetPort时会建立连接,故需要刷新后才会进行消息转发,看到内网的服务

image

2 公网ip测试步骤:以Linux云服务器为例

  1. 首先修改constant.go中的ServerIP为自己的公网ip,并注意打开端口,若不进行端口修改,则是8081,8082,8083端口

  2. 将服务端main.go打包(本仓库中已包括打包好的可执行程序,若不需要修改端口可直接上传),上传到Linux云服务器,并chomd +x main添加权限。windows下将go程序打包为linux可执行程序需要配置go编译环境,具体参考windows下将go程序打包为linux可执行程序教程 image

  3. 在服务器运行上传的main

  4. 在客户端运行客户端main.go

  5. 运行应用端main.go

  6. 此时可打开公网ip:AppTargetPort,并进行刷新,即可发现内网的应用服务

net-penetration's People

Contributors

pistachiout avatar

Stargazers

Conkay Yan avatar  avatar  avatar found avatar coo0 avatar  avatar  avatar akazwz avatar  avatar

Watchers

 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.